# Makefile -- makefile for gnucash # @configure_input@ # Copyright (C) 1997 Robin Clark # Copyright (C) 1998 Rob Browning # # 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # Author: Robin Clark # Internet: rclark@rush.aero.org # Address: 609 8th Street # Huntington Beach, CA 92648-4632 include @top_srcdir@/Makefile.init ###################################################################### # Description of targets: # # default -- make the application # depend -- generate the dependencies # clean -- remove *.a, *.o, *.bak, and *~ # distclean -- get rid of config files too... # install -- installs everything default: @echo " " @echo "Please choose one of the following targets:" @echo "motif dynamically linked motif version" @echo "motif-static statically linked motif version" @echo "gnome gnome/gtk version" @echo "gnome-static gnome/gtk statically linked version" @echo "qt kde/qt version" @echo " " # This inclusion must come after the first target, and after the # definitions of *_SRCS, etc., but before the usage of *_OBJS. include @top_srcdir@/Makefile.common # Aliases motif-static: motif.static gnome-static: gnome.static build-flavor: @cd lib; $(MAKE) ${FLAVOR} @cd src; $(MAKE) ${FLAVOR} ln -sf gnucash.${FLAVOR} gnucash.bin (cd share && rm -f scm && ln -sf ../src/scm scm) motif: ${MAKE} FLAVOR=motif build-flavor motif.static: ${MAKE} FLAVOR=motif.static build-flavor gnome: ${MAKE} FLAVOR=gnome build-flavor gnome.static: ${MAKE} FLAVOR=gnome.static build-flavor qt: ${MAKE} FLAVOR=qt build-flavor depend: @echo make depend is now superfluous. CLEAN_SUBDIRS += lib src TRASH += *~ *.o *.bak DIST_TRASH += Makefile *~ *.o *.bak share/scm gnucash.bin DIST_TRASH += gnucash.motif gnucash.motif.static DIST_TRASH += gnucash.gnome gnucash.gnome.static gnucash.qt gnucash-shell DIST_TRASH += config.cache config.log config.status config.h tagsfiles := $(shell find -name "*.[ch]") TAGS: ${tagsfiles} etags ${tagsfiles} install-bin: gnucash.${FLAVOR} $(INSTALL) gnucash.${FLAVOR} ${GNC_BINDIR}/gnucash.${FLAVOR} (cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash) install: @mkdir -p ${GNC_BINDIR} # Put these in the opposite order of precedence. Final bin/gnucash link will # point to the last one that exists... -[ -e gnucash.qt ] && ${MAKE} FLAVOR=qt GNC_BINDIR=${GNC_BINDIR} install-bin -[ -e gnucash.gnome.static ] && \ ${MAKE} FLAVOR=gnome.static GNC_BINDIR=${GNC_BINDIR} install-bin -[ -e gnucash.gnome ] && ${MAKE} FLAVOR=gnome GNC_BINDIR=${GNC_BINDIR} install-bin -[ -e gnucash.motif.static ] && \ ${MAKE} FLAVOR=motif.static GNC_BINDIR=${GNC_BINDIR} install-bin -[ -e gnucash.motif ] && ${MAKE} FLAVOR=motif GNC_BINDIR=${GNC_BINDIR} install-bin # Make sure at least one succeeded [ \ -e ${GNC_BINDIR}/gnucash.motif -o \ -e ${GNC_BINDIR}/gnucash.motif.static -o \ -e ${GNC_BINDIR}/gnucash.gnome -o \ -e ${GNC_BINDIR}/gnucash.gnome.static -o \ -e ${GNC_BINDIR}/gnucash.qt \ ] @mkdir -p ${GNC_DOCDIR} $(INSTALL_DATA) README* ${GNC_DOCDIR} $(INSTALL_DATA) TODO ${GNC_DOCDIR} $(INSTALL_DATA) CHANGES ${GNC_DOCDIR} # @mkdir -p $(prefix)/toolbar # $(INSTALL_DATA) toolbar/*.xpm $(prefix)/toolbar # Share directory @mkdir -p ${GNC_SHAREDIR} # Try to do this in a platform independent way... # Directories for dir in `find share/scm/ -type d`; do \ dest=`echo $$dir | cut -c 11-` ;\ mkdir -p ${GNC_SHAREDIR}/scm/$$dest; \ done # Files for file in `find share/scm/ -name "*.scm"`; do \ dest=`echo $$file | cut -c 11-` ;\ ${INSTALL_DATA} $$file ${GNC_SHAREDIR}/scm/$$dest; \ done @mkdir -p ${GNC_SHAREDIR}/data $(INSTALL_DATA) data/*.xac ${GNC_SHAREDIR}/data @mkdir -p ${GNC_SHAREDIR}/Docs $(INSTALL_DATA) Docs/*.html ${GNC_SHAREDIR}/Docs # $(INSTALL_DATA) Docs/*.phtml ${GNC_SHAREDIR}/Docs $(INSTALL_DATA) Docs/*.gif ${GNC_SHAREDIR}/Docs # $(INSTALL_DATA) Docs/*.jpg ${GNC_SHAREDIR}/Docs $(INSTALL_DATA) Docs/*.xpm ${GNC_SHAREDIR}/Docs @mkdir -p ${GNC_SHAREDIR}/Docs/images # $(INSTALL_DATA) Docs/logos/*.* ${GNC_SHAREDIR}/Docs/images @mkdir -p ${GNC_SHAREDIR}/Docs/logos $(INSTALL_DATA) Docs/logos/*.* ${GNC_SHAREDIR}/Docs/logos @mkdir -p ${GNC_SHAREDIR}/Reports $(INSTALL_DATA) Reports/*.html ${GNC_SHAREDIR}/Reports $(INSTALL_DATA) Reports/*.phtml ${GNC_SHAREDIR}/Reports # $(INSTALL_DATA) Reports/*.gif ${GNC_SHAREDIR}/Reports # $(INSTALL_DATA) Reports/*.jpg ${GNC_SHAREDIR}/Reports # $(INSTALL_DATA) Reports/*.xpm ${GNC_SHAREDIR}/Reports @mkdir -p ${GNC_SHAREDIR}/Reports/images # $(INSTALL_DATA) Reports/logos/*.* ${GNC_SHAREDIR}/Reports/images # ------------------------------------------------------------------ # hack alert -- the config dir stuff is messed up in configure.in as well # as in the scheme search paths. For example, the configure script tries # to put config files into /usr/etc/gnucash/config which is a butt-stupid # place for this stuff ... For now, we will simply touch the one file that # the scheme initialization is looking for, and punt on the rest ... $(INSTALL_DATA) etc/conf* ${GNC_SHAREDIR} # # Config directory # @mkdir -p ${GNC_CONFIGDIR} # # # Directories # for dir in `find etc/ -type d`; do \ # dest=`echo $$dir | cut -c 5-` ; \ # mkdir -p ${GNC_CONFIGDIR}/$$dest; \ # done # # # Files # for file in `find etc/ -type f`; do \ # dest=`echo $$file | cut -c 5-` ; \ # ${INSTALL_DATA} $$file ${GNC_CONFIGDIR}/$$dest; \ # done .PHONY: default install-private install motif motif-static gnome gnome-static qt .PHONY: depend clean distclean # Local Variables: # tab-width: 2 # End: