]>
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 |
1785bdb9 | 34 | LIBZCASH=libzcash.a |
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 |
08d6b02d JG |
55 | lib_LTLIBRARIES = libzcashconsensus.la |
56 | LIBZCASH_CONSENSUS=libzcashconsensus.la | |
cdd36c6c | 57 | else |
08d6b02d | 58 | LIBZCASH_CONSENSUS= |
cdd36c6c | 59 | endif |
2cf5f16c | 60 | |
f930341d | 61 | bin_PROGRAMS = |
65e8ba4d | 62 | TESTS = |
f930341d LD |
63 | |
64 | if BUILD_BITCOIND | |
8a183335 | 65 | bin_PROGRAMS += zcashd |
f930341d LD |
66 | endif |
67 | ||
c101c769 | 68 | if BUILD_BITCOIN_UTILS |
66a89c08 | 69 | bin_PROGRAMS += zcash-cli zcash-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 \ |
a6df7ab5 | 123 | metrics.h \ |
5a407bd0 WL |
124 | miner.h \ |
125 | mruset.h \ | |
5a407bd0 | 126 | net.h \ |
ff734e90 | 127 | netbase.h \ |
5a407bd0 | 128 | noui.h \ |
b649e039 | 129 | policy/fees.h \ |
df852d2b | 130 | pow.h \ |
bfc60703 WL |
131 | primitives/block.h \ |
132 | primitives/transaction.h \ | |
5a407bd0 | 133 | protocol.h \ |
d2e74c55 | 134 | pubkey.h \ |
6354935c | 135 | random.h \ |
6b51b9b1 | 136 | reverselock.h \ |
fb78cc23 WL |
137 | rpcclient.h \ |
138 | rpcprotocol.h \ | |
139 | rpcserver.h \ | |
928b950e | 140 | scheduler.h \ |
611116d4 | 141 | script/interpreter.h \ |
cbd22a50 | 142 | script/script.h \ |
ff734e90 | 143 | script/script_error.h \ |
5c1e798a | 144 | script/sigcache.h \ |
e088d65a | 145 | script/sign.h \ |
c4408a6c | 146 | script/standard.h \ |
5a407bd0 | 147 | serialize.h \ |
fa736190 | 148 | streams.h \ |
d7d187e8 CF |
149 | support/allocators/secure.h \ |
150 | support/allocators/zeroafterfree.h \ | |
1630219d | 151 | support/cleanse.h \ |
d7d187e8 | 152 | support/pagelocker.h \ |
5a407bd0 WL |
153 | sync.h \ |
154 | threadsafety.h \ | |
14f888ca | 155 | timedata.h \ |
b77dfdc9 | 156 | tinyformat.h \ |
5a407bd0 WL |
157 | txdb.h \ |
158 | txmempool.h \ | |
159 | ui_interface.h \ | |
160 | uint256.h \ | |
defe37a6 | 161 | uint252.h \ |
999a2ab4 | 162 | undo.h \ |
5a407bd0 | 163 | util.h \ |
ad49c256 | 164 | utilmoneystr.h \ |
bfc60703 | 165 | utilstrencodings.h \ |
ad49c256 | 166 | utiltime.h \ |
26c16d9d | 167 | validationinterface.h \ |
5a407bd0 | 168 | version.h \ |
fc72c078 | 169 | wallet/asyncrpcoperation_sendmany.h \ |
a354a59f | 170 | wallet/crypter.h \ |
ff734e90 | 171 | wallet/db.h \ |
50c72f23 JS |
172 | wallet/wallet.h \ |
173 | wallet/wallet_ismine.h \ | |
ff734e90 | 174 | wallet/walletdb.h |
5a407bd0 WL |
175 | |
176 | JSON_H = \ | |
177 | json/json_spirit.h \ | |
178 | json/json_spirit_error_position.h \ | |
179 | json/json_spirit_reader.h \ | |
180 | json/json_spirit_reader_template.h \ | |
181 | json/json_spirit_stream_reader.h \ | |
182 | json/json_spirit_utils.h \ | |
183 | json/json_spirit_value.h \ | |
184 | json/json_spirit_writer.h \ | |
35b8af92 CF |
185 | json/json_spirit_writer_template.h |
186 | ||
187 | obj/build.h: FORCE | |
56c157d5 | 188 | @$(MKDIR_P) $(builddir)/obj |
35b8af92 CF |
189 | @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \ |
190 | $(abs_top_srcdir) | |
71697f97 | 191 | libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h |
35b8af92 | 192 | |
84ce18ca | 193 | # server: shared between bitcoind and bitcoin-qt |
9f7f504e | 194 | libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) |
4f9e993b | 195 | libbitcoin_server_a_SOURCES = \ |
b39e1bdb | 196 | sendalert.cpp \ |
4f9e993b WL |
197 | addrman.cpp \ |
198 | alert.cpp \ | |
7553b173 | 199 | alertkeys.h \ |
fc72c078 S |
200 | asyncrpcoperation.cpp \ |
201 | asyncrpcqueue.cpp \ | |
fb78cc23 | 202 | bloom.cpp \ |
e8b5f0d5 | 203 | chain.cpp \ |
4f9e993b | 204 | checkpoints.cpp \ |
4f9e993b | 205 | init.cpp \ |
4f9e993b WL |
206 | leveldbwrapper.cpp \ |
207 | main.cpp \ | |
afd4b94b | 208 | merkleblock.cpp \ |
a6df7ab5 | 209 | metrics.cpp \ |
4a85e067 | 210 | miner.cpp \ |
4f9e993b WL |
211 | net.cpp \ |
212 | noui.cpp \ | |
b649e039 | 213 | policy/fees.cpp \ |
df852d2b | 214 | pow.cpp \ |
e2655e0a | 215 | rest.cpp \ |
4f9e993b | 216 | rpcblockchain.cpp \ |
4a85e067 | 217 | rpcmining.cpp \ |
652e1569 | 218 | rpcmisc.cpp \ |
4f9e993b WL |
219 | rpcnet.cpp \ |
220 | rpcrawtransaction.cpp \ | |
dfd39962 | 221 | rpcserver.cpp \ |
bfe029fe | 222 | script/sigcache.cpp \ |
14f888ca | 223 | timedata.cpp \ |
4f9e993b WL |
224 | txdb.cpp \ |
225 | txmempool.cpp \ | |
26c16d9d | 226 | validationinterface.cpp \ |
4f9e993b | 227 | $(JSON_H) \ |
e463edc1 | 228 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 229 | $(LIBZCASH_H) |
4f9e993b | 230 | |
84ce18ca WL |
231 | # wallet: shared between bitcoind and bitcoin-qt, but only linked |
232 | # when wallet enabled | |
f4d81129 | 233 | libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
4f9e993b | 234 | libbitcoin_wallet_a_SOURCES = \ |
0bb3d40f JG |
235 | utiltest.cpp \ |
236 | utiltest.h \ | |
6962bb3d | 237 | zcbenchmarks.cpp \ |
2f3ecb44 | 238 | zcbenchmarks.h \ |
fc72c078 | 239 | wallet/asyncrpcoperation_sendmany.cpp \ |
a354a59f | 240 | wallet/crypter.cpp \ |
50c72f23 | 241 | wallet/db.cpp \ |
50c72f23 JS |
242 | wallet/rpcdump.cpp \ |
243 | wallet/rpcwallet.cpp \ | |
244 | wallet/wallet.cpp \ | |
245 | wallet/wallet_ismine.cpp \ | |
246 | wallet/walletdb.cpp \ | |
e463edc1 | 247 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 248 | $(LIBZCASH_H) |
0b47fe6b | 249 | |
c7aaab7a DH |
250 | EQUIHASH_TROMP_SOURCES = \ |
251 | pow/tromp/equi_miner.h \ | |
252 | pow/tromp/equi.h \ | |
253 | pow/tromp/osx_barrier.h | |
254 | ||
84ce18ca | 255 | # crypto primitives library |
c7aaab7a | 256 | crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES) -DEQUIHASH_TROMP_ATOMIC |
4791b99e | 257 | crypto_libbitcoin_crypto_a_SOURCES = \ |
4791b99e | 258 | crypto/common.h \ |
6d25662f JG |
259 | crypto/equihash.cpp \ |
260 | crypto/equihash.h \ | |
60157808 | 261 | crypto/equihash.tcc \ |
ff734e90 | 262 | crypto/hmac_sha256.cpp \ |
a8f5087e | 263 | crypto/hmac_sha256.h \ |
ff734e90 | 264 | crypto/hmac_sha512.cpp \ |
36fa4a78 | 265 | crypto/hmac_sha512.h \ |
ff734e90 JT |
266 | crypto/ripemd160.cpp \ |
267 | crypto/ripemd160.h \ | |
268 | crypto/sha1.cpp \ | |
4791b99e | 269 | crypto/sha1.h \ |
ff734e90 JT |
270 | crypto/sha256.cpp \ |
271 | crypto/sha256.h \ | |
272 | crypto/sha512.cpp \ | |
c7aaab7a DH |
273 | crypto/sha512.h \ |
274 | ${EQUIHASH_TROMP_SOURCES} | |
4791b99e | 275 | |
cbe39a38 JG |
276 | # univalue JSON library |
277 | univalue_libbitcoin_univalue_a_SOURCES = \ | |
278 | univalue/univalue.cpp \ | |
ff734e90 | 279 | univalue/univalue.h \ |
3cceba7a | 280 | univalue/univalue_escapes.h \ |
ff734e90 JT |
281 | univalue/univalue_read.cpp \ |
282 | univalue/univalue_write.cpp | |
cbe39a38 | 283 | |
84ce18ca | 284 | # common: shared between bitcoind, and bitcoin-qt and non-server tools |
f4d81129 | 285 | libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
0b47fe6b | 286 | libbitcoin_common_a_SOURCES = \ |
eda37330 | 287 | amount.cpp \ |
ff734e90 | 288 | arith_uint256.cpp \ |
75c82d49 | 289 | base58.cpp \ |
0b47fe6b | 290 | chainparams.cpp \ |
75c82d49 | 291 | coins.cpp \ |
561e9e9d | 292 | compressor.cpp \ |
ae775b5b JG |
293 | core_read.cpp \ |
294 | core_write.cpp \ | |
900078ae | 295 | eccryptoverify.cpp \ |
50f71cd5 | 296 | ecwrapper.cpp \ |
0b47fe6b WL |
297 | hash.cpp \ |
298 | key.cpp \ | |
75c82d49 | 299 | keystore.cpp \ |
0b47fe6b | 300 | netbase.cpp \ |
ff734e90 JT |
301 | primitives/block.cpp \ |
302 | primitives/transaction.cpp \ | |
0b47fe6b | 303 | protocol.cpp \ |
d2e74c55 | 304 | pubkey.cpp \ |
928b950e | 305 | scheduler.cpp \ |
611116d4 | 306 | script/interpreter.cpp \ |
cbd22a50 | 307 | script/script.cpp \ |
ff734e90 | 308 | script/script_error.cpp \ |
e088d65a | 309 | script/sign.cpp \ |
c4408a6c | 310 | script/standard.cpp \ |
e463edc1 | 311 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 312 | $(LIBZCASH_H) |
84ce18ca WL |
313 | |
314 | # util: shared between all executables. | |
315 | # This library *must* be included to make sure that the glibc | |
316 | # backward-compatibility objects and their sanity checks are linked. | |
317 | libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES) | |
318 | libbitcoin_util_a_SOURCES = \ | |
d7d187e8 | 319 | support/pagelocker.cpp \ |
84ce18ca | 320 | chainparamsbase.cpp \ |
71697f97 | 321 | clientversion.cpp \ |
bfc60703 WL |
322 | compat/glibc_sanity.cpp \ |
323 | compat/glibcxx_sanity.cpp \ | |
324 | compat/strnlen.cpp \ | |
6354935c | 325 | random.cpp \ |
84ce18ca | 326 | rpcprotocol.cpp \ |
1630219d | 327 | support/cleanse.cpp \ |
0b47fe6b | 328 | sync.cpp \ |
de79aaa7 | 329 | uint256.cpp \ |
0b47fe6b | 330 | util.cpp \ |
ad49c256 | 331 | utilmoneystr.cpp \ |
bfc60703 | 332 | utilstrencodings.cpp \ |
ad49c256 | 333 | utiltime.cpp \ |
e463edc1 | 334 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 335 | $(LIBZCASH_H) |
35b8af92 | 336 | |
d5aab704 | 337 | if GLIBC_BACK_COMPAT |
84ce18ca | 338 | libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp |
d5aab704 CF |
339 | endif |
340 | ||
84ce18ca | 341 | # cli: shared between bitcoin-cli and bitcoin-qt |
a65668dd | 342 | libbitcoin_cli_a_CPPFLAGS = $(BITCOIN_INCLUDES) |
0b47fe6b WL |
343 | libbitcoin_cli_a_SOURCES = \ |
344 | rpcclient.cpp \ | |
e463edc1 | 345 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 346 | $(LIBZCASH_H) |
0b47fe6b | 347 | |
84ce18ca | 348 | nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h |
35b8af92 CF |
349 | # |
350 | ||
351 | # bitcoind binary # | |
8a183335 TH |
352 | zcashd_SOURCES = bitcoind.cpp |
353 | zcashd_CPPFLAGS = $(BITCOIN_INCLUDES) | |
354 | zcashd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
72ac792b | 355 | |
356 | if TARGET_WINDOWS | |
8a183335 | 357 | zcashd_SOURCES += bitcoind-res.rc |
72ac792b | 358 | endif |
359 | ||
8a183335 | 360 | zcashd_LDADD = \ |
84ce18ca WL |
361 | $(LIBBITCOIN_SERVER) \ |
362 | $(LIBBITCOIN_COMMON) \ | |
cbe39a38 | 363 | $(LIBBITCOIN_UNIVALUE) \ |
84ce18ca WL |
364 | $(LIBBITCOIN_UTIL) \ |
365 | $(LIBBITCOIN_CRYPTO) \ | |
1785bdb9 | 366 | $(LIBZCASH) \ |
4a290b52 | 367 | $(LIBLEVELDB) \ |
07a99017 PW |
368 | $(LIBMEMENV) \ |
369 | $(LIBSECP256K1) | |
55668266 | 370 | |
4f9e993b | 371 | if ENABLE_WALLET |
8a183335 | 372 | zcashd_LDADD += libbitcoin_wallet.a |
4f9e993b | 373 | endif |
72ac792b | 374 | |
c4da0970 NW |
375 | zcashd_LDADD += \ |
376 | $(BOOST_LIBS) \ | |
377 | $(BDB_LIBS) \ | |
378 | $(SSL_LIBS) \ | |
379 | $(CRYPTO_LIBS) \ | |
380 | $(MINIUPNPC_LIBS) \ | |
1785bdb9 | 381 | $(LIBZCASH) \ |
d3612b1c | 382 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 383 | $(LIBZCASH_LIBS) |
35b8af92 CF |
384 | # |
385 | ||
72ac792b | 386 | # bitcoin-cli binary # |
8a183335 TH |
387 | zcash_cli_SOURCES = bitcoin-cli.cpp |
388 | zcash_cli_CPPFLAGS = $(BITCOIN_INCLUDES) | |
389 | zcash_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
72ac792b | 390 | |
dee632cc | 391 | if TARGET_WINDOWS |
8a183335 | 392 | zcash_cli_SOURCES += bitcoin-cli-res.rc |
dee632cc CF |
393 | endif |
394 | ||
8a183335 | 395 | zcash_cli_LDADD = \ |
84ce18ca | 396 | $(LIBBITCOIN_CLI) \ |
c4da0970 NW |
397 | $(LIBBITCOIN_UTIL) \ |
398 | $(BOOST_LIBS) \ | |
399 | $(SSL_LIBS) \ | |
400 | $(CRYPTO_LIBS) \ | |
1785bdb9 | 401 | $(LIBZCASH) \ |
d3612b1c | 402 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 403 | $(LIBZCASH_LIBS) |
2a03a390 WL |
404 | # |
405 | ||
66a89c08 JG |
406 | # zcash-tx binary # |
407 | zcash_tx_SOURCES = bitcoin-tx.cpp | |
408 | zcash_tx_CPPFLAGS = $(BITCOIN_INCLUDES) | |
409 | zcash_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
72ac792b | 410 | |
cc24610f | 411 | if TARGET_WINDOWS |
66a89c08 | 412 | zcash_tx_SOURCES += bitcoin-tx-res.rc |
cc24610f LD |
413 | endif |
414 | ||
66a89c08 JG |
415 | # FIXME: Is libzcash needed for zcash_tx? |
416 | zcash_tx_LDADD = \ | |
cbe39a38 JG |
417 | $(LIBBITCOIN_UNIVALUE) \ |
418 | $(LIBBITCOIN_COMMON) \ | |
419 | $(LIBBITCOIN_UTIL) \ | |
c4da0970 | 420 | $(LIBSECP256K1) \ |
1785bdb9 | 421 | $(LIBZCASH) \ |
d3612b1c | 422 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 423 | $(LIBZCASH_LIBS) |
28d412ff | 424 | |
66a89c08 | 425 | zcash_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) |
cbe39a38 | 426 | # |
2a03a390 | 427 | |
c9c4611d | 428 | # zcash protocol primitives # |
1785bdb9 | 429 | libzcash_a_SOURCES = \ |
e1ff849d | 430 | zcash/IncrementalMerkleTree.cpp \ |
6c36a9fe | 431 | zcash/NoteEncryption.cpp \ |
369df065 SB |
432 | zcash/Address.cpp \ |
433 | zcash/JoinSplit.cpp \ | |
f0dab51c | 434 | zcash/Proof.cpp \ |
369df065 | 435 | zcash/Note.cpp \ |
81469bbb | 436 | zcash/prf.cpp \ |
58d09f27 KG |
437 | zcash/util.cpp \ |
438 | zcash/circuit/commitment.tcc \ | |
439 | zcash/circuit/gadget.tcc \ | |
440 | zcash/circuit/merkle.tcc \ | |
441 | zcash/circuit/note.tcc \ | |
442 | zcash/circuit/prfs.tcc \ | |
443 | zcash/circuit/utils.tcc | |
e463edc1 | 444 | |
f5d3d420 TH |
445 | 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) |
446 | ||
447 | libzcash_a_CXXFLAGS = $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing | |
448 | ||
449 | libzcash_a_LDFLAGS = $(HARDENED_LDFLAGS) | |
e463edc1 | 450 | |
decde386 SB |
451 | libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT |
452 | ||
08d6b02d | 453 | # zcashconsensus library # |
2cf5f16c | 454 | if BUILD_BITCOIN_LIBS |
08d6b02d JG |
455 | include_HEADERS = script/zcashconsensus.h |
456 | libzcashconsensus_la_SOURCES = \ | |
6d25662f | 457 | crypto/equihash.cpp \ |
36fa4a78 | 458 | crypto/hmac_sha512.cpp \ |
bfc60703 | 459 | crypto/ripemd160.cpp \ |
2cf5f16c | 460 | crypto/sha1.cpp \ |
36fa4a78 PW |
461 | crypto/sha256.cpp \ |
462 | crypto/sha512.cpp \ | |
2cf5f16c CF |
463 | eccryptoverify.cpp \ |
464 | ecwrapper.cpp \ | |
465 | hash.cpp \ | |
bfc60703 | 466 | primitives/transaction.cpp \ |
2cf5f16c | 467 | pubkey.cpp \ |
08d6b02d | 468 | script/zcashconsensus.cpp \ |
bfc60703 WL |
469 | script/interpreter.cpp \ |
470 | script/script.cpp \ | |
2cf5f16c CF |
471 | uint256.cpp \ |
472 | utilstrencodings.cpp | |
473 | ||
474 | if GLIBC_BACK_COMPAT | |
08d6b02d | 475 | libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp |
2cf5f16c CF |
476 | endif |
477 | ||
08d6b02d JG |
478 | libzcashconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS) |
479 | libzcashconsensus_la_LIBADD = $(CRYPTO_LIBS) | |
480 | libzcashconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL | |
72ac792b | 481 | |
cdd36c6c | 482 | endif |
72ac792b | 483 | # |
2cf5f16c | 484 | |
35b8af92 CF |
485 | CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno |
486 | ||
487 | DISTCLEANFILES = obj/build.h | |
488 | ||
4ec57478 | 489 | EXTRA_DIST = leveldb |
35b8af92 CF |
490 | |
491 | clean-local: | |
492 | -$(MAKE) -C leveldb clean | |
4300876c | 493 | -$(MAKE) -C secp256k1 clean |
26d1b65c | 494 | rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno |
54372482 | 495 | -rm -f config.h |
65e8ba4d | 496 | |
6b9f0d55 | 497 | .rc.o: |
70c71c50 | 498 | @test -f $(WINDRES) |
71697f97 | 499 | $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@ |
6b9f0d55 CF |
500 | |
501 | .mm.o: | |
70c71c50 | 502 | $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
6b9f0d55 CF |
503 | $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $< |
504 | ||
a5e918a0 CF |
505 | check-symbols: $(bin_PROGRAMS) |
506 | if GLIBC_BACK_COMPAT | |
507 | @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..." | |
508 | $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS) | |
509 | endif | |
510 | ||
56734f4b TH |
511 | check-security: $(bin_PROGRAMS) |
512 | if HARDEN | |
513 | @echo "Checking binary security of [$(bin_PROGRAMS)]..." | |
514 | $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS) | |
515 | endif | |
516 | ||
6b9f0d55 | 517 | %.pb.cc %.pb.h: %.proto |
70c71c50 CF |
518 | @test -f $(PROTOC) |
519 | $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) | |
6b9f0d55 | 520 | |
65e8ba4d CF |
521 | if ENABLE_TESTS |
522 | include Makefile.test.include | |
6bd8e469 | 523 | include Makefile.gtest.include |
65e8ba4d CF |
524 | endif |
525 | ||
526 | if ENABLE_QT | |
527 | include Makefile.qt.include | |
528 | endif | |
529 | ||
530 | if ENABLE_QT_TESTS | |
531 | include Makefile.qttest.include | |
532 | endif | |
6e96cf08 SB |
533 | |
534 | include Makefile.zcash.include |