From 2c938c2219bb9d27830bb7412690887f6963d4af Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Tue, 22 Apr 2014 15:53:33 +0800 Subject: [PATCH] Fix Makefile The $(BIN) target needed to include the dependencies for header files included via main.cpp --- src/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) 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 $@ $< -- 2.20.1