diff options
| author | Gavin Andresen <[email protected]> | 2011-10-11 19:50:06 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-12-19 12:39:47 -0500 |
| commit | 1466b8b78ad8cabf93ac3f65f5929213c5dd3c8f (patch) | |
| tree | 0dc75b665913468ec2f81ab08b934e29b0e7b088 /src/makefile.unix | |
| parent | Collapse no-op ExtractAddress/ExtractAddressInner (diff) | |
| download | discoin-1466b8b78ad8cabf93ac3f65f5929213c5dd3c8f.tar.xz discoin-1466b8b78ad8cabf93ac3f65f5929213c5dd3c8f.zip | |
Rework unit tests so test_bitcoin.cpp does not #include them all
Diffstat (limited to 'src/makefile.unix')
| -rw-r--r-- | src/makefile.unix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/makefile.unix b/src/makefile.unix index a436f968b..055f7ab29 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: |