diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-23 11:37:48 -0500 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-23 11:37:48 -0500 |
commit | ca9afa84017a756366e31f1f4be5c85f09a5dbc0 (patch) | |
tree | 2a659d6c215c5d0ccd4937ee12ea3f15a3a544b1 /src | |
parent | 1240a1b0a82e0e944a6fdcf6ff26001e1bd68904 (diff) |
Bugfix: Support building test_bitcoin with shared-object boost test framework
Diffstat (limited to 'src')
-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 3c6be3ee41..69ca0f7bf7 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -16,6 +16,8 @@ ifdef STATIC ifeq (${STATIC}, all) LMODE2 = static endif +else + TESTDEFS += -DBOOST_TEST_DYN_LINK endif # for boost 1.37, add -mt to the boost libraries @@ -124,14 +126,14 @@ bitcoind: $(OBJS:obj/%=obj/%) TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp)) obj/test/%.o: test/%.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS) + $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) clean: -rm -f bitcoind test_bitcoin |