aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-02-02 17:27:44 -0500
committerLuke Dashjr <luke-jr+git@utopios.org>2012-02-02 17:27:44 -0500
commitd1e56838dc067568cfce7bc85bdc228da58f2597 (patch)
tree0e148a286514dce78496b5b90c42733e0f63c8af
parent8f378e98c5121f4f5c4936ef879f208f5f95bb5e (diff)
Bugfix: Support building test_bitcoin with shared-object boost test framework
Conflicts: 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 6c48199546..9d97ae50ca 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
@@ -140,14 +142,14 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
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: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
- $(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