## AbiSource Applications
## Copyright (C) 2001 Sam Tobin-Hochstadt
## Copyright (C) 2001 Hubert Figuiere
## Copyright (C) 2002 Francis James Franklin
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
## 
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
## 02111-1307, USA.

SUBDIRS = . bundle AbiWord.app

include $(top_srcdir)/includes.mk

#bundledir=$(prefix)/AbiWord.app
#contentsdir=$(bundledir)/Contents
#macosdir=$(contentsdir)/MacOS
#resourcesdir=$(contentsdir)/Resources
#englishdir=$(resourcesdir)/English.lproj

#macos_PROGRAMS = AbiWord
noinst_PROGRAMS = AbiWord

DEFS = @DEFS@ -DABIWORD_APP_NAME="\"$(ABIWORD_APP_NAME)\""

INCLUDES = $(AF_INCLUDES) $(WP_INCLUDES) $(OTHER_INCLUDES) $(TEXT_INCLUDES)

abi_ver.cpp:
	cp $(srcdir)/../xp/abi_ver.cpp .

AbiWord_SOURCES = abi_ver.cpp CocoaMain.mm

REPEAT_LIBS = $(ABI_LIBS) 

AbiWord_LDADD = $(REPEAT_LIBS) $(REPEAT_LIBS) @PLATFORM_LIBS@ $(REPEAT_LIBS) $(OTHER_LIBS) 

#RESOURCES=$(top_srcdir)/src/af/util/mac/ut_MacAssert.rsrc \
#	$(top_srcdir)/src/af/xap/mac/xap_MacDlg_MessageBox.rsrc \
#	$(top_srcdir)/src/af/xap/mac/xap_MacResources.rsrc

#NIBS=$(top_srcdir)/src/af/xap/cocoa/xap_CocoaDlg_MessageBox.nib \
#	$(top_srcdir)/src/af/xap/cocoa/xap_GenericListChooser_Controller.nib \
#	$(top_srcdir)/src/af/xap/cocoa/xap_CocoaToolbarWindow.nib \
#	$(top_srcdir)/src/wp/ap/cocoa/ap_CocoaDialog_Break.nib \
#	$(top_srcdir)/src/wp/ap/cocoa/ap_CocoaDialog_MetaData.nib \
#	$(top_srcdir)/src/wp/ap/cocoa/ap_CocoaFrame.nib \
#	$(top_srcdir)/src/wp/ap/cocoa/ap_CocoaSplash.nib
#
#PROGRAM_BUNDLE=AbiWord.app/Contents
#PROGRAM_BUNDLE_BIN=$(PROGRAM_BUNDLE)/MacOS
#PROGRAM_BUNDLE_RES=$(PROGRAM_BUNDLE)/Resources

#$(PROGRAM_BUNDLE_RES)/AbiWord.rsrc: $(RESOURCES)
#	@mkdir -p $(PROGRAM_BUNDLE_RES)
#	@mkdir -p $(PROGRAM_BUNDLE_BIN)
#	$(RESMERGER) -srcIs DF -dstIs DF $(RESOURCES) -o $@

#$(PROGRAM_BUNDLE_BIN)/AbiWord: AbiWord
#	@mkdir -p $(PROGRAM_BUNDLE_RES)
#	@mkdir -p $(PROGRAM_BUNDLE_BIN)
#	for i in $(NIBS); do; (cd `dirname $$i`; tar cf - `basename $$i`) | (cd $(PROGRAM_BUNDLE_RES) ; tar xf -); done
#	
#	cp $(top_srcdir)/src/wp/main/cocoa/bundle/PkgInfo $(PROGRAM_BUNDLE)
#	cp $(top_srcdir)/src/wp/main/cocoa/bundle/Info.plist $(PROGRAM_BUNDLE)
#	cp $(top_srcdir)/src/wp/main/cocoa/bundle/AbiWord.icns $(PROGRAM_BUNDLE_RES)
#	cp $(top_srcdir)/src/wp/main/cocoa/bundle/abiword_48.tif $(PROGRAM_BUNDLE_RES)
#	mv $< $@
#
#all: $(PROGRAM_BUNDLE_BIN)/AbiWord
