aboutsummaryrefslogtreecommitdiff
path: root/src/makefile.unix
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-10-11 19:50:06 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-12-19 12:39:47 -0500
commit1466b8b78ad8cabf93ac3f65f5929213c5dd3c8f (patch)
tree0dc75b665913468ec2f81ab08b934e29b0e7b088 /src/makefile.unix
parent7e55c1ab650163011a690daf74cb1cc89bdd563b (diff)
Rework unit tests so test_bitcoin.cpp does not #include them all
Diffstat (limited to 'src/makefile.unix')
-rw-r--r--src/makefile.unix6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/makefile.unix b/src/makefile.unix
index a436f968bc..055f7ab297 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -6,7 +6,7 @@ USE_UPNP:=0
DEFS=-DNOPCH
-DEFS += $(addprefix -I,$(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
+DEFS += $(addprefix -I,$(CURDIR) $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
LIBS += $(addprefix -l,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
LMODE = dynamic
@@ -141,6 +141,8 @@ obj/nogui/%.o: %.cpp
bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
+TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp))
+
obj/test/%.o: test/%.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
@@ -148,7 +150,7 @@ obj/test/%.o: test/%.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
-test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
+test_bitcoin: $(TESTOBJS) $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
$(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
clean: