277 lines
5.9 KiB
Makefile
277 lines
5.9 KiB
Makefile
BUILT_SOURCES =
|
|
CLEANFILES =
|
|
EXTRA_DIST = LICENSE test scripts setup.py acprep valgrind.sh \
|
|
version sample.dat ledger.vim
|
|
|
|
# Files that are still only in the Ledger source tree (g200d919):
|
|
#
|
|
# amounts.cc
|
|
# py_amount.cc
|
|
# py_commodity.cc
|
|
# py_times.cc
|
|
# py_utils.cc
|
|
# pyinterp.cc
|
|
# pyledger.cc
|
|
#
|
|
# pyfstream.h
|
|
# pyinterp.h
|
|
# pyledger.h
|
|
# pyutils.h
|
|
# tuples.hpp
|
|
|
|
ESC_srcdir=`echo "$(srcdir)" | sed 's/\//\\\\\//g'`
|
|
ESC_builddir=`echo "$(top_builddir)" | sed 's/\//\\\\\//g'`
|
|
ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'`
|
|
|
|
dist-hook:
|
|
rm -fr .git
|
|
|
|
lib_LTLIBRARIES = libamounts.la libledger.la
|
|
|
|
libamounts_la_CPPFLAGS =
|
|
libamounts_la_SOURCES = \
|
|
utils.cc \
|
|
times.cc \
|
|
mask.cc \
|
|
binary.cc \
|
|
\
|
|
amount.cc \
|
|
commodity.cc \
|
|
balance.cc \
|
|
value.cc \
|
|
\
|
|
token.cc \
|
|
parser.cc \
|
|
op.cc \
|
|
expr.cc \
|
|
scope.cc \
|
|
format.cc \
|
|
option.cc
|
|
|
|
if HAVE_EXPAT
|
|
libamounts_la_CPPFLAGS += -DHAVE_EXPAT=1
|
|
endif
|
|
if HAVE_XMLPARSE
|
|
libamounts_la_CPPFLAGS += -DHAVE_XMLPARSE=1
|
|
endif
|
|
if HAVE_LIBOFX
|
|
libamounts_la_CPPFLAGS += -DHAVE_LIBOFX=1
|
|
endif
|
|
if HAVE_BOOST_PYTHON
|
|
libamounts_la_CPPFLAGS += -DUSE_BOOST_PYTHON=1
|
|
endif
|
|
if DEBUG
|
|
libamounts_la_CPPFLAGS += -DDEBUG_MODE
|
|
endif
|
|
|
|
libledger_la_CPPFLAGS = $(libamounts_la_CPPFLAGS)
|
|
libledger_la_SOURCES = \
|
|
journal.cc \
|
|
entry.cc \
|
|
xact.cc \
|
|
account.cc \
|
|
iterators.cc \
|
|
compare.cc \
|
|
\
|
|
textual.cc \
|
|
cache.cc \
|
|
emacs.cc \
|
|
qif.cc \
|
|
xml.cc \
|
|
csv.cc \
|
|
\
|
|
session.cc \
|
|
report.cc \
|
|
filters.cc \
|
|
output.cc \
|
|
help.cc \
|
|
\
|
|
derive.cc \
|
|
reconcile.cc \
|
|
quotes.cc
|
|
|
|
if HAVE_EXPAT
|
|
libledger_la_SOURCES += gnucash.cc
|
|
endif
|
|
if HAVE_XMLPARSE
|
|
libledger_la_SOURCES += gnucash.cc
|
|
endif
|
|
if HAVE_LIBOFX
|
|
libledger_la_SOURCES += ofx.cc
|
|
endif
|
|
|
|
libledger_la_LDFLAGS = -release 2.7.0
|
|
|
|
pkginclude_HEADERS = \
|
|
acconf.h \
|
|
system.hh \
|
|
fdstream.hpp \
|
|
utils.h \
|
|
flags.h \
|
|
hooks.h \
|
|
pushvar.h \
|
|
error.h \
|
|
times.h \
|
|
mask.h \
|
|
binary.h \
|
|
\
|
|
amount.h \
|
|
commodity.h \
|
|
balance.h \
|
|
balpair.h \
|
|
value.h \
|
|
\
|
|
token.h \
|
|
parser.h \
|
|
op.h \
|
|
expr.h \
|
|
scope.h \
|
|
predicate.h \
|
|
format.h \
|
|
option.h \
|
|
\
|
|
journal.h \
|
|
entry.h \
|
|
xact.h \
|
|
account.h \
|
|
iterators.h \
|
|
compare.h \
|
|
\
|
|
textual.h \
|
|
cache.h \
|
|
emacs.h \
|
|
qif.h \
|
|
xml.h \
|
|
csv.h \
|
|
gnucash.h \
|
|
ofx.h \
|
|
\
|
|
session.h \
|
|
report.h \
|
|
handler.h \
|
|
filters.h \
|
|
output.h \
|
|
help.h \
|
|
\
|
|
derive.h \
|
|
reconcile.h \
|
|
quotes.h \
|
|
\
|
|
ledger.h
|
|
|
|
if USE_PCH
|
|
nodist_libledger_la_SOURCES = system.hh.gch
|
|
|
|
BUILT_SOURCES += system.hh.gch
|
|
CLEANFILES += system.hh.gch
|
|
|
|
$(top_builddir)/system.hh.gch: $(srcdir)/system.hh $(top_builddir)/acconf.h
|
|
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
|
$(libledger_la_CPPFLAGS) \
|
|
$(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
|
-g -o $@ $(srcdir)/system.hh
|
|
endif
|
|
|
|
######################################################################
|
|
|
|
bin_PROGRAMS = ledger
|
|
|
|
ledger_CPPFLAGS = $(libledger_la_CPPFLAGS)
|
|
ledger_SOURCES = main.cc
|
|
ledger_LDADD = $(LIBOBJS) libamounts.la libledger.la
|
|
ledger_LDFLAGS = -static # for the sake of command-line speed
|
|
|
|
info_TEXINFOS = ledger.texi
|
|
|
|
dist_lisp_LISP = ledger.el timeclock.el
|
|
|
|
DISTCLEANFILES = ledger.elc timeclock.elc
|
|
|
|
######################################################################
|
|
|
|
if HAVE_BOOST_PYTHON
|
|
|
|
noinst_PROGRAMS = amounts.so
|
|
nodist_amounts_so_SOURCES = amounts.c
|
|
|
|
CLEANFILES += amounts.so
|
|
|
|
clean-local:
|
|
rm -fr build
|
|
|
|
PYLIBS = amounts gmp
|
|
|
|
amounts.so: amounts.cc libamounts.la
|
|
CFLAGS="$(CPPFLAGS) $(DEFAULT_INCLUDES) $(libamounts_la_CPPFLAGS)" \
|
|
LDFLAGS="$(LDFLAGS) -L. -L.libs" \
|
|
PYLIBS="$(PYLIBS)" SRCDIR="$(srcdir)" \
|
|
python $(srcdir)/setup.py build --build-lib=.
|
|
|
|
install-exec-hook:
|
|
CFLAGS="$(CPPFLAGS) $(DEFAULT_INCLUDES) $(libamounts_la_CPPFLAGS)" \
|
|
LDFLAGS="$(LDFLAGS) -L. -L.libs" \
|
|
PYLIBS="$(PYLIBS)" SRCDIR="$(srcdir)" \
|
|
python $(srcdir)/setup.py install --prefix=$(prefix)
|
|
|
|
endif
|
|
|
|
######################################################################
|
|
|
|
TESTS = UnitTests RegressionTests
|
|
if HAVE_BOOST_PYTHON
|
|
TESTS += PyUnitTests
|
|
endif
|
|
|
|
check_PROGRAMS = $(TESTS)
|
|
|
|
nodist_UnitTests_SOURCES = test/UnitTests.cc \
|
|
\
|
|
test/utility/t_utils.cc \
|
|
test/utility/t_times.cc \
|
|
test/numerics/t_commodity.cc \
|
|
test/numerics/t_amount.cc \
|
|
test/numerics/t_balance.cc \
|
|
test/numerics/t_expr.cc
|
|
|
|
UnitTests_CPPFLAGS = -I$(srcdir)/test $(libledger_la_CPPFLAGS)
|
|
UnitTests_LDFLAGS = $(LIBADD_DL)
|
|
UnitTests_LDADD = $(lib_LTLIBRARIES) -lcppunit
|
|
|
|
nodist_PyUnitTests_SOURCES = test/python/PyUnitTests.py
|
|
|
|
# jww (2007-05-10): This rule will not be triggered on systems that
|
|
# define an EXEEXT.
|
|
PyUnitTests: $(srcdir)/test/python/PyUnitTests.py
|
|
cat $(srcdir)/test/python/PyUnitTests.py \
|
|
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
|
|
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
|
chmod 755 $@
|
|
|
|
RegressionTests: $(srcdir)/test/regress.py
|
|
echo "python $(srcdir)/test/regress.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress" > $@
|
|
chmod 755 $@
|
|
|
|
fullcheck: check
|
|
MallocGuardEdges=1 \
|
|
MallocScribble=1 \
|
|
MallocPreScribble=1 \
|
|
MallocCheckHeapStart=100 \
|
|
MallocCheckHeapEach=100 \
|
|
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
|
$(srcdir)/valgrind.sh $(top_builddir)/UnitTests$(EXEEXT) --verify
|
|
|
|
######################################################################
|
|
|
|
DISTCLEANFILES += Doxyfile.gen
|
|
|
|
alldocs: ledger.info ledger.pdf doxygen-docs
|
|
|
|
$(top_builddir)/Doxyfile.gen: $(srcdir)/Doxyfile
|
|
cat $(srcdir)/Doxyfile \
|
|
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
|
|
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
|
|
|
doxygen-docs: $(top_builddir)/Doxyfile.gen
|
|
doxygen $(top_builddir)/Doxyfile.gen
|
|
|
|
# Makefile.am ends here
|