annotate src/makefile.unix @ 1597:12cf0a8687a4 draft

Rework unit tests so test_bitcoin.cpp does not #include them all
author Gavin Andresen <gavinandresen@gmail.com>
date Tue, 11 Oct 2011 19:50:06 -0400
parents df45e8721f53
children 4a2d4c136998
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
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
3 # file license.txt or http://www.opensource.org/licenses/mit-license.php.
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
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
7 DEFS=-DNOPCH
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
1597
12cf0a8687a4 Rework unit tests so test_bitcoin.cpp does not #include them all
Gavin Andresen <gavinandresen@gmail.com>
parents: 1583
diff changeset
9 DEFS += $(addprefix -I,$(CURDIR) $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_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
10 LIBS += $(addprefix -l,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
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
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
12 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
13 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
14 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
15 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
16 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
17 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
18 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
19 endif
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
20
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
21 # for boost 1.37, add -mt to the boost libraries
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
22 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
23 -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
24 -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
25 -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
26 -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
27 -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
28 -l db_cxx$(BDB_LIB_SUFFIX) \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
29 -l ssl \
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
30 -l crypto
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
31
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
32 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
33 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
34 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
35 ifneq (${USE_UPNP}, -)
744
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
36 LIBS += -l miniupnpc
e98b41d99e48 Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents: 726
diff changeset
37 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
38 endif
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
39
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
40 ifneq (${USE_SSL}, 0)
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 DEFS += -DUSE_SSL
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 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
43
575
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.
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
69 HARDENING+=-Wl,-z,relro -Wl,-z,now
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
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
75 HARDENING+=-fPIE -pie
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
76 endif
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 # -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
79 # 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
80 HARDENING+=-D_FORTIFY_SOURCE=2
e5d23800c530 Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents: 901
diff changeset
81 #
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
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
84 DEBUGFLAGS=-g
1416
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
85 CXXFLAGS=-O2
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
86 xCXXFLAGS=-pthread -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
87 HEADERS = \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
88 base58.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
89 bignum.h \
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
90 checkpoints.h \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
91 crypter.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
92 db.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
93 headers.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
94 init.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
95 irc.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
96 key.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
97 keystore.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
98 main.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
99 net.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
100 noui.h \
876
b5abe85df1e7 Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents: 874
diff changeset
101 protocol.h \
1294
8c70236c9f87 assure that base bitcoind and bitcoin still build
Wladimir J. van der Laan <laanwj@gmail.com>
parents: 901
diff changeset
102 bitcoinrpc.h \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
103 script.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
104 serialize.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
105 strlcpy.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
106 uint256.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
107 util.h \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
108 wallet.h
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
109
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
110 OBJS= \
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
111 obj/checkpoints.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
112 obj/crypter.o \
1580
d7f244465cd6 Add GetSecret() and GetKeys() to CKeyStore
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1539
diff changeset
113 obj/key.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
114 obj/db.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
115 obj/init.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
116 obj/irc.o \
689
9df222fa1ef1 move wallet code to separate file
Pieter Wuille <pieter.wuille@gmail.com>
parents: 576
diff changeset
117 obj/keystore.o \
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
118 obj/main.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
119 obj/net.o \
876
b5abe85df1e7 Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents: 874
diff changeset
120 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
121 obj/bitcoinrpc.o \
1583
df45e8721f53 Key import and export
Pieter Wuille <pieter.wuille@gmail.com>
parents: 1580
diff changeset
122 obj/rpcdump.o \
874
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
123 obj/script.o \
2e1afcc5958d Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents: 869
diff changeset
124 obj/util.o \
1359
08006bbf6cf3 remove cryptopp dependency, add simple unittest for SHA256Transform()
Nils Schneider <nils.schneider@gmail.com>
parents: 1321
diff changeset
125 obj/wallet.o
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
126
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
127
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
128 all: bitcoind
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
129
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
130 # auto-generated dependencies:
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
131 -include obj/nogui/*.P
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
132 -include obj/test/*.P
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
133
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
134 obj/nogui/%.o: %.cpp
1416
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
135 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
136 @cp $(@:%.o=%.d) $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
137 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
138 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
139 rm -f $(@:%.o=%.d)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
140
576
8ec6d5e778e5 Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents: 575
diff changeset
141 bitcoind: $(OBJS:obj/%=obj/nogui/%)
1416
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
142 $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
143
1597
12cf0a8687a4 Rework unit tests so test_bitcoin.cpp does not #include them all
Gavin Andresen <gavinandresen@gmail.com>
parents: 1583
diff changeset
144 TESTOBJS := $(patsubst test/%.cpp,obj/test/%.o,$(wildcard test/*.cpp))
12cf0a8687a4 Rework unit tests so test_bitcoin.cpp does not #include them all
Gavin Andresen <gavinandresen@gmail.com>
parents: 1583
diff changeset
145
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
146 obj/test/%.o: test/%.cpp
1416
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
147 $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
1381
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
148 @cp $(@:%.o=%.d) $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
149 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
150 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
151 rm -f $(@:%.o=%.d)
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
diff changeset
152
1597
12cf0a8687a4 Rework unit tests so test_bitcoin.cpp does not #include them all
Gavin Andresen <gavinandresen@gmail.com>
parents: 1583
diff changeset
153 test_bitcoin: $(TESTOBJS) $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
1416
44496613cb1a Allow users to customize CXX, CXXFLAGS, and LDFLAGS normally
Luke Dashjr <luke-jr+git@utopios.org>
parents: 1409
diff changeset
154 $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
155
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
156 clean:
1320
c74c975a712d Remove wxWidgets
Gavin Andresen <gavinandresen@gmail.com>
parents: 1316
diff changeset
157 -rm -f bitcoind test_bitcoin
575
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
158 -rm -f obj/*.o
1a0476fe825f directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff changeset
159 -rm -f obj/nogui/*.o
708
06d213590314 Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents: 689
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
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
162 -rm -f obj/nogui/*.P
217a0a58ec81 Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents: 1359
diff changeset
163 -rm -f obj/test/*.P