]>
Commit | Line | Data |
---|---|---|
4300876c | 1 | DIST_SUBDIRS = secp256k1 |
575e70c0 | 2 | AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) |
eb12a14d | 3 | |
35b8af92 | 4 | |
6b9f0d55 | 5 | if EMBEDDED_LEVELDB |
56c157d5 CF |
6 | LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include |
7 | LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv | |
8 | LIBLEVELDB += $(builddir)/leveldb/libleveldb.a | |
9 | LIBMEMENV += $(builddir)/leveldb/libmemenv.a | |
6b9f0d55 CF |
10 | |
11 | # NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race | |
12 | $(LIBLEVELDB): $(LIBMEMENV) | |
13 | ||
14 | $(LIBLEVELDB) $(LIBMEMENV): | |
15 | @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \ | |
16 | CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \ | |
ff7fe8b1 | 17 | OPT="$(CXXFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS" |
6b9f0d55 CF |
18 | endif |
19 | ||
54372482 | 20 | BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config |
6b099402 | 21 | BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS) |
f4d81129 | 22 | |
55668266 | 23 | BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include |
55668266 | 24 | |
84ce18ca WL |
25 | LIBBITCOIN_SERVER=libbitcoin_server.a |
26 | LIBBITCOIN_WALLET=libbitcoin_wallet.a | |
27 | LIBBITCOIN_COMMON=libbitcoin_common.a | |
28 | LIBBITCOIN_CLI=libbitcoin_cli.a | |
29 | LIBBITCOIN_UTIL=libbitcoin_util.a | |
30 | LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a | |
cbe39a38 | 31 | LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a |
84ce18ca | 32 | LIBBITCOINQT=qt/libbitcoinqt.a |
07a99017 | 33 | LIBSECP256K1=secp256k1/libsecp256k1.la |
cc686fe5 | 34 | LIBZCASH=libzcash.a -lcurl |
07a99017 PW |
35 | |
36 | $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*) | |
4300876c | 37 | $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) |
84ce18ca | 38 | |
071473c5 | 39 | # Make is not made aware of per-object dependencies to avoid limiting building parallelization |
40 | # But to build the less dependent modules first, we manually select their order here: | |
fe925e22 | 41 | EXTRA_LIBRARIES = \ |
071473c5 | 42 | crypto/libbitcoin_crypto.a \ |
84ce18ca | 43 | libbitcoin_util.a \ |
071473c5 | 44 | libbitcoin_common.a \ |
cbe39a38 | 45 | univalue/libbitcoin_univalue.a \ |
071473c5 | 46 | libbitcoin_server.a \ |
e463edc1 | 47 | libbitcoin_cli.a \ |
1785bdb9 | 48 | libzcash.a |
4f9e993b | 49 | if ENABLE_WALLET |
f4d81129 | 50 | BITCOIN_INCLUDES += $(BDB_CPPFLAGS) |
fe925e22 | 51 | EXTRA_LIBRARIES += libbitcoin_wallet.a |
4f9e993b | 52 | endif |
35b8af92 | 53 | |
cdd36c6c | 54 | if BUILD_BITCOIN_LIBS |
2cf5f16c | 55 | lib_LTLIBRARIES = libbitcoinconsensus.la |
cdd36c6c CF |
56 | LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la |
57 | else | |
58 | LIBBITCOIN_CONSENSUS= | |
59 | endif | |
2cf5f16c | 60 | |
f930341d | 61 | bin_PROGRAMS = |
65e8ba4d | 62 | TESTS = |
f930341d LD |
63 | |
64 | if BUILD_BITCOIND | |
5166804f | 65 | bin_PROGRAMS += komodod |
f930341d LD |
66 | endif |
67 | ||
c101c769 | 68 | if BUILD_BITCOIN_UTILS |
5166804f | 69 | bin_PROGRAMS += komodo-cli bitcoin-tx |
f930341d | 70 | endif |
35b8af92 | 71 | |
1785bdb9 | 72 | LIBZCASH_H = \ |
c06664fb | 73 | zcash/IncrementalMerkleTree.hpp \ |
6c36a9fe | 74 | zcash/NoteEncryption.hpp \ |
369df065 SB |
75 | zcash/Address.hpp \ |
76 | zcash/JoinSplit.hpp \ | |
77 | zcash/Note.hpp \ | |
81469bbb | 78 | zcash/prf.h \ |
9ffe371d | 79 | zcash/Proof.hpp \ |
cc552e4d KG |
80 | zcash/util.h \ |
81 | zcash/Zcash.h | |
e463edc1 | 82 | |
a5e918a0 | 83 | .PHONY: FORCE check-symbols check-security |
35b8af92 | 84 | # bitcoin core # |
5a407bd0 WL |
85 | BITCOIN_CORE_H = \ |
86 | addrman.h \ | |
87 | alert.h \ | |
a372168e | 88 | amount.h \ |
bfc60703 | 89 | arith_uint256.h \ |
fc72c078 S |
90 | asyncrpcoperation.h \ |
91 | asyncrpcqueue.h \ | |
7cd0af7c | 92 | base58.h \ |
5a407bd0 | 93 | bloom.h \ |
e8b5f0d5 | 94 | chain.h \ |
bfc60703 | 95 | chainparams.h \ |
ff734e90 | 96 | chainparamsbase.h \ |
a60120e9 | 97 | chainparamsseeds.h \ |
5a407bd0 WL |
98 | checkpoints.h \ |
99 | checkqueue.h \ | |
100 | clientversion.h \ | |
101 | coincontrol.h \ | |
102 | coins.h \ | |
103 | compat.h \ | |
ff734e90 JT |
104 | compat/byteswap.h \ |
105 | compat/endian.h \ | |
106 | compat/sanity.h \ | |
561e9e9d | 107 | compressor.h \ |
691161d4 | 108 | consensus/consensus.h \ |
bd006110 | 109 | consensus/params.h \ |
da29ecbc | 110 | consensus/validation.h \ |
ae775b5b | 111 | core_io.h \ |
900078ae | 112 | eccryptoverify.h \ |
50f71cd5 | 113 | ecwrapper.h \ |
5a407bd0 WL |
114 | hash.h \ |
115 | init.h \ | |
116 | key.h \ | |
117 | keystore.h \ | |
118 | leveldbwrapper.h \ | |
119 | limitedmap.h \ | |
120 | main.h \ | |
540629c6 | 121 | memusage.h \ |
afd4b94b | 122 | merkleblock.h \ |
5a407bd0 WL |
123 | miner.h \ |
124 | mruset.h \ | |
5a407bd0 | 125 | net.h \ |
ff734e90 | 126 | netbase.h \ |
5a407bd0 | 127 | noui.h \ |
b649e039 | 128 | policy/fees.h \ |
df852d2b | 129 | pow.h \ |
bfc60703 WL |
130 | primitives/block.h \ |
131 | primitives/transaction.h \ | |
5a407bd0 | 132 | protocol.h \ |
d2e74c55 | 133 | pubkey.h \ |
6354935c | 134 | random.h \ |
6b51b9b1 | 135 | reverselock.h \ |
fb78cc23 WL |
136 | rpcclient.h \ |
137 | rpcprotocol.h \ | |
138 | rpcserver.h \ | |
928b950e | 139 | scheduler.h \ |
611116d4 | 140 | script/interpreter.h \ |
cbd22a50 | 141 | script/script.h \ |
ff734e90 | 142 | script/script_error.h \ |
5c1e798a | 143 | script/sigcache.h \ |
e088d65a | 144 | script/sign.h \ |
c4408a6c | 145 | script/standard.h \ |
5a407bd0 | 146 | serialize.h \ |
fa736190 | 147 | streams.h \ |
d7d187e8 CF |
148 | support/allocators/secure.h \ |
149 | support/allocators/zeroafterfree.h \ | |
1630219d | 150 | support/cleanse.h \ |
d7d187e8 | 151 | support/pagelocker.h \ |
5a407bd0 WL |
152 | sync.h \ |
153 | threadsafety.h \ | |
14f888ca | 154 | timedata.h \ |
b77dfdc9 | 155 | tinyformat.h \ |
5a407bd0 WL |
156 | txdb.h \ |
157 | txmempool.h \ | |
158 | ui_interface.h \ | |
159 | uint256.h \ | |
defe37a6 | 160 | uint252.h \ |
999a2ab4 | 161 | undo.h \ |
5a407bd0 | 162 | util.h \ |
ad49c256 | 163 | utilmoneystr.h \ |
bfc60703 | 164 | utilstrencodings.h \ |
ad49c256 | 165 | utiltime.h \ |
26c16d9d | 166 | validationinterface.h \ |
5a407bd0 | 167 | version.h \ |
fc72c078 | 168 | wallet/asyncrpcoperation_sendmany.h \ |
a354a59f | 169 | wallet/crypter.h \ |
ff734e90 | 170 | wallet/db.h \ |
50c72f23 JS |
171 | wallet/wallet.h \ |
172 | wallet/wallet_ismine.h \ | |
ff734e90 | 173 | wallet/walletdb.h |
5a407bd0 WL |
174 | |
175 | JSON_H = \ | |
176 | json/json_spirit.h \ | |
177 | json/json_spirit_error_position.h \ | |
178 | json/json_spirit_reader.h \ | |
179 | json/json_spirit_reader_template.h \ | |
180 | json/json_spirit_stream_reader.h \ | |
181 | json/json_spirit_utils.h \ | |
182 | json/json_spirit_value.h \ | |
183 | json/json_spirit_writer.h \ | |
35b8af92 CF |
184 | json/json_spirit_writer_template.h |
185 | ||
186 | obj/build.h: FORCE | |
56c157d5 | 187 | @$(MKDIR_P) $(builddir)/obj |
35b8af92 CF |
188 | @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \ |
189 | $(abs_top_srcdir) | |
71697f97 | 190 | libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h |
35b8af92 | 191 | |
84ce18ca | 192 | # server: shared between bitcoind and bitcoin-qt |
9f7f504e | 193 | libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) |
4f9e993b | 194 | libbitcoin_server_a_SOURCES = \ |
b39e1bdb | 195 | sendalert.cpp \ |
4f9e993b WL |
196 | addrman.cpp \ |
197 | alert.cpp \ | |
7553b173 | 198 | alertkeys.h \ |
fc72c078 S |
199 | asyncrpcoperation.cpp \ |
200 | asyncrpcqueue.cpp \ | |
fb78cc23 | 201 | bloom.cpp \ |
e8b5f0d5 | 202 | chain.cpp \ |
4f9e993b | 203 | checkpoints.cpp \ |
4f9e993b | 204 | init.cpp \ |
4f9e993b WL |
205 | leveldbwrapper.cpp \ |
206 | main.cpp \ | |
afd4b94b | 207 | merkleblock.cpp \ |
4a85e067 | 208 | miner.cpp \ |
4f9e993b WL |
209 | net.cpp \ |
210 | noui.cpp \ | |
b649e039 | 211 | policy/fees.cpp \ |
df852d2b | 212 | pow.cpp \ |
e2655e0a | 213 | rest.cpp \ |
4f9e993b | 214 | rpcblockchain.cpp \ |
4a85e067 | 215 | rpcmining.cpp \ |
652e1569 | 216 | rpcmisc.cpp \ |
4f9e993b WL |
217 | rpcnet.cpp \ |
218 | rpcrawtransaction.cpp \ | |
dfd39962 | 219 | rpcserver.cpp \ |
bfe029fe | 220 | script/sigcache.cpp \ |
14f888ca | 221 | timedata.cpp \ |
4f9e993b WL |
222 | txdb.cpp \ |
223 | txmempool.cpp \ | |
26c16d9d | 224 | validationinterface.cpp \ |
4f9e993b | 225 | $(JSON_H) \ |
e463edc1 | 226 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 227 | $(LIBZCASH_H) |
4f9e993b | 228 | |
84ce18ca WL |
229 | # wallet: shared between bitcoind and bitcoin-qt, but only linked |
230 | # when wallet enabled | |
f4d81129 | 231 | libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
4f9e993b | 232 | libbitcoin_wallet_a_SOURCES = \ |
6962bb3d | 233 | zcbenchmarks.cpp \ |
2f3ecb44 | 234 | zcbenchmarks.h \ |
fc72c078 | 235 | wallet/asyncrpcoperation_sendmany.cpp \ |
a354a59f | 236 | wallet/crypter.cpp \ |
50c72f23 | 237 | wallet/db.cpp \ |
50c72f23 JS |
238 | wallet/rpcdump.cpp \ |
239 | wallet/rpcwallet.cpp \ | |
240 | wallet/wallet.cpp \ | |
241 | wallet/wallet_ismine.cpp \ | |
242 | wallet/walletdb.cpp \ | |
e463edc1 | 243 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 244 | $(LIBZCASH_H) |
0b47fe6b | 245 | |
84ce18ca | 246 | # crypto primitives library |
4791b99e CF |
247 | crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES) |
248 | crypto_libbitcoin_crypto_a_SOURCES = \ | |
4791b99e | 249 | crypto/common.h \ |
6d25662f JG |
250 | crypto/equihash.cpp \ |
251 | crypto/equihash.h \ | |
60157808 | 252 | crypto/equihash.tcc \ |
ff734e90 | 253 | crypto/hmac_sha256.cpp \ |
a8f5087e | 254 | crypto/hmac_sha256.h \ |
ff734e90 | 255 | crypto/hmac_sha512.cpp \ |
36fa4a78 | 256 | crypto/hmac_sha512.h \ |
ff734e90 JT |
257 | crypto/ripemd160.cpp \ |
258 | crypto/ripemd160.h \ | |
259 | crypto/sha1.cpp \ | |
4791b99e | 260 | crypto/sha1.h \ |
ff734e90 JT |
261 | crypto/sha256.cpp \ |
262 | crypto/sha256.h \ | |
263 | crypto/sha512.cpp \ | |
264 | crypto/sha512.h | |
4791b99e | 265 | |
cbe39a38 JG |
266 | # univalue JSON library |
267 | univalue_libbitcoin_univalue_a_SOURCES = \ | |
268 | univalue/univalue.cpp \ | |
ff734e90 | 269 | univalue/univalue.h \ |
3cceba7a | 270 | univalue/univalue_escapes.h \ |
ff734e90 JT |
271 | univalue/univalue_read.cpp \ |
272 | univalue/univalue_write.cpp | |
cbe39a38 | 273 | |
84ce18ca | 274 | # common: shared between bitcoind, and bitcoin-qt and non-server tools |
f4d81129 | 275 | libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
0b47fe6b | 276 | libbitcoin_common_a_SOURCES = \ |
eda37330 | 277 | amount.cpp \ |
ff734e90 | 278 | arith_uint256.cpp \ |
75c82d49 | 279 | base58.cpp \ |
0b47fe6b | 280 | chainparams.cpp \ |
75c82d49 | 281 | coins.cpp \ |
561e9e9d | 282 | compressor.cpp \ |
ae775b5b JG |
283 | core_read.cpp \ |
284 | core_write.cpp \ | |
900078ae | 285 | eccryptoverify.cpp \ |
50f71cd5 | 286 | ecwrapper.cpp \ |
0b47fe6b WL |
287 | hash.cpp \ |
288 | key.cpp \ | |
75c82d49 | 289 | keystore.cpp \ |
0b47fe6b | 290 | netbase.cpp \ |
ff734e90 JT |
291 | primitives/block.cpp \ |
292 | primitives/transaction.cpp \ | |
0b47fe6b | 293 | protocol.cpp \ |
d2e74c55 | 294 | pubkey.cpp \ |
928b950e | 295 | scheduler.cpp \ |
611116d4 | 296 | script/interpreter.cpp \ |
cbd22a50 | 297 | script/script.cpp \ |
ff734e90 | 298 | script/script_error.cpp \ |
e088d65a | 299 | script/sign.cpp \ |
c4408a6c | 300 | script/standard.cpp \ |
e463edc1 | 301 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 302 | $(LIBZCASH_H) |
84ce18ca WL |
303 | |
304 | # util: shared between all executables. | |
305 | # This library *must* be included to make sure that the glibc | |
306 | # backward-compatibility objects and their sanity checks are linked. | |
307 | libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES) | |
308 | libbitcoin_util_a_SOURCES = \ | |
d7d187e8 | 309 | support/pagelocker.cpp \ |
84ce18ca | 310 | chainparamsbase.cpp \ |
71697f97 | 311 | clientversion.cpp \ |
bfc60703 WL |
312 | compat/glibc_sanity.cpp \ |
313 | compat/glibcxx_sanity.cpp \ | |
314 | compat/strnlen.cpp \ | |
6354935c | 315 | random.cpp \ |
84ce18ca | 316 | rpcprotocol.cpp \ |
1630219d | 317 | support/cleanse.cpp \ |
0b47fe6b | 318 | sync.cpp \ |
de79aaa7 | 319 | uint256.cpp \ |
0b47fe6b | 320 | util.cpp \ |
ad49c256 | 321 | utilmoneystr.cpp \ |
bfc60703 | 322 | utilstrencodings.cpp \ |
ad49c256 | 323 | utiltime.cpp \ |
e463edc1 | 324 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 325 | $(LIBZCASH_H) |
35b8af92 | 326 | |
d5aab704 | 327 | if GLIBC_BACK_COMPAT |
84ce18ca | 328 | libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp |
d5aab704 CF |
329 | endif |
330 | ||
84ce18ca | 331 | # cli: shared between bitcoin-cli and bitcoin-qt |
a65668dd | 332 | libbitcoin_cli_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
0b47fe6b WL |
333 | libbitcoin_cli_a_SOURCES = \ |
334 | rpcclient.cpp \ | |
e463edc1 | 335 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 336 | $(LIBZCASH_H) |
0b47fe6b | 337 | |
84ce18ca | 338 | nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h |
35b8af92 CF |
339 | # |
340 | ||
341 | # bitcoind binary # | |
5166804f | 342 | komodod_SOURCES = bitcoind.cpp |
343 | komodod_CPPFLAGS = $(BITCOIN_INCLUDES) | |
344 | komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
72ac792b | 345 | |
346 | if TARGET_WINDOWS | |
5166804f | 347 | komodod_SOURCES += bitcoind-res.rc |
72ac792b | 348 | endif |
349 | ||
5166804f | 350 | komodod_LDADD = \ |
84ce18ca WL |
351 | $(LIBBITCOIN_SERVER) \ |
352 | $(LIBBITCOIN_COMMON) \ | |
cbe39a38 | 353 | $(LIBBITCOIN_UNIVALUE) \ |
84ce18ca WL |
354 | $(LIBBITCOIN_UTIL) \ |
355 | $(LIBBITCOIN_CRYPTO) \ | |
1785bdb9 | 356 | $(LIBZCASH) \ |
4a290b52 | 357 | $(LIBLEVELDB) \ |
07a99017 PW |
358 | $(LIBMEMENV) \ |
359 | $(LIBSECP256K1) | |
55668266 | 360 | |
4f9e993b | 361 | if ENABLE_WALLET |
5166804f | 362 | komodod_LDADD += libbitcoin_wallet.a |
4f9e993b | 363 | endif |
72ac792b | 364 | |
5166804f | 365 | komodod_LDADD += \ |
c4da0970 NW |
366 | $(BOOST_LIBS) \ |
367 | $(BDB_LIBS) \ | |
368 | $(SSL_LIBS) \ | |
369 | $(CRYPTO_LIBS) \ | |
370 | $(MINIUPNPC_LIBS) \ | |
1785bdb9 | 371 | $(LIBZCASH) \ |
d3612b1c | 372 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 373 | $(LIBZCASH_LIBS) |
35b8af92 CF |
374 | # |
375 | ||
72ac792b | 376 | # bitcoin-cli binary # |
5166804f | 377 | komodo_cli_SOURCES = bitcoin-cli.cpp |
378 | komodo_cli_CPPFLAGS = $(BITCOIN_INCLUDES) | |
379 | komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
72ac792b | 380 | |
dee632cc | 381 | if TARGET_WINDOWS |
5166804f | 382 | komodo_cli_SOURCES += bitcoin-cli-res.rc |
dee632cc CF |
383 | endif |
384 | ||
5166804f | 385 | komodo_cli_LDADD = \ |
84ce18ca | 386 | $(LIBBITCOIN_CLI) \ |
c4da0970 NW |
387 | $(LIBBITCOIN_UTIL) \ |
388 | $(BOOST_LIBS) \ | |
389 | $(SSL_LIBS) \ | |
390 | $(CRYPTO_LIBS) \ | |
1785bdb9 | 391 | $(LIBZCASH) \ |
d3612b1c | 392 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 393 | $(LIBZCASH_LIBS) |
2a03a390 WL |
394 | # |
395 | ||
cbe39a38 | 396 | # bitcoin-tx binary # |
72ac792b | 397 | bitcoin_tx_SOURCES = bitcoin-tx.cpp |
398 | bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES) | |
399 | bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
400 | ||
cc24610f LD |
401 | if TARGET_WINDOWS |
402 | bitcoin_tx_SOURCES += bitcoin-tx-res.rc | |
403 | endif | |
404 | ||
1785bdb9 | 405 | # FIXME: Is libzcash needed for bitcoin_tx? |
cbe39a38 JG |
406 | bitcoin_tx_LDADD = \ |
407 | $(LIBBITCOIN_UNIVALUE) \ | |
408 | $(LIBBITCOIN_COMMON) \ | |
409 | $(LIBBITCOIN_UTIL) \ | |
c4da0970 | 410 | $(LIBSECP256K1) \ |
1785bdb9 | 411 | $(LIBZCASH) \ |
d3612b1c | 412 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 413 | $(LIBZCASH_LIBS) |
28d412ff | 414 | |
72ac792b | 415 | bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) |
cbe39a38 | 416 | # |
2a03a390 | 417 | |
c9c4611d | 418 | # zcash protocol primitives # |
1785bdb9 | 419 | libzcash_a_SOURCES = \ |
e1ff849d | 420 | zcash/IncrementalMerkleTree.cpp \ |
6c36a9fe | 421 | zcash/NoteEncryption.cpp \ |
369df065 SB |
422 | zcash/Address.cpp \ |
423 | zcash/JoinSplit.cpp \ | |
f0dab51c | 424 | zcash/Proof.cpp \ |
369df065 | 425 | zcash/Note.cpp \ |
81469bbb | 426 | zcash/prf.cpp \ |
58d09f27 KG |
427 | zcash/util.cpp \ |
428 | zcash/circuit/commitment.tcc \ | |
429 | zcash/circuit/gadget.tcc \ | |
430 | zcash/circuit/merkle.tcc \ | |
431 | zcash/circuit/note.tcc \ | |
432 | zcash/circuit/prfs.tcc \ | |
433 | zcash/circuit/utils.tcc | |
e463edc1 | 434 | |
f5d3d420 TH |
435 | libzcash_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) -pipe -O1 -g -Wstack-protector -fstack-protector-all -fPIE -fvisibility=hidden -DSTATIC $(BITCOIN_INCLUDES) |
436 | ||
437 | libzcash_a_CXXFLAGS = $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing | |
438 | ||
439 | libzcash_a_LDFLAGS = $(HARDENED_LDFLAGS) | |
e463edc1 | 440 | |
decde386 SB |
441 | libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT |
442 | ||
72ac792b | 443 | # bitcoinconsensus library # |
2cf5f16c CF |
444 | if BUILD_BITCOIN_LIBS |
445 | include_HEADERS = script/bitcoinconsensus.h | |
446 | libbitcoinconsensus_la_SOURCES = \ | |
6d25662f | 447 | crypto/equihash.cpp \ |
36fa4a78 | 448 | crypto/hmac_sha512.cpp \ |
bfc60703 | 449 | crypto/ripemd160.cpp \ |
2cf5f16c | 450 | crypto/sha1.cpp \ |
36fa4a78 PW |
451 | crypto/sha256.cpp \ |
452 | crypto/sha512.cpp \ | |
2cf5f16c CF |
453 | eccryptoverify.cpp \ |
454 | ecwrapper.cpp \ | |
455 | hash.cpp \ | |
bfc60703 | 456 | primitives/transaction.cpp \ |
2cf5f16c | 457 | pubkey.cpp \ |
2cf5f16c | 458 | script/bitcoinconsensus.cpp \ |
bfc60703 WL |
459 | script/interpreter.cpp \ |
460 | script/script.cpp \ | |
2cf5f16c CF |
461 | uint256.cpp \ |
462 | utilstrencodings.cpp | |
463 | ||
464 | if GLIBC_BACK_COMPAT | |
465 | libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp | |
2cf5f16c CF |
466 | endif |
467 | ||
468 | libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS) | |
469 | libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS) | |
470 | libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL | |
72ac792b | 471 | |
cdd36c6c | 472 | endif |
72ac792b | 473 | # |
2cf5f16c | 474 | |
35b8af92 CF |
475 | CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno |
476 | ||
477 | DISTCLEANFILES = obj/build.h | |
478 | ||
4ec57478 | 479 | EXTRA_DIST = leveldb |
35b8af92 CF |
480 | |
481 | clean-local: | |
482 | -$(MAKE) -C leveldb clean | |
4300876c | 483 | -$(MAKE) -C secp256k1 clean |
26d1b65c | 484 | rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno |
54372482 | 485 | -rm -f config.h |
65e8ba4d | 486 | |
6b9f0d55 | 487 | .rc.o: |
70c71c50 | 488 | @test -f $(WINDRES) |
71697f97 | 489 | $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@ |
6b9f0d55 CF |
490 | |
491 | .mm.o: | |
70c71c50 | 492 | $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
6b9f0d55 CF |
493 | $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $< |
494 | ||
a5e918a0 CF |
495 | check-symbols: $(bin_PROGRAMS) |
496 | if GLIBC_BACK_COMPAT | |
497 | @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..." | |
498 | $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS) | |
499 | endif | |
500 | ||
56734f4b TH |
501 | check-security: $(bin_PROGRAMS) |
502 | if HARDEN | |
503 | @echo "Checking binary security of [$(bin_PROGRAMS)]..." | |
504 | $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS) | |
505 | endif | |
506 | ||
6b9f0d55 | 507 | %.pb.cc %.pb.h: %.proto |
70c71c50 CF |
508 | @test -f $(PROTOC) |
509 | $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) | |
6b9f0d55 | 510 | |
65e8ba4d CF |
511 | if ENABLE_TESTS |
512 | include Makefile.test.include | |
6bd8e469 | 513 | include Makefile.gtest.include |
65e8ba4d CF |
514 | endif |
515 | ||
516 | if ENABLE_QT | |
517 | include Makefile.qt.include | |
518 | endif | |
519 | ||
520 | if ENABLE_QT_TESTS | |
521 | include Makefile.qttest.include | |
522 | endif | |
6e96cf08 SB |
523 | |
524 | include Makefile.zcash.include |