summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index acabc563..96db5db4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,21 @@
-CODE = amount.cc ledger.cc parse.cc gnucash.cc balance.cc main.cc
+define GNUCASH
+true
+endef
+
+CODE = amount.cc ledger.cc parse.cc balance.cc main.cc
+ifdef GNUCASH
+CODE := $(CODE) gnucash.cc
+endif
OBJS = $(patsubst %.cc,%.o,$(CODE))
CFLAGS = -Wall -ansi -pedantic
DFLAGS = -g
INCS = -I/usr/include/xmltok
-LIBS = -lgmpxx -lgmp -lpcre -lxmlparse
+LIBS = -lgmpxx -lgmp -lpcre
+ifdef GNUCASH
+LIBS := $(LIBS) -lxmlparse
+endif
all: make.deps ledger