Mercurial > hg > bitcoin
annotate src/makefile.unix @ 1409:2526d1bab1db draft
Add support to makefile.unix for the same parameters used by bitcoin-qt.pro, dynamic linking unless STATIC=1 is passed
author | Luke Dashjr <luke-jr+git@utopios.org> |
---|---|
date | Sun, 09 Oct 2011 14:23:20 -0400 |
parents | 217a0a58ec81 |
children | 44496613cb1a 3017f835ef62 |
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 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
5 CXX=g++ |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
6 |
744
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
7 USE_UPNP:=0 |
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
8 |
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
|
9 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
|
10 |
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 DEFS += $(addprefix -I,$(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_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
|
12 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
|
13 |
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 |
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 endif |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
22 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
23 # 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
|
24 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
|
25 -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
|
26 -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
|
27 -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
|
28 -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
|
29 -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
|
30 -l db_cxx$(BDB_LIB_SUFFIX) \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
31 -l ssl \ |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
32 -l crypto |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
33 |
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
|
34 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
|
35 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
|
36 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
|
37 ifneq (${USE_UPNP}, -) |
744
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
38 LIBS += -l miniupnpc |
e98b41d99e48
Revert "Make UPnP default on Bitcoin but not on Bitcoind."
Matt Corallo <matt@bluematt.me>
parents:
726
diff
changeset
|
39 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
|
40 endif |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
41 |
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
|
42 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
|
43 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
|
44 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
|
45 |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
46 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
|
47 -Wl,-B$(LMODE2) \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
48 -l gthread-2.0 \ |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
49 -l z \ |
576
8ec6d5e778e5
Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents:
575
diff
changeset
|
50 -l dl \ |
8ec6d5e778e5
Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents:
575
diff
changeset
|
51 -l pthread |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
52 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
53 |
950
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
54 # Hardening |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
55 # 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
|
56 # |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
57 # Stack Canaries |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
58 # 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
|
59 # 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
|
60 # 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
|
61 # a "Stack smashing detected" error instead of being exploited. |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
62 HARDENING=-fstack-protector-all -Wstack-protector |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
63 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
64 # 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
|
65 # 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
|
66 # which would later be jumped to. |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
67 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
|
68 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
69 # 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
|
70 # offered by some kernels. |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
71 # 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
|
72 ifdef PIE |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
73 HARDENING+=-fPIE -pie |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
74 endif |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
75 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
76 # -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
|
77 # 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
|
78 HARDENING+=-D_FORTIFY_SOURCE=2 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
79 # |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
80 |
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
81 |
1320 | 82 DEBUGFLAGS=-g |
950
e5d23800c530
Add some hardening to protect against unknown/future exploits.
cjdelisle <calebdelisle@lavabit.com>
parents:
901
diff
changeset
|
83 CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(HARDENING) |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
84 HEADERS = \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
85 base58.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
86 bignum.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
87 crypter.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
88 db.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
89 headers.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
90 init.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
91 irc.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
92 key.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
93 keystore.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
94 main.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
95 net.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
96 noui.h \ |
876
b5abe85df1e7
Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents:
874
diff
changeset
|
97 protocol.h \ |
1294
8c70236c9f87
assure that base bitcoind and bitcoin still build
Wladimir J. van der Laan <laanwj@gmail.com>
parents:
901
diff
changeset
|
98 bitcoinrpc.h \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
99 script.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
100 serialize.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
101 strlcpy.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
102 uint256.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
103 util.h \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
104 wallet.h |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
105 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
106 OBJS= \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
107 obj/crypter.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
108 obj/db.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
109 obj/init.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
110 obj/irc.o \ |
689
9df222fa1ef1
move wallet code to separate file
Pieter Wuille <pieter.wuille@gmail.com>
parents:
576
diff
changeset
|
111 obj/keystore.o \ |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
112 obj/main.o \ |
874
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
113 obj/net.o \ |
876
b5abe85df1e7
Start moving protocol-specific code to protocol.[ch]pp
Giel van Schijndel <me@mortis.eu>
parents:
874
diff
changeset
|
114 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
|
115 obj/bitcoinrpc.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 \ |
2e1afcc5958d
Cleanup makefiles such that diffs to them are smaller
Giel van Schijndel <me@mortis.eu>
parents:
869
diff
changeset
|
117 obj/util.o \ |
1359
08006bbf6cf3
remove cryptopp dependency, add simple unittest for SHA256Transform()
Nils Schneider <nils.schneider@gmail.com>
parents:
1321
diff
changeset
|
118 obj/wallet.o |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
119 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
120 |
1320 | 121 all: bitcoind |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
122 |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
123 # auto-generated dependencies: |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
124 -include obj/nogui/*.P |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
125 -include obj/test/*.P |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
126 |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
127 obj/nogui/%.o: %.cpp |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
128 $(CXX) -c $(CXXFLAGS) -MMD -o $@ $< |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
129 @cp $(@:%.o=%.d) $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
130 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
131 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
132 rm -f $(@:%.o=%.d) |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
133 |
576
8ec6d5e778e5
Manual merge of jaromil's source tree reorg commit.
Jeff Garzik <jeff@garzik.org>
parents:
575
diff
changeset
|
134 bitcoind: $(OBJS:obj/%=obj/nogui/%) |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
135 $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
136 |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
137 obj/test/%.o: test/%.cpp |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
138 $(CXX) -c $(CXXFLAGS) -MMD -o $@ $< |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
139 @cp $(@:%.o=%.d) $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
140 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
141 -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
142 rm -f $(@:%.o=%.d) |
708
06d213590314
Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents:
689
diff
changeset
|
143 |
854 | 144 test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%)) |
145 $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS) | |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
146 |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
147 clean: |
1320 | 148 -rm -f bitcoind test_bitcoin |
575
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
149 -rm -f obj/*.o |
1a0476fe825f
directory re-organization (keeps the old build system)
Jaromil <jaromil@dyne.org>
parents:
diff
changeset
|
150 -rm -f obj/nogui/*.o |
708
06d213590314
Boost unit-testing framework.
Gavin Andresen <gavinandresen@gmail.com>
parents:
689
diff
changeset
|
151 -rm -f obj/test/*.o |
1381
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
152 -rm -f obj/*.P |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
153 -rm -f obj/nogui/*.P |
217a0a58ec81
Auto-build dependencies
Gavin Andresen <gavinandresen@gmail.com>
parents:
1359
diff
changeset
|
154 -rm -f obj/test/*.P |