Support makefile.osx building test_bitcoin with dynamic boost
This commit is contained in:
parent
2a9b46cf4b
commit
341519523f
1 changed files with 16 additions and 9 deletions
|
@ -23,6 +23,8 @@ USE_UPNP:=1
|
||||||
LIBS= -dead_strip
|
LIBS= -dead_strip
|
||||||
ifdef STATIC
|
ifdef STATIC
|
||||||
# Build STATIC if you are redistributing the bitcoind binary
|
# Build STATIC if you are redistributing the bitcoind binary
|
||||||
|
TESTLIBS += \
|
||||||
|
$(DEPSDIR)/lib/libboost_unit_test_framework-mt.a
|
||||||
LIBS += \
|
LIBS += \
|
||||||
$(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \
|
$(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \
|
||||||
$(DEPSDIR)/lib/libboost_system-mt.a \
|
$(DEPSDIR)/lib/libboost_system-mt.a \
|
||||||
|
@ -30,8 +32,11 @@ LIBS += \
|
||||||
$(DEPSDIR)/lib/libboost_program_options-mt.a \
|
$(DEPSDIR)/lib/libboost_program_options-mt.a \
|
||||||
$(DEPSDIR)/lib/libboost_thread-mt.a \
|
$(DEPSDIR)/lib/libboost_thread-mt.a \
|
||||||
$(DEPSDIR)/lib/libssl.a \
|
$(DEPSDIR)/lib/libssl.a \
|
||||||
$(DEPSDIR)/lib/libcrypto.a
|
$(DEPSDIR)/lib/libcrypto.a \
|
||||||
|
-lz
|
||||||
else
|
else
|
||||||
|
TESTLIBS += \
|
||||||
|
-lboost_unit_test_framework-mt
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-ldb_cxx-4.8 \
|
-ldb_cxx-4.8 \
|
||||||
-lboost_system-mt \
|
-lboost_system-mt \
|
||||||
|
@ -39,7 +44,9 @@ LIBS += \
|
||||||
-lboost_program_options-mt \
|
-lboost_program_options-mt \
|
||||||
-lboost_thread-mt \
|
-lboost_thread-mt \
|
||||||
-lssl \
|
-lssl \
|
||||||
-lcrypto
|
-lcrypto \
|
||||||
|
-lz
|
||||||
|
TESTDEFS += -DBOOST_TEST_DYN_LINK
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL
|
DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DUSE_SSL
|
||||||
|
@ -81,7 +88,7 @@ all: bitcoind
|
||||||
|
|
||||||
# auto-generated dependencies:
|
# auto-generated dependencies:
|
||||||
-include obj/*.P
|
-include obj/*.P
|
||||||
-include obj/test/*.P
|
-include obj-test/*.P
|
||||||
|
|
||||||
obj/%.o: %.cpp
|
obj/%.o: %.cpp
|
||||||
$(CXX) -c $(CFLAGS) -MMD -o $@ $<
|
$(CXX) -c $(CFLAGS) -MMD -o $@ $<
|
||||||
|
@ -93,21 +100,21 @@ obj/%.o: %.cpp
|
||||||
bitcoind: $(OBJS:obj/%=obj/%)
|
bitcoind: $(OBJS:obj/%=obj/%)
|
||||||
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
||||||
|
|
||||||
TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp))
|
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
|
||||||
|
|
||||||
obj/test/%.o: test/%.cpp
|
obj-test/%.o: test/%.cpp
|
||||||
$(CXX) -c $(CFLAGS) -MMD -o $@ $<
|
$(CXX) -c $(TESTDEFS) $(CFLAGS) -MMD -o $@ $<
|
||||||
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
|
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
|
||||||
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
||||||
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
|
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
|
||||||
rm -f $(@:%.o=%.d)
|
rm -f $(@:%.o=%.d)
|
||||||
|
|
||||||
test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
|
test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
|
||||||
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a
|
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(TESTLIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f bitcoind test_bitcoin
|
-rm -f bitcoind test_bitcoin
|
||||||
-rm -f obj/*.o
|
-rm -f obj/*.o
|
||||||
-rm -f obj/test/*.o
|
-rm -f obj-test/*.o
|
||||||
-rm -f obj/*.P
|
-rm -f obj/*.P
|
||||||
-rm -f obj/test/*.P
|
-rm -f obj-test/*.P
|
||||||
|
|
Loading…
Reference in a new issue