|
|
@ -82,9 +82,8 @@ LIBS+= \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEBUGFLAGS=-g |
|
|
|
DEBUGFLAGS=-g |
|
|
|
CXXFLAGS=-O2 |
|
|
|
CXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ |
|
|
|
xCXXFLAGS=-pthread -Wall -Wextra -Wno-invalid-offsetof -Wno-unused-parameter -Wformat -Wformat-security \ |
|
|
|
$(DEBUGFLAGS) $(DEFS) $(HARDENING) |
|
|
|
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OBJS= \ |
|
|
|
OBJS= \ |
|
|
|
obj/version.o \ |
|
|
|
obj/version.o \ |
|
|
@ -121,26 +120,26 @@ version.cpp: obj/build.h |
|
|
|
DEFS += -DHAVE_BUILD_INFO |
|
|
|
DEFS += -DHAVE_BUILD_INFO |
|
|
|
|
|
|
|
|
|
|
|
obj/%.o: %.cpp |
|
|
|
obj/%.o: %.cpp |
|
|
|
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< |
|
|
|
$(CXX) -c $(CXXFLAGS) -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) |
|
|
|
|
|
|
|
|
|
|
|
bitcoind: $(OBJS:obj/%=obj/%) |
|
|
|
bitcoind: $(OBJS:obj/%=obj/%) |
|
|
|
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) |
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(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 $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $< |
|
|
|
$(CXX) -c $(TESTDEFS) $(CXXFLAGS) -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) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) |
|
|
|
$(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) |
|
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
clean: |
|
|
|
-rm -f bitcoind test_bitcoin |
|
|
|
-rm -f bitcoind test_bitcoin |
|
|
|