aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-10-10 13:57:47 -0700
committerGavin Andresen <gavinandresen@gmail.com>2011-10-10 13:57:47 -0700
commit755e2819b059d3e9d8148c4802c6f12e7af3fad5 (patch)
treeaea2ed48ac1485429141600d8e925bb4e46b1a2f /src
parente44a00ae0d20ec6813280f1cb822a74b8de6d5a4 (diff)
parenta1e0bb5a09bee332cf85990d7d25e19aaeaf1323 (diff)
Merge pull request #578 from luke-jr/bitcoind_build_improvements
Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Diffstat (limited to 'src')
-rw-r--r--src/makefile.unix13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/makefile.unix b/src/makefile.unix
index 86558b3ecb..871aedd1ad 100644
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -2,8 +2,6 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
-CXX=g++
-
USE_UPNP:=0
DEFS=-DNOPCH
@@ -79,7 +77,8 @@ LIBS+= \
DEBUGFLAGS=-g
-CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING)
+CXXFLAGS=-O2
+xCXXFLAGS=-pthread -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
HEADERS = \
base58.h \
bignum.h \
@@ -124,24 +123,24 @@ all: bitcoind
-include obj/test/*.P
obj/nogui/%.o: %.cpp
- $(CXX) -c $(CXXFLAGS) -MMD -o $@ $<
+ $(CXX) -c $(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)
bitcoind: $(OBJS:obj/%=obj/nogui/%)
- $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
+ $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
obj/test/%.o: test/%.cpp
- $(CXX) -c $(CXXFLAGS) -MMD -o $@ $<
+ $(CXX) -c $(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) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS)
+ $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
clean:
-rm -f bitcoind test_bitcoin