annotate src/makefile.unix @ 3338:e1fa61ae32ff draft

RPC, cosmetic: move wallet-related RPCs to new rpcwallet.cpp module
author Jeff Garzik <jgarzik@exmulti.com>
date Tue, 21 Aug 2012 10:38:57 -0400
parents 5c64deed67d6
children 5ace33a78512
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
1 # Copyright (c) 2009-2010 Satoshi Nakamoto
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
2 # Distributed under the MIT/X11 software license, see the accompanying
3241
da170442bdb2 Replace all occurances of license.txt with COPYING, including naming the file COPYING.txt on Windows
Luke Dashjr <luke-jr+git@utopios.org>
parents: 3209
diff changeset
3 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
4
744
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
5 USE_UPNP:=0
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
6
2655
f8cb8194035a Define BOOST_SPIRIT_THREADSAFE in all makefiles
Jeff Garzik <jgarzik@exmulti.com>
parents: 2642
diff changeset
7 DEFS=-DUSE_IPV6 -DBOOST_SPIRIT_THREADSAFE
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
8
2202
487d534d3d78 Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2198
diff changeset
9 DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
1848
0da4765d5278 Properly include $*_LIB_PATH in makefile.unix
Matt Corallo <matt@bluematt.me>
parents: 1780
diff changeset
10 LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
11
2323
9fc52dc07f53 Define TEST_DATA_DIR so unit tests can be run from any current working directory
Gavin Andresen <gavinandresen@gmail.com>
parents: 2275
diff changeset
12 TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
9fc52dc07f53 Define TEST_DATA_DIR so unit tests can be run from any current working directory
Gavin Andresen <gavinandresen@gmail.com>
parents: 2275
diff changeset
13
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
14 LMODE = dynamic
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
15 LMODE2 = dynamic
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
16 ifdef STATIC
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
17 LMODE = static
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
18 ifeq (${STATIC}, all)
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
19 LMODE2 = static
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
20 endif
1779
8d8818ba9501 Bugfix: Support building test_bitcoin with shared-object boost test framework
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1749
diff changeset
21 else
8d8818ba9501 Bugfix: Support building test_bitcoin with shared-object boost test framework
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1749
diff changeset
22 TESTDEFS += -DBOOST_TEST_DYN_LINK
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
23 endif
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
24
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
25 # for boost 1.37, add -mt to the boost libraries
1848
0da4765d5278 Properly include $*_LIB_PATH in makefile.unix
Matt Corallo <matt@bluematt.me>
parents: 1780
diff changeset
26 LIBS += \
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
27 -Wl,-B$(LMODE) \
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
28 -l boost_system$(BOOST_LIB_SUFFIX) \
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
29 -l boost_filesystem$(BOOST_LIB_SUFFIX) \
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
30 -l boost_program_options$(BOOST_LIB_SUFFIX) \
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
31 -l boost_thread$(BOOST_LIB_SUFFIX) \
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
32 -l db_cxx$(BDB_LIB_SUFFIX) \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
33 -l ssl \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
34 -l crypto
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
35
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
36 ifndef USE_UPNP
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
37 override USE_UPNP = -
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
38 endif
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
39 ifneq (${USE_UPNP}, -)
744
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
40 LIBS += -l miniupnpc
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
41 DEFS += -DUSE_UPNP=$(USE_UPNP)
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
42 endif
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
43
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
44 LIBS+= \
1409
2526d1bab1db Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1381
diff changeset
45 -Wl,-B$(LMODE2) \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
46 -l z \
576
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
47 -l dl \
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
48 -l pthread
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
49
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
50
950
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
51 # Hardening
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
52 # Make some classes of vulnerabilities unexploitable in case one is discovered.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
53 #
1421
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
54 # This is a workaround for Ubuntu bug #691722, the default -fstack-protector causes
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
55 # -fstack-protector-all to be ignored unless -fno-stack-protector is used first.
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
56 # see: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
57 HARDENING=-fno-stack-protector
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
58
950
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
59 # Stack Canaries
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
60 # Put numbers at the beginning of each stack frame and check that they are the same.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
61 # If a stack buffer if overflowed, it writes over the canary number and then on return
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
62 # when that number is checked, it won't be the same and the program will exit with
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
63 # a "Stack smashing detected" error instead of being exploited.
1421
a56a8bf3076e Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded.
cjdelisle <calebdelisle@lavabit.com>
parents: 1418
diff changeset
64 HARDENING+=-fstack-protector-all -Wstack-protector
950
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
65
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
66 # Make some important things such as the global offset table read only as soon as
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
67 # the dynamic linker is finished building it. This will prevent overwriting of addresses
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
68 # which would later be jumped to.
3209
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
69 LDHARDENING+=-Wl,-z,relro -Wl,-z,now
950
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
70
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
71 # Build position independent code to take advantage of Address Space Layout Randomization
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
72 # offered by some kernels.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
73 # see doc/build-unix.txt for more information.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
74 ifdef PIE
3209
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
75 HARDENING+=-fPIE
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
76 LDHARDENING+=-pie
950
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
77 endif
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
78
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
79 # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
80 # the source such overflowing a statically defined buffer.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
81 HARDENING+=-D_FORTIFY_SOURCE=2
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
82 #
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
83
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
84
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
85 DEBUGFLAGS=-g
2521
9ceab6bfe212 Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2503
diff changeset
86
9ceab6bfe212 Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2503
diff changeset
87 # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
9ceab6bfe212 Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2503
diff changeset
88 # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
9ceab6bfe212 Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2503
diff changeset
89 xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
9ceab6bfe212 Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2503
diff changeset
90 $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
91
3209
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
92 # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
93 # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
94 xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
95
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
96 OBJS= \
2198
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
97 obj/version.o \
1539
6a0bd31000b1 Moved checkpoints out of main, to prep for using them to help prevent DoS attacks
Gavin Andresen <gavinandresen@gmail.com>
parents: 1421
diff changeset
98 obj/checkpoints.o \
1731
4a2d4c136998 Network stack refactor
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1597
diff changeset
99 obj/netbase.o \
1911
a9190d020909 CAddrMan: stochastic address manager
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1848
diff changeset
100 obj/addrman.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
101 obj/crypter.o \
1580
d7f244465cd6 Add GetSecret() and GetKeys() to CKeyStore
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1539
diff changeset
102 obj/key.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
103 obj/db.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
104 obj/init.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
105 obj/irc.o \
689
9df222fa1ef1 move wallet code to separate file
Pieter Wuille <pieter.wuille@gmail.com>
parents: 576
diff changeset
106 obj/keystore.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
107 obj/main.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
108 obj/net.o \
876
b5abe85df1e7 Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents: 874
diff changeset
109 obj/protocol.o \
1294
8c70236c9f87 assure that base bitcoind and bitcoin still build
Wladimir J. van der Laan <laanwj@gmail.com>
parents: 901
diff changeset
110 obj/bitcoinrpc.o \
1583
df45e8721f53 Key import and export
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1580
diff changeset
111 obj/rpcdump.o \
3121
7012c18c2ac1 Create new rpcnet module, and move 'getconnectioncount' RPC to it
Jeff Garzik <jgarzik@exmulti.com>
parents: 2655
diff changeset
112 obj/rpcnet.o \
3333
5c64deed67d6 RPC, cosmetic: Create rpcmining.cpp as new home for mining-related RPC code
Jeff Garzik <jgarzik@exmulti.com>
parents: 3241
diff changeset
113 obj/rpcmining.o \
3338
e1fa61ae32ff RPC, cosmetic: move wallet-related RPCs to new rpcwallet.cpp module
Jeff Garzik <jgarzik@exmulti.com>
parents: 3333
diff changeset
114 obj/rpcwallet.o \
3154
6c1eeeb7e4c2 Implement raw transaction RPC calls
Gavin Andresen <gavinandresen@gmail.com>
parents: 3138
diff changeset
115 obj/rpcrawtransaction.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
116 obj/script.o \
2489
ae569fd652ef Split synchronization mechanisms from util.{h,cpp}
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2422
diff changeset
117 obj/sync.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
118 obj/util.o \
2155
8c79f3b6cd53 Move from noui.h / ui.h to one ui_interface.h with dummy implementation for the daemon.
Wladimir J. van der Laan <laanwj@gmail.com>
parents: 2082
diff changeset
119 obj/wallet.o \
2642
8bc3131c2449 Make testcases build, prevent windows symbol collision
Wladimir J. van der Laan <laanwj@gmail.com>
parents: 2640
diff changeset
120 obj/walletdb.o \
8bc3131c2449 Make testcases build, prevent windows symbol collision
Wladimir J. van der Laan <laanwj@gmail.com>
parents: 2640
diff changeset
121 obj/noui.o
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
122
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
123
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
124 all: bitcoind
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
125
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
126 # auto-generated dependencies:
1749
a16663dadac9 Compile with extra warnings turned on. And more makefile/code tidying up.
Gavin Andresen <gavinandresen@gmail.com>
parents: 1744
diff changeset
127 -include obj/*.P
1780
e2560d4a0650 Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1779
diff changeset
128 -include obj-test/*.P
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
129
2202
487d534d3d78 Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2198
diff changeset
130 obj/build.h: FORCE
2586
42335ead6346 Add /bin/sh to bitcoin-qt.pro - as some filesystems don't have the execute flag.
R E Broadley <rebroad+github@gmail.com>
parents: 2521
diff changeset
131 /bin/sh ../share/genbuild.sh obj/build.h
2202
487d534d3d78 Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2198
diff changeset
132 version.cpp: obj/build.h
2198
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
133 DEFS += -DHAVE_BUILD_INFO
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
134
1749
a16663dadac9 Compile with extra warnings turned on. And more makefile/code tidying up.
Gavin Andresen <gavinandresen@gmail.com>
parents: 1744
diff changeset
135 obj/%.o: %.cpp
3138
8fcd9c8a811a Work around a distcc bug where -MMD output isn't copied.
Matt Corallo <matt@bluematt.me>
parents: 3121
diff changeset
136 $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
137 @cp $(@:%.o=%.d) $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
138 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
139 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
140 rm -f $(@:%.o=%.d)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
141
2202
487d534d3d78 Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2198
diff changeset
142 bitcoind: $(OBJS:obj/%=obj/%)
3209
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
143 $(CXX) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
144
1780
e2560d4a0650 Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1779
diff changeset
145 TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
1597
12cf0a8687a4 Rework unit tests so test_bitcoin.cpp does not #include them all
Gavin Andresen <gavinandresen@gmail.com>
parents: 1583
diff changeset
146
1780
e2560d4a0650 Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1779
diff changeset
147 obj-test/%.o: test/%.cpp
3138
8fcd9c8a811a Work around a distcc bug where -MMD output isn't copied.
Matt Corallo <matt@bluematt.me>
parents: 3121
diff changeset
148 $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
149 @cp $(@:%.o=%.d) $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
150 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
151 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
152 rm -f $(@:%.o=%.d)
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
153
1749
a16663dadac9 Compile with extra warnings turned on. And more makefile/code tidying up.
Gavin Andresen <gavinandresen@gmail.com>
parents: 1744
diff changeset
154 test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
3209
73149efa1eb9 Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents: 3154
diff changeset
155 $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(xLDFLAGS) $(LIBS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
156
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
157 clean:
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
158 -rm -f bitcoind test_bitcoin
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
159 -rm -f obj/*.o
1780
e2560d4a0650 Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1779
diff changeset
160 -rm -f obj-test/*.o
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
161 -rm -f obj/*.P
1780
e2560d4a0650 Rename src/obj/test to src/obj-test to workaround bug in older GNU Make
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1779
diff changeset
162 -rm -f obj-test/*.P
2198
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
163 -rm -f src/build.h
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
164
5fb54c6da76e Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents: 2169
diff changeset
165 FORCE: