summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 2 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index a89f0586..acabc563 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-CODE = amount.cc ledger.cc parse.cc gnucash.cc balance.cc
-ifndef LIBRARY
-CODE := $(CODE) main.cc
-endif
+CODE = amount.cc ledger.cc parse.cc gnucash.cc balance.cc main.cc
OBJS = $(patsubst %.cc,%.o,$(CODE))
@@ -10,27 +7,11 @@ DFLAGS = -g
INCS = -I/usr/include/xmltok
LIBS = -lgmpxx -lgmp -lpcre -lxmlparse
-ifdef LIBRARY
-
-CFLAGS := $(CFLAGS) -fpic
-
-all: make.deps libledger.so ledger
-
-libledger.so: $(OBJS)
- g++ $(CFLAGS) $(INCS) $(DFLAGS) -shared -fpic -o $@ $(OBJS) $(LIBS)
-
-ledger: main.cc
- g++ $(INCS) $(DFLAGS) -o $@ main.cc -L. -lledger
-
-else # LIBRARY
-
all: make.deps ledger
ledger: $(OBJS)
g++ $(CFLAGS) $(INCS) $(DFLAGS) -o $@ $(OBJS) $(LIBS)
-endif # LIBRARY
-
%.o: %.cc
g++ $(CFLAGS) $(INCS) $(DFLAGS) -c -o $@ $<
@@ -42,6 +23,6 @@ rebuild: clean deps all
deps: make.deps
make.deps: Makefile
- cc -M $(INCS) $(CODE) main.cc > $@
+ cc -M $(INCS) $(CODE) > $@
include make.deps