mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
oodles of patches from rob browning ...
support for graphics, configure & makefile cleanup, scheme main cleanup git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1331 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1ad5cb3122
commit
ea62dade5a
@ -70,11 +70,11 @@ clean:
|
||||
rm -rf obj
|
||||
-rm -rf ${TRASH}
|
||||
|
||||
distclean:
|
||||
distclean: clean
|
||||
$(foreach dir,${CLEAN_SUBDIRS},(cd ${dir} && $(MAKE) distclean);)
|
||||
rm -f *~ *.bak \#* $(TRASH)
|
||||
rm -rf obj
|
||||
rm -f Makefile Makefile.bak config.h
|
||||
rm -f Makefile.bak
|
||||
rm -f $(foreach f,$(wildcard *.in),$(f:.in=))
|
||||
rm -f ${DIST_TRASH}
|
||||
|
||||
.PHONY: clean distclean
|
||||
|
||||
|
259
Makefile.in
259
Makefile.in
@ -1,3 +1,160 @@
|
||||
# Makefile -- makefile for gnucash/src/swig
|
||||
# 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.
|
||||
|
||||
# These three lines are suggested defs for autoconf (see the info pages).
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
VPATH = @top_srcdir@
|
||||
|
||||
CC = @CC@
|
||||
INCLPATH = \
|
||||
-I. \
|
||||
-I@top_srcdir@/src \
|
||||
-I@top_srcdir@/src/swig\
|
||||
-I@top_srcdir@/src/engine \
|
||||
-I@top_srcdir@/src/register \
|
||||
-I@top_srcdir@/src/guile \
|
||||
-I@top_srcdir@/include \
|
||||
-I@top_srcdir@/lib/ComboBox-1.33 \
|
||||
-I@top_srcdir@/@XMHTML_INC@ \
|
||||
-I@top_srcdir@/lib/Xbae-4.6.2-linas \
|
||||
-I$(prefix)/include
|
||||
|
||||
CFLAGS = @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH}
|
||||
|
||||
HAVE_PLOTUTILS=@HAVE_PLOTUTILS@
|
||||
|
||||
######################################################################
|
||||
# SEE Makefile.common for information about these variables.
|
||||
INDEP_SRCS = gnucash-all-guile_wrap.c gnucash-engine-guile_wrap.c
|
||||
######################################################################
|
||||
|
||||
# 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
|
||||
|
||||
default: ${OBJS}
|
||||
.PHONY: default
|
||||
|
||||
SWIG_FILTER := %P.h %/util.h
|
||||
SWIG_ENGINE_HDRS := \
|
||||
$(filter-out ${SWIG_FILTER},$(wildcard @top_srcdir@/src/engine/*.h))
|
||||
SWIG_ALL_HDRS := \
|
||||
${SWIG_ENGINE_HDRS} \
|
||||
../helperfuncs.h \
|
||||
$(filter-out ${SWIG_FILTER},$(wildcard @top_srcdir@/src/guile/gnucash.h))
|
||||
|
||||
ifeq (${HAVE_PLOTUTILS},1)
|
||||
SWIG_ALL_HDRS += ../plot.preproc.h
|
||||
endif
|
||||
|
||||
# Because Swig's include mechanism is not too smart.
|
||||
SWIG_ENGINE_BASENAMES := $(notdir ${SWIG_ENGINE_HDRS})
|
||||
SWIG_ALL_BASENAMES := $(notdir ${SWIG_ALL_HDRS})
|
||||
|
||||
# This is .PHONY because it has to be re-generated *every* time. Who
|
||||
# knows when headers are added to the engine dir?
|
||||
gnucash.engine.i: ${SWIG_ENGINE_HDRS}
|
||||
@echo "%module gnucash" > $@
|
||||
@echo "%{" >> $@
|
||||
@($(foreach hdr,${SWIG_ENGINE_BASENAMES},echo "#include <${hdr}>"; )) >> $@
|
||||
@echo "%}" >> $@
|
||||
@($(foreach hdr,${SWIG_ENGINE_BASENAMES},echo %include ${hdr}; )) >> $@
|
||||
TRASH += gnucash.engine.i gnucash.engine_wrap.doc
|
||||
|
||||
gnucash.all.i: ${SWIG_ALL_HDRS}
|
||||
@echo "%module gnucash" > $@
|
||||
@echo "%{" >> $@
|
||||
@($(foreach hdr,${SWIG_ALL_BASENAMES},echo "#include <${hdr}>"; )) >> $@
|
||||
@echo "%}" >> $@
|
||||
@($(foreach hdr,${SWIG_ALL_BASENAMES},echo %include ${hdr}; )) >> $@
|
||||
TRASH += gnucash.all.i gnucash.all_wrap.doc
|
||||
|
||||
gnucash-engine-guile_wrap.c: gnucash.engine.i
|
||||
swig -I.. -I@top_srcdir@/src/engine -I@top_srcdir@/src/guile -guile -o $@ $<
|
||||
perl -pi -e 's/^void gnucash\(/void gnucash_swig_init\(/' $@
|
||||
TRASH += gnucash-engine-guile_wrap.c
|
||||
|
||||
gnucash-all-guile_wrap.c: gnucash.all.i
|
||||
swig -I.. -I@top_srcdir@/src/engine -I@top_srcdir@/src/guile -guile -o $@ $<
|
||||
perl -pi -e 's/^void gnucash\(/void gnucash_swig_init\(/' $@
|
||||
TRASH += gnucash-all-guile_wrap.c
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# End:
|
||||
# Makefile -- makefile for gnucash/src/swig
|
||||
# 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.
|
||||
|
||||
# These three lines are suggested defs for autoconf (see the info pages).
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
HAVE_PLOTUTILS=@HAVE_PLOTUTILS@
|
||||
|
||||
######################################################################
|
||||
# See Makefile.common for information about these variables.
|
||||
INDEP_SRCS := helperfuncs.c
|
||||
CLEAN_SUBDIRS := guile
|
||||
######################################################################
|
||||
|
||||
all: default
|
||||
|
||||
# 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
|
||||
|
||||
default: guile
|
||||
|
||||
ifeq (${HAVE_PLOTUTILS},1)
|
||||
guile: plot.preproc.h ${OBJS}
|
||||
else
|
||||
guile: ${OBJS}
|
||||
endif
|
||||
@cd guile && $(MAKE) default
|
||||
|
||||
DIST_TRASH += plot.preproc.h
|
||||
|
||||
plot.preproc.h: /usr/include/plot.h
|
||||
cp /usr/include/plot.h plot.preproc.h
|
||||
echo "#include <plot.h>" | gcc -E - > plot.preproc.h
|
||||
|
||||
.PHONY: default guile
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# End:
|
||||
# Makefile -- makefile for gnucash
|
||||
# Copyright (C) 1997 Robin Clark
|
||||
# Copyright (C) 1998 Rob Browning <rlb@cs.utexas.edu>
|
||||
@ -41,6 +198,19 @@ CPU = @target_cpu@
|
||||
|
||||
LIBS=@LIBS@
|
||||
|
||||
OPT_STYLE_INSTALL=@OPT_STYLE_INSTALL@
|
||||
ifeq (${OPT_STYLE_INSTALL},0)
|
||||
export GNC_DOCDIR=${prefix}/doc/gnucash
|
||||
export GNC_BINDIR=${prefix}/bin
|
||||
export GNC_CONFIGDIR=${sysconfdir}/gnucash
|
||||
export GNC_SHAREDIR=${datadir}/gnucash
|
||||
else
|
||||
export GNC_DOCDIR=${prefix}/doc
|
||||
export GNC_BINDIR=${prefix}/bin
|
||||
export GNC_CONFIGDIR=${sysconfdir}
|
||||
export GNC_SHAREDIR=${datadir}
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# Description of targets:
|
||||
#
|
||||
@ -68,6 +238,7 @@ build-flavor:
|
||||
@cd lib; $(MAKE) ${FLAVOR}
|
||||
@cd src; $(MAKE) ${FLAVOR}
|
||||
ln -sf gnucash.${FLAVOR} gnucash.bin
|
||||
ln -sf gnucash.${FLAVOR} gnucash-shell
|
||||
(cd share && ln -sf ../src/scm scm)
|
||||
|
||||
motif:
|
||||
@ -96,9 +267,8 @@ clean:
|
||||
distclean: clean
|
||||
rm -f Makefile *~ *.o *.bak share/scm gnucash.bin
|
||||
rm -f gnucash.motif gnucash.motif.static \
|
||||
gnucash.gnome gnucash.gnome.static gnucash.qt
|
||||
gnucash.gnome gnucash.gnome.static gnucash.qt gnucash-shell
|
||||
rm -f config.cache config.log config.status config.h
|
||||
rm -f src/guile/path-defaults.h
|
||||
@cd lib; $(MAKE) distclean
|
||||
@cd src; $(MAKE) distclean
|
||||
|
||||
@ -107,104 +277,73 @@ tagsfiles := $(shell find -name "*.[ch]")
|
||||
TAGS: ${tagsfiles}
|
||||
etags ${tagsfiles}
|
||||
|
||||
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.
|
||||
rm -f gnucash.${FLAVOR} src/guile/path-defaults.h
|
||||
${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) gnucash.${FLAVOR} ${GNC_BINDIR}/gnucash.${FLAVOR}
|
||||
(cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash)
|
||||
|
||||
install-private:
|
||||
@mkdir -p ${BINDIR}
|
||||
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 BINDIR=${BINDIR} install-bin
|
||||
-[ -e gnucash.qt ] && ${MAKE} FLAVOR=qt GNC_BINDIR=${GNC_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
|
||||
${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 BINDIR=${BINDIR} install-bin
|
||||
-[ -e gnucash.motif ] && ${MAKE} FLAVOR=motif BINDIR=${BINDIR} install-bin
|
||||
${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 ${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 \
|
||||
-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 $(prefix)/toolbar
|
||||
# $(INSTALL_DATA) toolbar/*.xpm $(prefix)/toolbar
|
||||
|
||||
@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
|
||||
@mkdir -p ${GNC_DOCDIR}
|
||||
$(INSTALL_DATA) Docs/*.html ${GNC_DOCDIR}
|
||||
$(INSTALL_DATA) Docs/*.gif ${GNC_DOCDIR}
|
||||
# $(INSTALL_DATA) Docs/*.jpg ${GNC_DOCDIR}
|
||||
$(INSTALL_DATA) Docs/*.xpm ${GNC_DOCDIR}
|
||||
@mkdir -p ${GNC_DOCDIR}/logos
|
||||
$(INSTALL_DATA) Docs/logos/*.* ${GNC_DOCDIR}/logos
|
||||
|
||||
# Config directory
|
||||
@mkdir -p ${CONFIGDIR}
|
||||
@mkdir -p ${GNC_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; \
|
||||
mkdir -p ${GNC_CONFIGDIR}/$$dest; \
|
||||
done
|
||||
|
||||
# Files
|
||||
for file in `find etc/ -type f`; do \
|
||||
dest=`echo $$file | cut -c 5-` \
|
||||
${INSTALL_DATA} $$file ${CONFIGDIR}/$$dest; \
|
||||
${INSTALL_DATA} $$file ${GNC_CONFIGDIR}/$$dest; \
|
||||
done
|
||||
|
||||
# Share directory
|
||||
@mkdir -p ${SHAREDIR}
|
||||
@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 ${SHAREDIR}/scm/$$dest; \
|
||||
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 ${SHAREDIR}/scm/$$dest; \
|
||||
${INSTALL_DATA} $$file ${GNC_SHAREDIR}/scm/$$dest; \
|
||||
done
|
||||
|
||||
.PHONY: default install-private install motif motif-static gnome gnome-static qt
|
||||
|
@ -61,4 +61,6 @@
|
||||
#undef USE_XMHTML
|
||||
#endif
|
||||
|
||||
#undef HAVE_PLOTUTILS
|
||||
|
||||
#endif
|
||||
|
71
configure.in
71
configure.in
@ -1,14 +1,39 @@
|
||||
AC_INIT(src/motif/main.c)
|
||||
AC_INIT(src/guile/gnucash.h)
|
||||
|
||||
### check for various programs, and stuff (do this first because later
|
||||
### commands depend on them):
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
### Set up all the initial variable values...
|
||||
|
||||
# *******************************************
|
||||
# * figure out the configure options:
|
||||
CFLAGS="${CFLAGS} -O2 -Wall"
|
||||
|
||||
# some plything option lists
|
||||
# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects"
|
||||
# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline"
|
||||
# CFLAGS="-g -Wall -ansi -pedantic"
|
||||
|
||||
LIBS="$LIBS -lm"
|
||||
|
||||
# We're going to set up our own X configure variables. These are only
|
||||
# used in side configure. At the end, we use them to set X_LIBS.
|
||||
# This allows us to be careful about libarary ordering, in case that's
|
||||
# important.
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
X_LIBS="$X_LIBS -lXext -lXmu -lXt -lX11"
|
||||
MOTIF_LIBS="-lXm"
|
||||
|
||||
# *******************************************
|
||||
# * figure out the configure options:
|
||||
|
||||
AC_ARG_ENABLE( debug,
|
||||
[ --enable-debug compile with debugging flags set],
|
||||
CFLAGS="${CFLAGS} -g -Wall"
|
||||
@ -67,21 +92,14 @@ AC_ARG_WITH( gnome-libraries,
|
||||
[ --with-gnome-libraries=DIR specify where to look for gnome libs],
|
||||
X_LIBS="${X_LIBS} -L$with_gnome_libraries" )
|
||||
|
||||
# *******************************************
|
||||
# check for various programs, and stuff:
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_MAKE_SET
|
||||
AC_ARG_WITH( opt-style-install,
|
||||
[ --with-opt-style-install install everything in subdirs of --prefix],
|
||||
OPT_STYLE_INSTALL=1,
|
||||
OPT_STYLE_INSTALL=0)
|
||||
AC_SUBST(OPT_STYLE_INSTALL)
|
||||
|
||||
# *******************************************
|
||||
# check for UI libs:
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
LIBS="-lm"
|
||||
# the XmHTML widget needs libz, libjpeg, libpng and libm
|
||||
# it also uses #ifdef's not #if's so DONT #def to zero.
|
||||
AC_CHECK_LIB(z, deflateEnd,
|
||||
@ -108,11 +126,13 @@ AC_CHECK_LIB(XmHTML, XmHTMLTextScrollToLine,
|
||||
XMHTML_TARGET=default
|
||||
XMHTML_INC=/lib/XmHTML-1.1.0/src
|
||||
LIBS="-L $srcdir/lib/XmHTML-1.1.0 $LIBS" ,
|
||||
-lXm -L $x_libraries $X_LIBS -lXext -lXt -lX11)
|
||||
$X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS $X_LIBS)
|
||||
|
||||
AC_SUBST(XMHTML_TARGET)
|
||||
AC_SUBST(XMHTML_INC)
|
||||
|
||||
### Guile
|
||||
|
||||
# Set GUILELIBS according to the set of libraries needed to link
|
||||
# with guile.
|
||||
AC_CHECK_LIB(guile, gh_enter,
|
||||
@ -127,9 +147,24 @@ AC_CHECK_LIB(guile, gh_enter,
|
||||
)
|
||||
AC_SUBST(GUILELIBS)
|
||||
|
||||
### Plotutils
|
||||
|
||||
AC_CHECK_LIB(plot, openpl,
|
||||
AC_DEFINE(HAVE_PLOTUTILS,1)
|
||||
HAVE_PLOTUTILS=1
|
||||
LIBS="-lplot $LIBS"
|
||||
X_LIBS="-lXaw $X_LIBS",
|
||||
,
|
||||
$X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS -lXaw $X_LIBS)
|
||||
|
||||
# We need this in at least one of the Makefile.in's
|
||||
AC_SUBST(HAVE_PLOTUTILS)
|
||||
|
||||
AC_SUBST(MOTIF_LIBS)
|
||||
|
||||
# *******************************************
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile src/engine/Makefile src/guile/Makefile src/gnome/Makefile src/motif/Makefile src/qt/Makefile src/register/Makefile src/reports/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile)
|
||||
AC_OUTPUT(Makefile src/Makefile src/engine/Makefile src/guile/Makefile src/gnome/Makefile src/motif/Makefile src/qt/Makefile src/register/Makefile src/reports/Makefile src/swig/Makefile src/swig/guile/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile)
|
||||
|
||||
chmod +x gnucash
|
||||
|
0
src/scm/graph.scm
Normal file
0
src/scm/graph.scm
Normal file
@ -1,81 +0,0 @@
|
||||
|
||||
|
||||
# FIXME: This Makefile is crap. Switch to Makefile.in, and clean this
|
||||
# up...
|
||||
|
||||
SWIG_FILTER := %P.h %/util.h
|
||||
SWIG_HDRS := $(filter-out ${SWIG_FILTER},$(wildcard ../engine/*.h)) \
|
||||
$(filter-out ${SWIG_FILTER},$(wildcard ../guile/gnucash.h))
|
||||
|
||||
# Because Swig's include mechanism is not too smart.
|
||||
SWIG_BASENAMES := $(notdir ${SWIG_HDRS})
|
||||
|
||||
CC := gcc
|
||||
|
||||
CFLAGS := -I.. \
|
||||
-I../.. \
|
||||
-I../engine \
|
||||
-I../register \
|
||||
-I../guile \
|
||||
-I./../../include \
|
||||
-I/usr/include/readline \
|
||||
-I/usr/lib/perl5/i386-linux/5.004/CORE
|
||||
|
||||
CFLAGS += -O2 -Wall -Wno-unused
|
||||
|
||||
LIBENG := ../engine/obj/*.o ../gnome/obj/gnome/*.o
|
||||
|
||||
all: guile perl5
|
||||
|
||||
# This is .PHONY because it has to be re-generated *every* time. Who
|
||||
# knows when headers are added to the engine dir?
|
||||
gnucash.i:
|
||||
@echo "%module gnucash" > gnucash.i
|
||||
@echo "%{" >> gnucash.i
|
||||
@($(foreach hdr,${SWIG_BASENAMES},echo "#include <${hdr}>"; )) >> gnucash.i
|
||||
@echo "%}" >> gnucash.i
|
||||
@($(foreach hdr,${SWIG_BASENAMES},echo %include ${hdr}; )) >> gnucash.i
|
||||
.PHONY: gnucash.i
|
||||
TRASH += gnucash.i
|
||||
|
||||
%_wrap.c: gnucash.i
|
||||
|
||||
##### Guile
|
||||
|
||||
guile: guile/gnucash-guile_wrap.o
|
||||
.PHONY: guile
|
||||
|
||||
##### Guile
|
||||
|
||||
gnucash-guile: gnucash-guile.o gnucash-guile_wrap.o $(LIBENG)
|
||||
|
||||
guile/gnucash-guile_wrap.c: gnucash.i ${SWIG_HDRS}
|
||||
swig -I../engine -I../guile -guile -o $@ $<
|
||||
perl -pi -e 's/^void gnucash\(/void gnucash_swig_init\(/' \
|
||||
guile/gnucash-guile_wrap.c
|
||||
|
||||
guile/gnucash-guile: guile/gnucash-guile.o guile/gnucash-guile_wrap.o $(LIBENG)
|
||||
${CC} $^ -lguile -lqthreads -lreadline -lm -o $@
|
||||
TRASH += guile/gnucash-guile
|
||||
|
||||
##### Perl5
|
||||
|
||||
perl5: perl5/gnucash.so
|
||||
|
||||
perl5/gnucash.so: perl5/gnucash-perl5_wrap.c $(LIBENG)
|
||||
${CC} ${CFLAGS} -shared $^ -lm -o $@ -Dbool=char -fpic
|
||||
TRASH += perl5/gnucash.so
|
||||
|
||||
perl5/gnucash-perl5_wrap.c: gnucash.i ${SWIG_HDRS}
|
||||
swig -I../engine -perl5 -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ *.bak *.i ${TRASH}
|
||||
(cd guile && rm -f *.o *~ *.bak *_wrap.c *.doc)
|
||||
(cd perl5 && rm -f *.o *~ *.bak *_wrap.c *.doc *.pm)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 2
|
||||
# End:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
0
src/swig/Makefile.in
Normal file
0
src/swig/Makefile.in
Normal file
0
src/swig/guile/Makefile.in
Normal file
0
src/swig/guile/Makefile.in
Normal file
0
src/swig/helperfuncs.c
Normal file
0
src/swig/helperfuncs.c
Normal file
0
src/swig/helperfuncs.h
Normal file
0
src/swig/helperfuncs.h
Normal file
Loading…
Reference in New Issue
Block a user