## AbiSource Applications
## Copyright (C) 2001 Sam Tobin-Hochstadt
##
## 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.

include $(top_srcdir)/includes.mk

CLEANFILES = abi_ver.cpp

noinst_PROGRAMS = AbiWord-2.4

bin_SCRIPTS = AbiWord


INCLUDES = \
	-DABIWORD_APP_NAME="\"$(ABIWORD_APP_NAME)\"" \
	-DABISUITE_HOME="\"$(pkgdatadir)\"" \
	$(AF_INCLUDES) $(WP_INCLUDES) $(OTHER_INCLUDES) $(TEXT_INCLUDES) \
	$(PLUGIN_DEFS) -I$(top_srcdir)/../abiword-plugins

REPEAT_LIBS = $(ABI_LIBS) $(ABI_LIBS) $(ABI_LIBS) $(ABI_LIBS)

AbiWord_2_4_LDADD = @PLUGIN_LIST@ $(REPEAT_LIBS) $(PLATFORM_LIBS) $(OTHER_LIBS) 

AbiWord_2_4_SOURCES = abi_ver.cpp QNXMain.cpp

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

AbiWord:	AbiWord-2.4
	ln -fs AbiWord-2.4 AbiWord
	bindres -q AbiWord Icon.wgti $(top_srcdir)/src/wp/ap/qnx/dialogs/wgt/*.wgtd $(top_srcdir)/src/af/xap/qnx/dialogs/wgt/*.wgtd	

install-exec-local:	
	@if test -f $(DESTDIR)/$(bindir)/abiword; then \
	  echo "$(DESTDIR)/$(bindir)/abiword is a regular file - I'm not going to create a link."; \
	else \
	  (cd $(DESTDIR)/$(bindir) && ln -sf AbiWord-2.4 abiword); \
	fi

abiword_plugins = ../../../../../abiword-plugins

ltsubdir = .libs/

libAbiCommand.a:	$(abiword_plugins)/tools/abicommand/xp/$(ltsubdir)libAbiCommand.a
	cp $(abiword_plugins)/tools/abicommand/xp/$(ltsubdir)libAbiCommand.a libAbiCommand.a

libAbiGimp.a:	$(abiword_plugins)/tools/abigimp/xp/$(ltsubdir)libAbiGimp.a
	cp $(abiword_plugins)/tools/abigimp/xp/$(ltsubdir)libAbiGimp.a libAbiGimp.a

libAbiAikSaurus.a:	$(abiword_plugins)/tools/aiksaurus/xp/$(ltsubdir)libAbiAikSaurus.a
	cp $(abiword_plugins)/tools/aiksaurus/xp/$(ltsubdir)libAbiAikSaurus.a libAbiAikSaurus.a

libAbiBabelfish.a:	$(abiword_plugins)/tools/babelfish/xp/$(ltsubdir)libAbiBabelfish.a
	cp $(abiword_plugins)/tools/babelfish/xp/$(ltsubdir)libAbiBabelfish.a libAbiBabelfish.a

libAbiFreeTranslation.a:	$(abiword_plugins)/tools/freetranslation/xp/$(ltsubdir)libAbiFreeTranslation.a
	cp $(abiword_plugins)/tools/freetranslation/xp/$(ltsubdir)libAbiFreeTranslation.a libAbiFreeTranslation.a

#libAbiGDA.a:	$(abiword_plugins)/tools/gda/unix/$(ltsubdir)libAbiGDA.a
#	cp $(abiword_plugins)/tools/gda/unix/$(ltsubdir)libAbiGDA.a libAbiGDA.a

#libAbiGdict.a:	$(abiword_plugins)/tools/gdict/unix/$(ltsubdir)libAbiGdict.a
#	cp $(abiword_plugins)/tools/gdict/unix/$(ltsubdir)libAbiGdict.a libAbiGdict.a

libAbiGoogle.a:	$(abiword_plugins)/tools/google/xp/$(ltsubdir)libAbiGoogle.a
	cp $(abiword_plugins)/tools/google/xp/$(ltsubdir)libAbiGoogle.a libAbiGoogle.a

libAbiGypsython.a:	$(abiword_plugins)/tools/gypsython/xp/$(ltsubdir)libAbiGypsython.a
	cp $(abiword_plugins)/tools/gypsython/xp/$(ltsubdir)libAbiGypsython.a libAbiGypsython.a

libAbiOTS.a:	$(abiword_plugins)/tools/ots/xp/$(ltsubdir)libAbiOTS.a
	cp $(abiword_plugins)/tools/ots/xp/$(ltsubdir)libAbiOTS.a libAbiOTS.a

libAbiReferee.a:	$(abiword_plugins)/tools/referee/xp/$(ltsubdir)libAbiReferee.a
	cp $(abiword_plugins)/tools/referee/xp/$(ltsubdir)libAbiReferee.a libAbiReferee.a

libAbiURLDict.a:	$(abiword_plugins)/tools/urldict/xp/$(ltsubdir)libAbiURLDict.a
	cp $(abiword_plugins)/tools/urldict/xp/$(ltsubdir)libAbiURLDict.a libAbiURLDict.a

libAbiWikipedia.a:	$(abiword_plugins)/tools/wikipedia/xp/$(ltsubdir)libAbiWikipedia.a
	cp $(abiword_plugins)/tools/wikipedia/xp/$(ltsubdir)libAbiWikipedia.a libAbiWikipedia.a

libAbiApplix.a:	$(abiword_plugins)/wp/impexp/applix/xp/$(ltsubdir)libAbiApplix.a
	cp $(abiword_plugins)/wp/impexp/applix/xp/$(ltsubdir)libAbiApplix.a libAbiApplix.a

libAbiBZ2.a:	$(abiword_plugins)/wp/impexp/bz2abw/xp/$(ltsubdir)libAbiBZ2.a
	cp $(abiword_plugins)/wp/impexp/bz2abw/xp/$(ltsubdir)libAbiBZ2.a libAbiBZ2.a

libAbiClarisWorks.a:	$(abiword_plugins)/wp/impexp/clarisworks/xp/$(ltsubdir)libAbiClarisWorks.a
	cp $(abiword_plugins)/wp/impexp/clarisworks/xp/$(ltsubdir)libAbiClarisWorks.a libAbiClarisWorks.a

libAbiCoquille.a:	$(abiword_plugins)/wp/impexp/coquille/xp/$(ltsubdir)libAbiCoquille.a
	cp $(abiword_plugins)/wp/impexp/coquille/xp/$(ltsubdir)libAbiCoquille.a libAbiCoquille.a

libAbiDocBook.a:	$(abiword_plugins)/wp/impexp/docbook/xp/$(ltsubdir)libAbiDocBook.a
	cp $(abiword_plugins)/wp/impexp/docbook/xp/$(ltsubdir)libAbiDocBook.a libAbiDocBook.a

libAbiEML.a:	$(abiword_plugins)/wp/impexp/eml/xp/$(ltsubdir)libAbiEML.a
	cp $(abiword_plugins)/wp/impexp/eml/xp/$(ltsubdir)libAbiEML.a libAbiEML.a

#libAbiGdkPixbuf.a:	$(abiword_plugins)/wp/impexp/graphics/AbiGdkPixbuf/unix/$(ltsubdir)libAbiGdkPixbuf.a
#	cp $(abiword_plugins)/wp/impexp/graphics/AbiGdkPixbuf/unix/$(ltsubdir)libAbiGdkPixbuf.a libAbiGdkPixbuf.a

libAbiBMP.a:	$(abiword_plugins)/wp/impexp/graphics/bmp/xp/$(ltsubdir)libAbiBMP.a
	cp $(abiword_plugins)/wp/impexp/graphics/bmp/xp/$(ltsubdir)libAbiBMP.a libAbiBMP.a

libAbiJPEG.a:	$(abiword_plugins)/wp/impexp/graphics/jpeg/xp/$(ltsubdir)libAbiJPEG.a
	cp $(abiword_plugins)/wp/impexp/graphics/jpeg/xp/$(ltsubdir)libAbiJPEG.a libAbiJPEG.a

#libAbiRSVG.a:	$(abiword_plugins)/wp/impexp/graphics/librsvg/unix/$(ltsubdir)libAbiRSVG.a
#	cp $(abiword_plugins)/wp/impexp/graphics/librsvg/unix/$(ltsubdir)libAbiRSVG.a libAbiRSVG.a

libAbiMagick.a:	$(abiword_plugins)/wp/impexp/graphics/magick/xp/$(ltsubdir)libAbiMagick.a
	cp $(abiword_plugins)/wp/impexp/graphics/magick/xp/$(ltsubdir)libAbiMagick.a libAbiMagick.a

libAbiWMF.a:	$(abiword_plugins)/wp/impexp/graphics/wmf/xp/$(ltsubdir)libAbiWMF.a
	cp $(abiword_plugins)/wp/impexp/graphics/wmf/xp/$(ltsubdir)libAbiWMF.a libAbiWMF.a

libAbiHancom.a:	$(abiword_plugins)/wp/impexp/hancom/xp/$(ltsubdir)libAbiHancom.a
	cp $(abiword_plugins)/wp/impexp/hancom/xp/$(ltsubdir)libAbiHancom.a libAbiHancom.a

libAbiHRText.a:	$(abiword_plugins)/wp/impexp/hrtext/xp/$(ltsubdir)libAbiHRText.a
	cp $(abiword_plugins)/wp/impexp/hrtext/xp/$(ltsubdir)libAbiHRText.a libAbiHRText.a

libAbiISCII.a:	$(abiword_plugins)/wp/impexp/iscii-text/xp/$(ltsubdir)libAbiISCII.a
	cp $(abiword_plugins)/wp/impexp/iscii-text/xp/$(ltsubdir)libAbiISCII.a libAbiISCII.a

libAbiKWord.a:	$(abiword_plugins)/wp/impexp/kword/xp/$(ltsubdir)libAbiKWord.a
	cp $(abiword_plugins)/wp/impexp/kword/xp/$(ltsubdir)libAbiKWord.a libAbiKWord.a

libAbiLaTeX.a:	$(abiword_plugins)/wp/impexp/latex/xp/$(ltsubdir)libAbiLaTeX.a
	cp $(abiword_plugins)/wp/impexp/latex/xp/$(ltsubdir)libAbiLaTeX.a libAbiLaTeX.a

libAbiMIF.a:	$(abiword_plugins)/wp/impexp/mif/xp/$(ltsubdir)libAbiMIF.a
	cp $(abiword_plugins)/wp/impexp/mif/xp/$(ltsubdir)libAbiMIF.a libAbiMIF.a

libAbiMSWrite.a:	$(abiword_plugins)/wp/impexp/mswrite/xp/$(ltsubdir)libAbiMSWrite.a
	cp $(abiword_plugins)/wp/impexp/mswrite/xp/$(ltsubdir)libAbiMSWrite.a libAbiMSWrite.a

libAbiNroff.a:	$(abiword_plugins)/wp/impexp/nroff/xp/$(ltsubdir)libAbiNroff.a
	cp $(abiword_plugins)/wp/impexp/nroff/xp/$(ltsubdir)libAbiNroff.a libAbiNroff.a

libAbiOpenWriter.a:	$(abiword_plugins)/wp/impexp/OpenWriter/xp/$(ltsubdir)libAbiOpenWriter.a
	cp $(abiword_plugins)/wp/impexp/OpenWriter/xp/$(ltsubdir)libAbiOpenWriter.a libAbiOpenWriter.a

libAbiPalmDoc.a:	$(abiword_plugins)/wp/impexp/pdb/xp/$(ltsubdir)libAbiPalmDoc.a
	cp $(abiword_plugins)/wp/impexp/pdb/xp/$(ltsubdir)libAbiPalmDoc.a libAbiPalmDoc.a

libAbiPsion.a:	$(abiword_plugins)/wp/impexp/psion/xp/$(ltsubdir)libAbiPsion.a
	cp $(abiword_plugins)/wp/impexp/psion/xp/$(ltsubdir)libAbiPsion.a libAbiPsion.a

libAbiSDW.a:	$(abiword_plugins)/wp/impexp/sdw/xp/$(ltsubdir)libAbiSDW.a
	cp $(abiword_plugins)/wp/impexp/sdw/xp/$(ltsubdir)libAbiSDW.a libAbiSDW.a

libAbiT602.a:	$(abiword_plugins)/wp/impexp/t602/xp/$(ltsubdir)libAbiT602.a
	cp $(abiword_plugins)/wp/impexp/t602/xp/$(ltsubdir)libAbiT602.a libAbiT602.a

libAbiWML.a:	$(abiword_plugins)/wp/impexp/wml/xp/$(ltsubdir)libAbiWML.a
	cp $(abiword_plugins)/wp/impexp/wml/xp/$(ltsubdir)libAbiWML.a libAbiWML.a

libAbiWordPerfect.a:	$(abiword_plugins)/wp/impexp/wordperfect/xp/$(ltsubdir)libAbiWordPerfect.a
	cp $(abiword_plugins)/wp/impexp/wordperfect/xp/$(ltsubdir)libAbiWordPerfect.a libAbiWordPerfect.a

libAbiXHTML.a:	$(abiword_plugins)/wp/impexp/xhtml/xp/$(ltsubdir)libAbiXHTML.a
	cp $(abiword_plugins)/wp/impexp/xhtml/xp/$(ltsubdir)libAbiXHTML.a libAbiXHTML.a

libAbiXSLFO.a:	$(abiword_plugins)/wp/impexp/xsl-fo/xp/$(ltsubdir)libAbiXSLFO.a
	cp $(abiword_plugins)/wp/impexp/xsl-fo/xp/$(ltsubdir)libAbiXSLFO.a libAbiXSLFO.a

libAbiScriptHappy.a:	$(abiword_plugins)/wp/scripts/shell/xp/$(ltsubdir)libAbiScriptHappy.a
	cp $(abiword_plugins)/wp/scripts/shell/xp/$(ltsubdir)libAbiScriptHappy.a libAbiScriptHappy.a

