1998-09-11 01:19:26 -05:00
|
|
|
# Makefile -- makefile for gnucash
|
1998-04-21 22:25:34 -05:00
|
|
|
# Copyright (C) 1997 Robin Clark
|
|
|
|
# Copyright (C) 1998 Rob Browning <rlb@cs.utexas.edu>
|
|
|
|
#
|
|
|
|
# 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
|
1997-11-29 20:39:58 -06:00
|
|
|
|
1998-09-15 01:21:06 -05:00
|
|
|
SHELL=/bin/bash
|
|
|
|
export SHELL
|
|
|
|
|
1997-11-29 20:39:58 -06:00
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
1998-09-09 00:43:16 -05:00
|
|
|
prefix=@prefix@
|
|
|
|
datadir=@datadir@
|
1998-09-11 01:19:26 -05:00
|
|
|
# i.e. /usr/share
|
|
|
|
localstatedir=@localstatedir@
|
|
|
|
# i.e. /var/
|
|
|
|
sysconfdir=@sysconfdir@
|
|
|
|
# i.e. /etc/
|
1998-09-09 00:43:16 -05:00
|
|
|
|
1997-11-29 20:39:58 -06:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
CPU = @target_cpu@
|
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
LIBS=@LIBS@
|
|
|
|
|
1997-11-29 20:39:58 -06:00
|
|
|
######################################################################
|
|
|
|
# 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:
|
1998-03-08 19:27:59 -06:00
|
|
|
@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"
|
1998-09-11 01:19:26 -05:00
|
|
|
@echo "gnome-static gnome/gtk statically linked version"
|
1998-08-08 17:18:25 -05:00
|
|
|
@echo "qt kde/qt version"
|
1998-03-08 19:27:59 -06:00
|
|
|
@echo " "
|
1998-03-08 14:40:41 -06:00
|
|
|
|
1998-09-11 01:19:26 -05:00
|
|
|
# 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 && ln -sf ../src/scm scm)
|
|
|
|
|
1998-03-08 14:40:41 -06:00
|
|
|
motif:
|
1998-09-11 01:19:26 -05:00
|
|
|
${MAKE} FLAVOR=motif build-flavor
|
1997-11-29 20:39:58 -06:00
|
|
|
|
1998-09-11 01:19:26 -05:00
|
|
|
motif.static:
|
|
|
|
${MAKE} FLAVOR=motif.static build-flavor
|
1998-03-08 19:27:59 -06:00
|
|
|
|
|
|
|
gnome:
|
1998-09-11 01:19:26 -05:00
|
|
|
${MAKE} FLAVOR=gnome build-flavor
|
|
|
|
|
|
|
|
gnome.static:
|
|
|
|
${MAKE} FLAVOR=gnome.static build-flavor
|
1997-12-05 01:01:19 -06:00
|
|
|
|
1998-08-05 23:34:47 -05:00
|
|
|
qt:
|
1998-09-11 01:19:26 -05:00
|
|
|
${MAKE} FLAVOR=qt build-flavor
|
1998-08-05 23:34:47 -05:00
|
|
|
|
1997-11-29 20:39:58 -06:00
|
|
|
depend:
|
1998-09-11 01:19:26 -05:00
|
|
|
@echo make depend is now superfluous.
|
1997-11-29 20:39:58 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.o *.bak
|
|
|
|
@cd lib; $(MAKE) clean
|
|
|
|
@cd src; $(MAKE) clean
|
|
|
|
|
|
|
|
distclean: clean
|
1998-09-11 01:19:26 -05:00
|
|
|
rm -f *~ *.o *.bak Makefile share/scm gnucash.bin
|
|
|
|
rm -f gnucash gnucash.motif gnucash.motif.static \
|
1998-09-14 00:58:58 -05:00
|
|
|
gnucash.gnome gnucash.gnome.static gnucash.qt
|
1998-03-01 11:35:32 -06:00
|
|
|
rm -f config.cache config.log config.status config.h
|
1998-09-11 02:02:06 -05:00
|
|
|
rm -f src/guile/path-defaults.h
|
1997-11-29 20:39:58 -06:00
|
|
|
@cd lib; $(MAKE) distclean
|
|
|
|
@cd src; $(MAKE) distclean
|
|
|
|
|
1998-03-17 02:02:25 -06:00
|
|
|
tagsfiles := $(shell find -name "*.[ch]")
|
|
|
|
|
|
|
|
TAGS: ${tagsfiles}
|
|
|
|
etags ${tagsfiles}
|
|
|
|
|
1998-09-11 01:19:26 -05:00
|
|
|
install:
|
|
|
|
${MAKE} \
|
|
|
|
DOCDIR=${prefix}/doc/gnucash \
|
|
|
|
BINDIR=${prefix}/bin \
|
|
|
|
CONFIGDIR=${sysconfdir}/gnucash \
|
|
|
|
SHAREDIR=${datadir}/gnucash \
|
|
|
|
install-private
|
|
|
|
|
|
|
|
install-opt:
|
|
|
|
${MAKE} \
|
|
|
|
DOCDIR=${prefix}/doc \
|
|
|
|
BINDIR=${prefix}/bin \
|
|
|
|
CONFIGDIR=${sysconfdir} \
|
|
|
|
SHAREDIR=${datadir} \
|
|
|
|
install-private
|
|
|
|
|
|
|
|
# We have to re-build the binary here to pick up any modifications to
|
|
|
|
# the ./configure configuration and to accomodate install vs
|
|
|
|
# install-opt. The other option would be to always use a wrapper
|
|
|
|
# script, even in the install tree, but that's IMO uglier.
|
|
|
|
|
|
|
|
# We could get rid of some redundant rebuilds with a
|
|
|
|
# stamp-install-opt-build, but that's somewhat messy too.
|
|
|
|
gnucash.motif gnucash.motif.static gnucash.gnome gnucash.gnome.static:
|
|
|
|
@echo Rebuilding binary to handle install site specific dependencies.
|
1998-09-11 02:02:06 -05:00
|
|
|
rm -f gnucash.${FLAVOR} src/guile/path-defaults.h
|
1998-09-11 01:19:26 -05:00
|
|
|
${MAKE} DOCDIR=${DOCDIR} BINDIR=${BINDIR} CONFIGDIR=${CONFIGDIR} \
|
|
|
|
SHAREDIR=${SHAREDIR} ${FLAVOR}
|
|
|
|
.PHONY: gnucash.motif gnucash.motif.static gnucash.gnome gnucash.gnome.static
|
|
|
|
|
|
|
|
|
|
|
|
install-bin: gnucash.${FLAVOR}
|
|
|
|
$(INSTALL) gnucash.${FLAVOR} ${BINDIR}/gnucash.${FLAVOR}
|
|
|
|
(cd ${BINDIR} && ln -sf gnucash.${FLAVOR} gnucash)
|
|
|
|
|
|
|
|
install-private:
|
|
|
|
@mkdir -p ${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 BINDIR=${BINDIR} install-bin
|
|
|
|
-[ -e gnucash.gnome.static ] && \
|
|
|
|
${MAKE} FLAVOR=gnome.static BINDIR=${BINDIR} install-bin
|
|
|
|
-[ -e gnucash.gnome ] && ${MAKE} FLAVOR=gnome BINDIR=${BINDIR} install-bin
|
|
|
|
-[ -e gnucash.motif.static ] && \
|
|
|
|
${MAKE} FLAVOR=motif.static BINDIR=${BINDIR} install-bin
|
|
|
|
-[ -e gnucash.motif ] && ${MAKE} FLAVOR=motif BINDIR=${BINDIR} install-bin
|
1998-09-09 00:43:16 -05:00
|
|
|
|
|
|
|
# Make sure at least one succeeded
|
1998-09-11 01:19:26 -05:00
|
|
|
[ \
|
|
|
|
-e ${BINDIR}/gnucash.motif -o \
|
|
|
|
-e ${BINDIR}/gnucash.motif.static -o \
|
|
|
|
-e ${BINDIR}/gnucash.gnome -o \
|
|
|
|
-e ${BINDIR}/gnucash.gnome.static -o \
|
|
|
|
-e ${BINDIR}/gnucash.qt \
|
|
|
|
]
|
1998-09-09 00:43:16 -05:00
|
|
|
|
|
|
|
# @mkdir -p $(prefix)/toolbar
|
|
|
|
# $(INSTALL_DATA) toolbar/*.xpm $(prefix)/toolbar
|
1998-09-11 01:19:26 -05:00
|
|
|
|
|
|
|
@mkdir -p ${DOCDIR}
|
|
|
|
$(INSTALL_DATA) Docs/*.html ${DOCDIR}
|
|
|
|
$(INSTALL_DATA) Docs/*.gif ${DOCDIR}
|
|
|
|
# $(INSTALL_DATA) Docs/*.jpg ${DOCDIR}
|
|
|
|
$(INSTALL_DATA) Docs/*.xpm ${DOCDIR}
|
|
|
|
@mkdir -p ${DOCDIR}/logos
|
|
|
|
$(INSTALL_DATA) Docs/logos/*.* ${DOCDIR}/logos
|
1998-09-09 00:43:16 -05:00
|
|
|
|
|
|
|
# Config directory
|
|
|
|
@mkdir -p ${CONFIGDIR}
|
|
|
|
|
|
|
|
# Try to do this in a platform independent way...
|
|
|
|
# Directories
|
|
|
|
for dir in `find etc/ -type d`; do \
|
|
|
|
dest=`echo $$dir | cut -c 5-` \
|
|
|
|
mkdir -p ${CONFIGDIR}/$$dest; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Files
|
|
|
|
for file in `find etc/ -type f`; do \
|
|
|
|
dest=`echo $$file | cut -c 5-` \
|
|
|
|
${INSTALL_DATA} $$file ${CONFIGDIR}/$$dest; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# Share directory
|
1998-09-11 01:19:26 -05:00
|
|
|
@mkdir -p ${SHAREDIR}
|
1998-09-09 00:43:16 -05:00
|
|
|
|
|
|
|
# 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-` \
|
1998-09-11 01:19:26 -05:00
|
|
|
mkdir -p ${SHAREDIR}/scm/$$dest; \
|
1998-09-09 00:43:16 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
# Files
|
|
|
|
for file in `find share/scm/ -name "*.scm"`; do \
|
|
|
|
dest=`echo $$file | cut -c 11-` \
|
1998-09-11 01:19:26 -05:00
|
|
|
${INSTALL_DATA} $$file ${SHAREDIR}/scm/$$dest; \
|
1998-09-09 00:43:16 -05:00
|
|
|
done
|
1998-04-21 22:49:38 -05:00
|
|
|
|
1998-09-11 01:19:26 -05:00
|
|
|
.PHONY: default install-private install motif motif-static gnome gnome-static qt
|
|
|
|
.PHONY: depend clean distclean
|
|
|
|
|
1998-04-21 22:49:38 -05:00
|
|
|
# Local Variables:
|
|
|
|
# tab-width: 2
|
|
|
|
# End:
|