From: Sam Moore Date: Tue, 22 Apr 2014 07:53:33 +0000 (+0800) Subject: Fix Makefile X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=2c938c2219bb9d27830bb7412690887f6963d4af;p=ipdf%2Fcode.git Fix Makefile The $(BIN) target needed to include the dependencies for header files included via main.cpp --- diff --git a/src/Makefile b/src/Makefile index 008a613..e4e2df5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,6 +31,7 @@ RM = rm -f BIN = ../bin/ipdf + all : $(BIN) single : DEF = -DREAL=0 @@ -45,14 +46,19 @@ double : $(BIN) tests/% : tests/%.cpp ../obj/tests/%.o $(LINKOBJ) $(CXX) -o $@.test $(LINKOBJ) ../obj/$@.o $(LIB) $(TESTRPATH) +-include $(DEPS) + runtests : tests/runtests.sh cd tests; ./runtests.sh $(BIN) : $(LINKOBJ) ../obj/$(MAIN) + echo $(LINKOBJ) @mkdir -p $(dir $@) $(CXX) -o $(BIN) $(LINKOBJ) ../obj/$(MAIN) $(LIB) $(MAINRPATH) +-include $(DEPS) + ../obj/%.o : %.cpp @mkdir -p $(dir $@) $(CXX) $(CFLAGS) $(DEF) -c -MMD -o $@ $<