aboutsummaryrefslogtreecommitdiff
path: root/src/makefile.osx
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-01-23 15:58:06 -0500
committerLuke Dashjr <luke-jr+git@utopios.org>2012-02-02 17:34:29 -0500
commit22388eac08a4a543686c5402ca7ec22336e53468 (patch)
tree44e62759f8cf5b962a9ff5b7bae34e8649fcebf8 /src/makefile.osx
parent1677743fca631f8fb970fe917866dd982c6ddd40 (diff)
downloadbitcoin-22388eac08a4a543686c5402ca7ec22336e53468.tar.xz
Support makefile.osx building test_bitcoin with dynamic boost
Diffstat (limited to 'src/makefile.osx')
-rw-r--r--src/makefile.osx21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/makefile.osx b/src/makefile.osx
index de71887935..cbd51b049f 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -22,6 +22,8 @@ USE_UPNP:=1
LIBS= -dead_strip
ifdef STATIC
# Build STATIC if you are redistributing the bitcoind binary
+TESTLIBS += \
+ $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a
LIBS += \
$(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system-mt.a \
@@ -29,8 +31,11 @@ LIBS += \
$(DEPSDIR)/lib/libboost_program_options-mt.a \
$(DEPSDIR)/lib/libboost_thread-mt.a \
$(DEPSDIR)/lib/libssl.a \
- $(DEPSDIR)/lib/libcrypto.a
+ $(DEPSDIR)/lib/libcrypto.a \
+ -lz
else
+TESTLIBS += \
+ -lboost_unit_test_framework-mt
LIBS += \
-ldb_cxx-4.8 \
-lboost_system-mt \
@@ -38,7 +43,9 @@ LIBS += \
-lboost_program_options-mt \
-lboost_thread-mt \
-lssl \
- -lcrypto
+ -lcrypto \
+ -lz
+TESTDEFS += -DBOOST_TEST_DYN_LINK
endif
DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL
@@ -98,7 +105,7 @@ all: bitcoind
# auto-generated dependencies:
-include obj/nogui/*.P
--include obj/test/*.P
+-include obj-test/*.P
obj/nogui/%.o: %.cpp
$(CXX) -c $(CFLAGS) -MMD -o $@ $<
@@ -111,20 +118,20 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
obj/test/%.o: test/%.cpp
- $(CXX) -c $(CFLAGS) -MMD -o $@ $<
+ $(CXX) -c $(TESTDEFS) $(CFLAGS) -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) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a
+ $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(TESTLIBS)
clean:
-rm -f bitcoind test_bitcoin
-rm -f obj/*.o
-rm -f obj/nogui/*.o
- -rm -f obj/test/*.o
+ -rm -f obj-test/*.o
-rm -f obj/*.P
-rm -f obj/nogui/*.P
- -rm -f obj/test/*.P
+ -rm -f obj-test/*.P