mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Partially revert f621326
: xCXXFLAGS
This commit is contained in:
parent
85a2229264
commit
a6cd0b08f6
@ -82,8 +82,11 @@ LIBS+= \
|
|||||||
|
|
||||||
|
|
||||||
DEBUGFLAGS=-g
|
DEBUGFLAGS=-g
|
||||||
CXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
|
|
||||||
$(DEBUGFLAGS) $(DEFS) $(HARDENING)
|
# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
|
||||||
|
# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
|
||||||
|
xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
|
||||||
|
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
|
||||||
|
|
||||||
OBJS= \
|
OBJS= \
|
||||||
obj/version.o \
|
obj/version.o \
|
||||||
@ -121,26 +124,26 @@ version.cpp: obj/build.h
|
|||||||
DEFS += -DHAVE_BUILD_INFO
|
DEFS += -DHAVE_BUILD_INFO
|
||||||
|
|
||||||
obj/%.o: %.cpp
|
obj/%.o: %.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) -MMD -o $@ $<
|
$(CXX) -c $(xCXXFLAGS) -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) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
$(CXX) $(xCXXFLAGS) -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) $(CXXFLAGS) -MMD -o $@ $<
|
$(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -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) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
|
$(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f bitcoind test_bitcoin
|
-rm -f bitcoind test_bitcoin
|
||||||
|
Loading…
Reference in New Issue
Block a user