Mercurial > hg > bitcoin
annotate src/makefile.unix @ 3660:ca9488dc3b38 draft
Remove BDB block database support
author | Pieter Wuille <pieter.wuille@gmail.com> |
---|---|
date | Tue, 16 Oct 2012 22:23:39 +0200 |
parents | 526ec2f104b0 |
children |
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 |
3366
f72159e57d72
Make IPv6 support buildtime-optional again (defaults to enabled)
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3346
diff
changeset
|
6 USE_IPV6:=1 |
744
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
7 |
3326
1eba64a373b9
Allow setting a different linker than compiler in makefile.unix
Matt Corallo <git@bluematt.me>
parents:
3241
diff
changeset
|
8 LINK:=$(CXX) |
1eba64a373b9
Allow setting a different linker than compiler in makefile.unix
Matt Corallo <git@bluematt.me>
parents:
3241
diff
changeset
|
9 |
3366
f72159e57d72
Make IPv6 support buildtime-optional again (defaults to enabled)
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3346
diff
changeset
|
10 DEFS=-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
|
11 |
2202
487d534d3d78
Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2198
diff
changeset
|
12 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
|
13 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
|
14 |
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
|
15 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
|
16 |
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
|
17 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
|
18 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
|
19 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
|
20 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
|
21 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
|
22 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
|
23 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
|
24 else |
8d8818ba9501
Bugfix: Support building test_bitcoin with shared-object boost test framework
Luke Dashjr <luke-jr+git@utopios.org>
parents:
1749
diff
changeset
|
25 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
|
26 endif |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
27 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
28 # 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
|
29 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
|
30 -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
|
31 -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
|
32 -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
|
33 -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
|
34 -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
|
35 -l db_cxx$(BDB_LIB_SUFFIX) \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
36 -l ssl \ |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
37 -l crypto |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
38 |
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
|
39 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
|
40 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
|
41 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
|
42 ifneq (${USE_UPNP}, -) |
744
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
43 LIBS += -l miniupnpc |
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
44 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
|
45 endif |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
46 |
3366
f72159e57d72
Make IPv6 support buildtime-optional again (defaults to enabled)
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3346
diff
changeset
|
47 ifneq (${USE_IPV6}, -) |
3368
6c276e1ce65f
Allow building with IPv6 support, but it disabled by default
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3366
diff
changeset
|
48 DEFS += -DUSE_IPV6=$(USE_IPV6) |
3366
f72159e57d72
Make IPv6 support buildtime-optional again (defaults to enabled)
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3346
diff
changeset
|
49 endif |
f72159e57d72
Make IPv6 support buildtime-optional again (defaults to enabled)
Luke Dashjr <luke-jr+git@utopios.org>
parents:
3346
diff
changeset
|
50 |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
51 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
|
52 -Wl,-B$(LMODE2) \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
53 -l z \ |
576
8ec6d5e778e5
Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents:
575
diff
changeset
|
54 -l dl \ |
8ec6d5e778e5
Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents:
575
diff
changeset
|
55 -l pthread |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
56 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
57 |
950
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
58 # Hardening |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
59 # 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
|
60 # |
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
|
61 # 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
|
62 # -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
|
63 # 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
|
64 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
|
65 |
950
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
66 # Stack Canaries |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
67 # 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
|
68 # 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
|
69 # 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
|
70 # 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
|
71 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
|
72 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
73 # 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
|
74 # 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
|
75 # which would later be jumped to. |
3209
73149efa1eb9
Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents:
3154
diff
changeset
|
76 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
|
77 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
78 # 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
|
79 # offered by some kernels. |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
80 # 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
|
81 ifdef PIE |
3209
73149efa1eb9
Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents:
3154
diff
changeset
|
82 HARDENING+=-fPIE |
73149efa1eb9
Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents:
3154
diff
changeset
|
83 LDHARDENING+=-pie |
950
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
84 endif |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
85 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
86 # -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
|
87 # 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
|
88 HARDENING+=-D_FORTIFY_SOURCE=2 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
89 # |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
90 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
91 |
1320 | 92 DEBUGFLAGS=-g |
2521
9ceab6bfe212
Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2503
diff
changeset
|
93 |
9ceab6bfe212
Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2503
diff
changeset
|
94 # 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
|
95 # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. |
3576
a5743df7dc38
Revert "Remove -Wformat* warnings from makefiles"
Wladimir J. van der Laan <laanwj@gmail.com>
parents:
3556
diff
changeset
|
96 xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ |
2521
9ceab6bfe212
Partially revert f621326: xCXXFLAGS
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2503
diff
changeset
|
97 $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
98 |
3209
73149efa1eb9
Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents:
3154
diff
changeset
|
99 # 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
|
100 # 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
|
101 xLDFLAGS=$(LDHARDENING) $(LDFLAGS) |
73149efa1eb9
Use linker-arguments only when linking
Giel van Schijndel <me@mortis.eu>
parents:
3154
diff
changeset
|
102 |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
103 OBJS= \ |
3412
e73f81944fd0
Refactor: move alert code from main to alert.cpp/h
Gavin Andresen <gavinandresen@gmail.com>
parents:
3368
diff
changeset
|
104 obj/alert.o \ |
2198
5fb54c6da76e
Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2169
diff
changeset
|
105 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
|
106 obj/checkpoints.o \ |
1731
4a2d4c136998
Network stack refactor
Pieter Wuille <pieter.wuille@gmail.com>
parents:
1597
diff
changeset
|
107 obj/netbase.o \ |
1911
a9190d020909
CAddrMan: stochastic address manager
Pieter Wuille <pieter.wuille@gmail.com>
parents:
1848
diff
changeset
|
108 obj/addrman.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
109 obj/crypter.o \ |
1580
d7f244465cd6
Add GetSecret() and GetKeys() to CKeyStore
Pieter Wuille <pieter.wuille@gmail.com>
parents:
1539
diff
changeset
|
110 obj/key.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
111 obj/db.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
112 obj/init.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
113 obj/irc.o \ |
689
9df222fa1ef1
move wallet code to separate file
Pieter Wuille <pieter.wuille@gmail.com>
parents:
576
diff
changeset
|
114 obj/keystore.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
115 obj/main.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
116 obj/net.o \ |
876
b5abe85df1e7
Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents:
874
diff
changeset
|
117 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
|
118 obj/bitcoinrpc.o \ |
1583
df45e8721f53
Key import and export
Pieter Wuille <pieter.wuille@gmail.com>
parents:
1580
diff
changeset
|
119 obj/rpcdump.o \ |
3121
7012c18c2ac1
Create new rpcnet module, and move 'getconnectioncount' RPC to it
Jeff Garzik <jgarzik@exmulti.com>
parents:
2655
diff
changeset
|
120 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
|
121 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
|
122 obj/rpcwallet.o \ |
3339
5ace33a78512
RPC, cosmetic: move more RPC code to new rpcblockchain.cpp module
Jeff Garzik <jgarzik@exmulti.com>
parents:
3338
diff
changeset
|
123 obj/rpcblockchain.o \ |
3154
6c1eeeb7e4c2
Implement raw transaction RPC calls
Gavin Andresen <gavinandresen@gmail.com>
parents:
3138
diff
changeset
|
124 obj/rpcrawtransaction.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
125 obj/script.o \ |
2489
ae569fd652ef
Split synchronization mechanisms from util.{h,cpp}
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2422
diff
changeset
|
126 obj/sync.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
127 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
|
128 obj/wallet.o \ |
2642
8bc3131c2449
Make testcases build, prevent windows symbol collision
Wladimir J. van der Laan <laanwj@gmail.com>
parents:
2640
diff
changeset
|
129 obj/walletdb.o \ |
3660
ca9488dc3b38
Remove BDB block database support
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3657
diff
changeset
|
130 obj/noui.o \ |
ca9488dc3b38
Remove BDB block database support
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3657
diff
changeset
|
131 obj/leveldb.o \ |
ca9488dc3b38
Remove BDB block database support
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3657
diff
changeset
|
132 obj/txdb.o |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
133 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
134 |
1320 | 135 all: bitcoind |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
136 |
3513
52c68434dafe
Give makefiles 'test' and 'check' targets to compile and run unit tests
Gavin Andresen <gavinandresen@gmail.com>
parents:
3412
diff
changeset
|
137 test check: test_bitcoin FORCE |
52c68434dafe
Give makefiles 'test' and 'check' targets to compile and run unit tests
Gavin Andresen <gavinandresen@gmail.com>
parents:
3412
diff
changeset
|
138 ./test_bitcoin |
52c68434dafe
Give makefiles 'test' and 'check' targets to compile and run unit tests
Gavin Andresen <gavinandresen@gmail.com>
parents:
3412
diff
changeset
|
139 |
3638
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
140 # |
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
141 # LevelDB support |
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
142 # |
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
143 LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a |
3660
ca9488dc3b38
Remove BDB block database support
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3657
diff
changeset
|
144 DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) |
3638
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
145 DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) |
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
146 leveldb/libleveldb.a: |
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
147 @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..; |
3639 | 148 obj/leveldb.o: leveldb/libleveldb.a |
3638
4c31c15d73af
Makefile integration of LevelDB
Pieter Wuille <pieter.wuille@gmail.com>
parents:
3576
diff
changeset
|
149 |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
150 # 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
|
151 -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
|
152 -include obj-test/*.P |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
153 |
2202
487d534d3d78
Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2198
diff
changeset
|
154 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
|
155 /bin/sh ../share/genbuild.sh obj/build.h |
2202
487d534d3d78
Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2198
diff
changeset
|
156 version.cpp: obj/build.h |
2198
5fb54c6da76e
Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2169
diff
changeset
|
157 DEFS += -DHAVE_BUILD_INFO |
5fb54c6da76e
Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2169
diff
changeset
|
158 |
1749
a16663dadac9
Compile with extra warnings turned on. And more makefile/code tidying up.
Gavin Andresen <gavinandresen@gmail.com>
parents:
1744
diff
changeset
|
159 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
|
160 $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
161 @cp $(@:%.o=%.d) $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
162 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
163 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
164 rm -f $(@:%.o=%.d) |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
165 |
2202
487d534d3d78
Fix build.h dependencies
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2198
diff
changeset
|
166 bitcoind: $(OBJS:obj/%=obj/%) |
3326
1eba64a373b9
Allow setting a different linker than compiler in makefile.unix
Matt Corallo <git@bluematt.me>
parents:
3241
diff
changeset
|
167 $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
168 |
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
|
169 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
|
170 |
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
|
171 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
|
172 $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
173 @cp $(@:%.o=%.d) $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
174 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
175 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
176 rm -f $(@:%.o=%.d) |
708
06d213590314
Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents:
689
diff
changeset
|
177 |
1749
a16663dadac9
Compile with extra warnings turned on. And more makefile/code tidying up.
Gavin Andresen <gavinandresen@gmail.com>
parents:
1744
diff
changeset
|
178 test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) |
3326
1eba64a373b9
Allow setting a different linker than compiler in makefile.unix
Matt Corallo <git@bluematt.me>
parents:
3241
diff
changeset
|
179 $(LINK) $(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
|
180 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
181 clean: |
1320 | 182 -rm -f bitcoind test_bitcoin |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
183 -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
|
184 -rm -f obj-test/*.o |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
185 -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
|
186 -rm -f obj-test/*.P |
3521
5d53d9270587
Update gitignore and Makefiles for build.h move from src/ to src/obj
Gavin Andresen <gavinandresen@gmail.com>
parents:
3513
diff
changeset
|
187 -rm -f obj/build.h |
2198
5fb54c6da76e
Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2169
diff
changeset
|
188 |
5fb54c6da76e
Build identification strings
Pieter Wuille <pieter.wuille@gmail.com>
parents:
2169
diff
changeset
|
189 FORCE: |