]>
Commit | Line | Data |
---|---|---|
07f83521 | 1 | DIST_SUBDIRS = secp256k1 univalue cryptoconditions |
eb12a14d | 2 | |
c4379e3a JG |
3 | AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(SAN_LDFLAGS) $(HARDENED_LDFLAGS) |
4 | AM_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS) | |
c459de2f | 5 | AM_CPPFLAGS = $(HARDENED_CPPFLAGS) |
35b8af92 | 6 | |
6b9f0d55 | 7 | if EMBEDDED_LEVELDB |
56c157d5 CF |
8 | LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include |
9 | LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv | |
10 | LIBLEVELDB += $(builddir)/leveldb/libleveldb.a | |
11 | LIBMEMENV += $(builddir)/leveldb/libmemenv.a | |
6b9f0d55 CF |
12 | |
13 | # 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 | |
14 | $(LIBLEVELDB): $(LIBMEMENV) | |
15 | ||
16 | $(LIBLEVELDB) $(LIBMEMENV): | |
17 | @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \ | |
18 | CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \ | |
c459de2f | 19 | OPT="$(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS" |
6b9f0d55 CF |
20 | endif |
21 | ||
54372482 | 22 | BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config |
6b099402 | 23 | BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS) |
f4d81129 | 24 | |
55668266 | 25 | BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include |
9e74de25 | 26 | BITCOIN_INCLUDES += -I$(srcdir)/cryptoconditions/include |
a55c186a | 27 | BITCOIN_INCLUDES += -I$(srcdir)/snark |
28 | BITCOIN_INCLUDES += -I$(srcdir)/snark/libsnark | |
a10a6e2a | 29 | BITCOIN_INCLUDES += -I$(srcdir)/univalue/include |
55668266 | 30 | |
9d365796 | 31 | if TARGET_WINDOWS |
32 | LIBBITCOIN_SERVER=libbitcoin_server.a -lcurl | |
33 | endif | |
34 | if TARGET_DARWIN | |
35 | LIBBITCOIN_SERVER=libbitcoin_server.a -lcurl | |
36 | else | |
84ce18ca | 37 | LIBBITCOIN_SERVER=libbitcoin_server.a |
9d365796 | 38 | endif |
39 | ||
84ce18ca WL |
40 | LIBBITCOIN_WALLET=libbitcoin_wallet.a |
41 | LIBBITCOIN_COMMON=libbitcoin_common.a | |
42 | LIBBITCOIN_CLI=libbitcoin_cli.a | |
43 | LIBBITCOIN_UTIL=libbitcoin_util.a | |
44 | LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a | |
07a99017 | 45 | LIBSECP256K1=secp256k1/libsecp256k1.la |
2c8d8268 | 46 | LIBCRYPTOCONDITIONS=cryptoconditions/libcryptoconditions_core.la |
a55c186a | 47 | LIBSNARK=snark/libsnark.a |
1dc62631 | 48 | LIBUNIVALUE=univalue/libunivalue.la |
cc686fe5 | 49 | LIBZCASH=libzcash.a -lcurl |
07a99017 PW |
50 | |
51 | $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*) | |
4300876c | 52 | $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) |
84ce18ca | 53 | |
d66bf190 | 54 | LIBSNARK_CXXFLAGS = -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all |
daad2c27 JG |
55 | LIBSNARK_CONFIG_FLAGS = CURVE=ALT_BN128 NO_PROCPS=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT NO_COPY_DEPINST=1 NO_COMPILE_LIBGTEST=1 |
56 | if HAVE_OPENMP | |
57 | LIBSNARK_CONFIG_FLAGS += MULTICORE=1 | |
58 | endif | |
82e839e4 | 59 | |
26a8f68e | 60 | $(LIBSNARK): $(wildcard snark/src/*) |
a55c186a | 61 | $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64" |
82e839e4 JG |
62 | |
63 | libsnark-tests: $(wildcard snark/src/*) | |
a55c186a | 64 | $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64" |
26a8f68e | 65 | |
fbc98d77 JS |
66 | $(LIBUNIVALUE): $(wildcard univalue/lib/*) |
67 | $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue/ | |
84ce18ca | 68 | |
07f83521 SS |
69 | $(LIBCRYPTOCONDITIONS): $(wildcard cryptoconditions/src/*) $(wildcard cryptoconditions/include/*) |
70 | $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) | |
71 | ||
071473c5 | 72 | # Make is not made aware of per-object dependencies to avoid limiting building parallelization |
73 | # But to build the less dependent modules first, we manually select their order here: | |
fe925e22 | 74 | EXTRA_LIBRARIES = \ |
8b78a819 T |
75 | crypto/libbitcoin_crypto.a \ |
76 | libbitcoin_util.a \ | |
77 | libbitcoin_common.a \ | |
78 | libbitcoin_server.a \ | |
79 | libbitcoin_cli.a \ | |
80 | libzcash.a | |
4f9e993b | 81 | if ENABLE_WALLET |
f4d81129 | 82 | BITCOIN_INCLUDES += $(BDB_CPPFLAGS) |
fe925e22 | 83 | EXTRA_LIBRARIES += libbitcoin_wallet.a |
4f9e993b | 84 | endif |
f200002c JG |
85 | if ENABLE_ZMQ |
86 | EXTRA_LIBRARIES += libbitcoin_zmq.a | |
87 | endif | |
99eb947a S |
88 | if ENABLE_PROTON |
89 | EXTRA_LIBRARIES += libbitcoin_proton.a | |
90 | endif | |
35b8af92 | 91 | |
cdd36c6c | 92 | if BUILD_BITCOIN_LIBS |
08d6b02d JG |
93 | lib_LTLIBRARIES = libzcashconsensus.la |
94 | LIBZCASH_CONSENSUS=libzcashconsensus.la | |
cdd36c6c | 95 | else |
08d6b02d | 96 | LIBZCASH_CONSENSUS= |
cdd36c6c | 97 | endif |
2cf5f16c | 98 | |
f930341d | 99 | bin_PROGRAMS = |
8e0fc390 | 100 | noinst_PROGRAMS = |
65e8ba4d | 101 | TESTS = |
f930341d | 102 | |
f64557f7 | 103 | #if BUILD_BITCOIND |
5166804f | 104 | bin_PROGRAMS += komodod |
f64557f7 | 105 | #endif |
f930341d | 106 | |
c101c769 | 107 | if BUILD_BITCOIN_UTILS |
5da8e41d | 108 | bin_PROGRAMS += komodo-cli komodo-tx |
109 | endif | |
110 | if ENABLE_WALLET | |
111 | bin_PROGRAMS += wallet-utility | |
f930341d | 112 | endif |
35b8af92 | 113 | |
4d9b5edb | 114 | |
1785bdb9 | 115 | LIBZCASH_H = \ |
c06664fb | 116 | zcash/IncrementalMerkleTree.hpp \ |
6c36a9fe | 117 | zcash/NoteEncryption.hpp \ |
369df065 SB |
118 | zcash/Address.hpp \ |
119 | zcash/JoinSplit.hpp \ | |
120 | zcash/Note.hpp \ | |
81469bbb | 121 | zcash/prf.h \ |
9ffe371d | 122 | zcash/Proof.hpp \ |
cc552e4d KG |
123 | zcash/util.h \ |
124 | zcash/Zcash.h | |
e463edc1 | 125 | |
99ca5e1a | 126 | .PHONY: FORCE collate-libsnark check-symbols check-security |
35b8af92 | 127 | # bitcoin core # |
5a407bd0 | 128 | BITCOIN_CORE_H = \ |
8b78a819 T |
129 | addressindex.h \ |
130 | spentindex.h \ | |
5a407bd0 WL |
131 | addrman.h \ |
132 | alert.h \ | |
a372168e | 133 | amount.h \ |
99eb947a S |
134 | amqp/amqpabstractnotifier.h \ |
135 | amqp/amqpconfig.h \ | |
136 | amqp/amqpnotificationinterface.h \ | |
137 | amqp/amqppublishnotifier.h \ | |
138 | amqp/amqpsender.h \ | |
bfc60703 | 139 | arith_uint256.h \ |
fc72c078 S |
140 | asyncrpcoperation.h \ |
141 | asyncrpcqueue.h \ | |
7cd0af7c | 142 | base58.h \ |
5a407bd0 | 143 | bloom.h \ |
2c8d8268 | 144 | cc/eval.h \ |
e8b5f0d5 | 145 | chain.h \ |
bfc60703 | 146 | chainparams.h \ |
ff734e90 | 147 | chainparamsbase.h \ |
a60120e9 | 148 | chainparamsseeds.h \ |
5a407bd0 WL |
149 | checkpoints.h \ |
150 | checkqueue.h \ | |
151 | clientversion.h \ | |
152 | coincontrol.h \ | |
153 | coins.h \ | |
154 | compat.h \ | |
ff734e90 JT |
155 | compat/byteswap.h \ |
156 | compat/endian.h \ | |
157 | compat/sanity.h \ | |
561e9e9d | 158 | compressor.h \ |
691161d4 | 159 | consensus/consensus.h \ |
bd006110 | 160 | consensus/params.h \ |
780f526b | 161 | consensus/upgrades.h \ |
da29ecbc | 162 | consensus/validation.h \ |
ae775b5b | 163 | core_io.h \ |
6bd1d60c | 164 | core_memusage.h \ |
5b3bc971 | 165 | deprecation.h \ |
5a407bd0 | 166 | hash.h \ |
afd64f76 WL |
167 | httprpc.h \ |
168 | httpserver.h \ | |
5a407bd0 WL |
169 | init.h \ |
170 | key.h \ | |
171 | keystore.h \ | |
172 | leveldbwrapper.h \ | |
173 | limitedmap.h \ | |
174 | main.h \ | |
540629c6 | 175 | memusage.h \ |
afd4b94b | 176 | merkleblock.h \ |
a6df7ab5 | 177 | metrics.h \ |
5a407bd0 WL |
178 | miner.h \ |
179 | mruset.h \ | |
5a407bd0 | 180 | net.h \ |
ff734e90 | 181 | netbase.h \ |
5a407bd0 | 182 | noui.h \ |
45232b19 S |
183 | paymentdisclosure.h \ |
184 | paymentdisclosuredb.h \ | |
b649e039 | 185 | policy/fees.h \ |
df852d2b | 186 | pow.h \ |
bfc60703 WL |
187 | primitives/block.h \ |
188 | primitives/transaction.h \ | |
5a407bd0 | 189 | protocol.h \ |
d2e74c55 | 190 | pubkey.h \ |
6354935c | 191 | random.h \ |
6b51b9b1 | 192 | reverselock.h \ |
fb78cc23 WL |
193 | rpcclient.h \ |
194 | rpcprotocol.h \ | |
195 | rpcserver.h \ | |
928b950e | 196 | scheduler.h \ |
611116d4 | 197 | script/interpreter.h \ |
cbd22a50 | 198 | script/script.h \ |
ff734e90 | 199 | script/script_error.h \ |
2c8d8268 | 200 | script/serverchecker.h \ |
e088d65a | 201 | script/sign.h \ |
c4408a6c | 202 | script/standard.h \ |
5a407bd0 | 203 | serialize.h \ |
fa736190 | 204 | streams.h \ |
d7d187e8 CF |
205 | support/allocators/secure.h \ |
206 | support/allocators/zeroafterfree.h \ | |
1630219d | 207 | support/cleanse.h \ |
17fb6090 | 208 | support/events.h \ |
d7d187e8 | 209 | support/pagelocker.h \ |
5a407bd0 WL |
210 | sync.h \ |
211 | threadsafety.h \ | |
14f888ca | 212 | timedata.h \ |
b77dfdc9 | 213 | tinyformat.h \ |
eb5f63fe | 214 | torcontrol.h \ |
5a407bd0 WL |
215 | txdb.h \ |
216 | txmempool.h \ | |
217 | ui_interface.h \ | |
218 | uint256.h \ | |
defe37a6 | 219 | uint252.h \ |
999a2ab4 | 220 | undo.h \ |
5a407bd0 | 221 | util.h \ |
ad49c256 | 222 | utilmoneystr.h \ |
bfc60703 | 223 | utilstrencodings.h \ |
ad49c256 | 224 | utiltime.h \ |
26c16d9d | 225 | validationinterface.h \ |
5a407bd0 | 226 | version.h \ |
6e9c7629 | 227 | wallet/asyncrpcoperation_mergetoaddress.h \ |
fc72c078 | 228 | wallet/asyncrpcoperation_sendmany.h \ |
06c19063 | 229 | wallet/asyncrpcoperation_shieldcoinbase.h \ |
a354a59f | 230 | wallet/crypter.h \ |
ff734e90 | 231 | wallet/db.h \ |
50c72f23 JS |
232 | wallet/wallet.h \ |
233 | wallet/wallet_ismine.h \ | |
f200002c JG |
234 | wallet/walletdb.h \ |
235 | zmq/zmqabstractnotifier.h \ | |
236 | zmq/zmqconfig.h\ | |
237 | zmq/zmqnotificationinterface.h \ | |
238 | zmq/zmqpublishnotifier.h | |
239 | ||
35b8af92 CF |
240 | |
241 | obj/build.h: FORCE | |
56c157d5 | 242 | @$(MKDIR_P) $(builddir)/obj |
35b8af92 | 243 | @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \ |
8b78a819 | 244 | $(abs_top_srcdir) |
71697f97 | 245 | libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h |
35b8af92 | 246 | |
38ba3c66 | 247 | # server: zcashd |
c459de2f CF |
248 | libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) |
249 | libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
4f9e993b | 250 | libbitcoin_server_a_SOURCES = \ |
b39e1bdb | 251 | sendalert.cpp \ |
4f9e993b WL |
252 | addrman.cpp \ |
253 | alert.cpp \ | |
7553b173 | 254 | alertkeys.h \ |
fc72c078 S |
255 | asyncrpcoperation.cpp \ |
256 | asyncrpcqueue.cpp \ | |
fb78cc23 | 257 | bloom.cpp \ |
2c8d8268 | 258 | cc/eval.cpp \ |
20c3ac51 | 259 | cc/import.cpp \ |
44a9fd7c | 260 | cc/CCassetsCore.cpp \ |
44a9fd7c | 261 | cc/CCcustom.cpp \ |
262 | cc/CCtx.cpp \ | |
263 | cc/CCutils.cpp \ | |
2abababa | 264 | cc/assets.cpp \ |
d082e563 | 265 | cc/faucet.cpp \ |
e3ec4c50 | 266 | cc/rewards.cpp \ |
0542b1cd | 267 | cc/dice.cpp \ |
43911537 | 268 | cc/lotto.cpp \ |
7137a022 | 269 | cc/fsm.cpp \ |
43911537 | 270 | cc/auction.cpp \ |
561f3e18 | 271 | cc/betprotocol.cpp \ |
e8b5f0d5 | 272 | chain.cpp \ |
4f9e993b | 273 | checkpoints.cpp \ |
20c3ac51 | 274 | crosschain.cpp \ |
5b3bc971 | 275 | deprecation.cpp \ |
afd64f76 WL |
276 | httprpc.cpp \ |
277 | httpserver.cpp \ | |
4f9e993b | 278 | init.cpp \ |
4f9e993b WL |
279 | leveldbwrapper.cpp \ |
280 | main.cpp \ | |
afd4b94b | 281 | merkleblock.cpp \ |
a6df7ab5 | 282 | metrics.cpp \ |
4a85e067 | 283 | miner.cpp \ |
4f9e993b WL |
284 | net.cpp \ |
285 | noui.cpp \ | |
20c3ac51 | 286 | notarisationdb.cpp \ |
45232b19 S |
287 | paymentdisclosure.cpp \ |
288 | paymentdisclosuredb.cpp \ | |
b649e039 | 289 | policy/fees.cpp \ |
df852d2b | 290 | pow.cpp \ |
e2655e0a | 291 | rest.cpp \ |
4f9e993b | 292 | rpcblockchain.cpp \ |
e4f943d8 | 293 | rpccrosschain.cpp \ |
4a85e067 | 294 | rpcmining.cpp \ |
652e1569 | 295 | rpcmisc.cpp \ |
4f9e993b WL |
296 | rpcnet.cpp \ |
297 | rpcrawtransaction.cpp \ | |
dfd39962 | 298 | rpcserver.cpp \ |
2c8d8268 | 299 | script/serverchecker.cpp \ |
14f888ca | 300 | timedata.cpp \ |
eb5f63fe | 301 | torcontrol.cpp \ |
4f9e993b WL |
302 | txdb.cpp \ |
303 | txmempool.cpp \ | |
26c16d9d | 304 | validationinterface.cpp \ |
e463edc1 | 305 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 306 | $(LIBZCASH_H) |
4f9e993b | 307 | |
f200002c JG |
308 | if ENABLE_ZMQ |
309 | LIBBITCOIN_ZMQ=libbitcoin_zmq.a | |
310 | ||
007148fa | 311 | libbitcoin_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS) |
c459de2f | 312 | libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) |
f200002c | 313 | libbitcoin_zmq_a_SOURCES = \ |
8b78a819 T |
314 | zmq/zmqabstractnotifier.cpp \ |
315 | zmq/zmqnotificationinterface.cpp \ | |
316 | zmq/zmqpublishnotifier.cpp | |
f200002c JG |
317 | endif |
318 | ||
99eb947a S |
319 | if ENABLE_PROTON |
320 | LIBBITCOIN_PROTON=libbitcoin_proton.a | |
321 | ||
322 | libbitcoin_proton_a_CPPFLAGS = $(BITCOIN_INCLUDES) | |
ad96d74a | 323 | libbitcoin_proton_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) |
99eb947a S |
324 | libbitcoin_proton_a_SOURCES = \ |
325 | amqp/amqpabstractnotifier.cpp \ | |
326 | amqp/amqpnotificationinterface.cpp \ | |
327 | amqp/amqppublishnotifier.cpp | |
328 | endif | |
f200002c | 329 | |
38ba3c66 | 330 | # wallet: zcashd, but only linked when wallet enabled |
c459de2f CF |
331 | libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
332 | libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
4f9e993b | 333 | libbitcoin_wallet_a_SOURCES = \ |
0bb3d40f JG |
334 | utiltest.cpp \ |
335 | utiltest.h \ | |
6962bb3d | 336 | zcbenchmarks.cpp \ |
2f3ecb44 | 337 | zcbenchmarks.h \ |
6e9c7629 | 338 | wallet/asyncrpcoperation_mergetoaddress.cpp \ |
fc72c078 | 339 | wallet/asyncrpcoperation_sendmany.cpp \ |
06c19063 | 340 | wallet/asyncrpcoperation_shieldcoinbase.cpp \ |
a354a59f | 341 | wallet/crypter.cpp \ |
50c72f23 | 342 | wallet/db.cpp \ |
45232b19 S |
343 | paymentdisclosure.cpp \ |
344 | paymentdisclosuredb.cpp \ | |
345 | wallet/rpcdisclosure.cpp \ | |
50c72f23 | 346 | wallet/rpcdump.cpp \ |
5a9f2110 | 347 | cc/CCassetstx.cpp \ |
c2f34bc3 | 348 | cc/CCtx.cpp \ |
50c72f23 JS |
349 | wallet/rpcwallet.cpp \ |
350 | wallet/wallet.cpp \ | |
351 | wallet/wallet_ismine.cpp \ | |
352 | wallet/walletdb.cpp \ | |
e463edc1 | 353 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 354 | $(LIBZCASH_H) |
0b47fe6b | 355 | |
84ce18ca | 356 | # crypto primitives library |
c459de2f CF |
357 | crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES) |
358 | crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
4791b99e | 359 | crypto_libbitcoin_crypto_a_SOURCES = \ |
8b78a819 T |
360 | crypto/common.h \ |
361 | crypto/equihash.cpp \ | |
362 | crypto/equihash.h \ | |
363 | crypto/equihash.tcc \ | |
364 | crypto/hmac_sha256.cpp \ | |
365 | crypto/hmac_sha256.h \ | |
366 | crypto/hmac_sha512.cpp \ | |
367 | crypto/hmac_sha512.h \ | |
368 | crypto/ripemd160.cpp \ | |
369 | crypto/ripemd160.h \ | |
370 | crypto/sha1.cpp \ | |
371 | crypto/sha1.h \ | |
372 | crypto/sha256.cpp \ | |
373 | crypto/sha256.h \ | |
374 | crypto/sha512.cpp \ | |
375 | crypto/sha512.h | |
4791b99e | 376 | |
2cc0a252 JG |
377 | if ENABLE_MINING |
378 | EQUIHASH_TROMP_SOURCES = \ | |
8b78a819 T |
379 | pow/tromp/equi_miner.h \ |
380 | pow/tromp/equi.h \ | |
381 | pow/tromp/osx_barrier.h | |
cbe39a38 | 382 | |
2cc0a252 | 383 | crypto_libbitcoin_crypto_a_CPPFLAGS += \ |
8b78a819 | 384 | -DEQUIHASH_TROMP_ATOMIC |
2cc0a252 | 385 | crypto_libbitcoin_crypto_a_SOURCES += \ |
8b78a819 | 386 | ${EQUIHASH_TROMP_SOURCES} |
2cc0a252 | 387 | endif |
4791b99e | 388 | |
38ba3c66 | 389 | # common: shared between zcashd and non-server tools |
c459de2f CF |
390 | libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
391 | libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
0b47fe6b | 392 | libbitcoin_common_a_SOURCES = \ |
eda37330 | 393 | amount.cpp \ |
ff734e90 | 394 | arith_uint256.cpp \ |
75c82d49 | 395 | base58.cpp \ |
0b47fe6b | 396 | chainparams.cpp \ |
75c82d49 | 397 | coins.cpp \ |
561e9e9d | 398 | compressor.cpp \ |
780f526b | 399 | consensus/upgrades.cpp \ |
ae775b5b JG |
400 | core_read.cpp \ |
401 | core_write.cpp \ | |
0b47fe6b | 402 | hash.cpp \ |
20c3ac51 | 403 | importcoin.cpp \ |
0b47fe6b | 404 | key.cpp \ |
75c82d49 | 405 | keystore.cpp \ |
0b47fe6b | 406 | netbase.cpp \ |
ff734e90 JT |
407 | primitives/block.cpp \ |
408 | primitives/transaction.cpp \ | |
0b47fe6b | 409 | protocol.cpp \ |
d2e74c55 | 410 | pubkey.cpp \ |
928b950e | 411 | scheduler.cpp \ |
8a8e10f0 | 412 | script/cc.cpp \ |
611116d4 | 413 | script/interpreter.cpp \ |
cbd22a50 | 414 | script/script.cpp \ |
ff734e90 | 415 | script/script_error.cpp \ |
e088d65a | 416 | script/sign.cpp \ |
c4408a6c | 417 | script/standard.cpp \ |
e463edc1 | 418 | $(BITCOIN_CORE_H) \ |
1785bdb9 | 419 | $(LIBZCASH_H) |
84ce18ca WL |
420 | |
421 | # util: shared between all executables. | |
422 | # This library *must* be included to make sure that the glibc | |
423 | # backward-compatibility objects and their sanity checks are linked. | |
c459de2f CF |
424 | libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
425 | libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
84ce18ca | 426 | libbitcoin_util_a_SOURCES = \ |
8b78a819 T |
427 | support/pagelocker.cpp \ |
428 | chainparamsbase.cpp \ | |
429 | clientversion.cpp \ | |
430 | compat/glibc_sanity.cpp \ | |
431 | compat/glibcxx_sanity.cpp \ | |
432 | compat/strnlen.cpp \ | |
433 | random.cpp \ | |
434 | rpcprotocol.cpp \ | |
435 | support/cleanse.cpp \ | |
436 | sync.cpp \ | |
437 | uint256.cpp \ | |
438 | util.cpp \ | |
439 | utilmoneystr.cpp \ | |
440 | utilstrencodings.cpp \ | |
441 | utiltime.cpp \ | |
442 | $(BITCOIN_CORE_H) \ | |
443 | $(LIBZCASH_H) | |
35b8af92 | 444 | |
d5aab704 | 445 | if GLIBC_BACK_COMPAT |
84ce18ca | 446 | libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp |
d5aab704 CF |
447 | endif |
448 | ||
38ba3c66 | 449 | # cli: zcash-cli |
c459de2f CF |
450 | libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
451 | libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
0b47fe6b | 452 | libbitcoin_cli_a_SOURCES = \ |
8b78a819 T |
453 | rpcclient.cpp \ |
454 | $(BITCOIN_CORE_H) \ | |
455 | $(LIBZCASH_H) | |
0b47fe6b | 456 | |
84ce18ca | 457 | nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h |
35b8af92 CF |
458 | # |
459 | ||
460 | # bitcoind binary # | |
5166804f | 461 | komodod_SOURCES = bitcoind.cpp |
9000990c | 462 | komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
463 | komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
5166804f | 464 | komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) |
72ac792b | 465 | |
466 | if TARGET_WINDOWS | |
5166804f | 467 | komodod_SOURCES += bitcoind-res.rc |
72ac792b | 468 | endif |
469 | ||
5166804f | 470 | komodod_LDADD = \ |
84ce18ca WL |
471 | $(LIBBITCOIN_SERVER) \ |
472 | $(LIBBITCOIN_COMMON) \ | |
a10a6e2a | 473 | $(LIBUNIVALUE) \ |
84ce18ca WL |
474 | $(LIBBITCOIN_UTIL) \ |
475 | $(LIBBITCOIN_CRYPTO) \ | |
1785bdb9 | 476 | $(LIBZCASH) \ |
26a8f68e | 477 | $(LIBSNARK) \ |
4a290b52 | 478 | $(LIBLEVELDB) \ |
07a99017 | 479 | $(LIBMEMENV) \ |
07f83521 SS |
480 | $(LIBSECP256K1) \ |
481 | $(LIBCRYPTOCONDITIONS) | |
55668266 | 482 | |
f200002c | 483 | if ENABLE_ZMQ |
bcba24d1 | 484 | komodod_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) |
f200002c JG |
485 | endif |
486 | ||
4f9e993b | 487 | if ENABLE_WALLET |
5166804f | 488 | komodod_LDADD += libbitcoin_wallet.a |
4f9e993b | 489 | endif |
72ac792b | 490 | |
5166804f | 491 | komodod_LDADD += \ |
c4da0970 NW |
492 | $(BOOST_LIBS) \ |
493 | $(BDB_LIBS) \ | |
494 | $(SSL_LIBS) \ | |
495 | $(CRYPTO_LIBS) \ | |
df377ca8 WL |
496 | $(EVENT_PTHREADS_LIBS) \ |
497 | $(EVENT_LIBS) \ | |
d3612b1c | 498 | $(LIBBITCOIN_CRYPTO) \ |
1785bdb9 | 499 | $(LIBZCASH_LIBS) |
35b8af92 | 500 | |
99eb947a | 501 | if ENABLE_PROTON |
253b35b2 | 502 | komodod_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS) |
99eb947a | 503 | endif |
35b8af92 | 504 | |
72ac792b | 505 | # bitcoin-cli binary # |
5166804f | 506 | komodo_cli_SOURCES = bitcoin-cli.cpp |
9000990c | 507 | komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) |
508 | komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
5166804f | 509 | komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) |
72ac792b | 510 | |
8b78a819 T |
511 | # wallet-utility binary # |
512 | if ENABLE_WALLET | |
513 | wallet_utility_SOURCES = wallet-utility.cpp | |
514 | wallet_utility_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) | |
515 | wallet_utility_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
516 | wallet_utility_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) | |
517 | endif | |
518 | ||
dee632cc | 519 | if TARGET_WINDOWS |
5166804f | 520 | komodo_cli_SOURCES += bitcoin-cli-res.rc |
dee632cc CF |
521 | endif |
522 | ||
5166804f | 523 | komodo_cli_LDADD = \ |
8b78a819 T |
524 | $(LIBBITCOIN_CLI) \ |
525 | $(LIBUNIVALUE) \ | |
526 | $(LIBBITCOIN_UTIL) \ | |
527 | $(BOOST_LIBS) \ | |
528 | $(SSL_LIBS) \ | |
529 | $(CRYPTO_LIBS) \ | |
530 | $(EVENT_LIBS) \ | |
531 | $(LIBZCASH) \ | |
532 | $(LIBBITCOIN_CRYPTO) \ | |
533 | $(LIBZCASH_LIBS) | |
534 | ||
535 | if ENABLE_WALLET | |
536 | wallet_utility_LDADD = \ | |
537 | libbitcoin_wallet.a \ | |
538 | $(LIBBITCOIN_COMMON) \ | |
539 | $(LIBBITCOIN_CRYPTO) \ | |
540 | $(LIBSECP256K1) \ | |
541 | $(LIBBITCOIN_UTIL) \ | |
542 | $(BOOST_LIBS) \ | |
543 | $(BDB_LIBS) \ | |
544 | $(CRYPTO_LIBS) \ | |
545 | $(LIBZCASH) \ | |
546 | $(LIBSNARK) \ | |
afa02103 | 547 | $(LIBZCASH_LIBS)\ |
7213e636 | 548 | $(LIBCRYPTOCONDITIONS) |
8b78a819 | 549 | endif |
2a03a390 | 550 | |
66a89c08 | 551 | # zcash-tx binary # |
4d65d051 | 552 | komodo_tx_SOURCES = komodo-tx.cpp |
9000990c | 553 | komodo_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) |
554 | komodo_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | |
4d65d051 | 555 | komodo_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) |
72ac792b | 556 | |
cc24610f | 557 | if TARGET_WINDOWS |
4d65d051 | 558 | komodo_tx_SOURCES += bitcoin-tx-res.rc |
cc24610f LD |
559 | endif |
560 | ||
66a89c08 | 561 | # FIXME: Is libzcash needed for zcash_tx? |
4d65d051 | 562 | komodo_tx_LDADD = \ |
a10a6e2a | 563 | $(LIBUNIVALUE) \ |
cbe39a38 JG |
564 | $(LIBBITCOIN_COMMON) \ |
565 | $(LIBBITCOIN_UTIL) \ | |
c4da0970 | 566 | $(LIBSECP256K1) \ |
1785bdb9 | 567 | $(LIBZCASH) \ |
26a8f68e | 568 | $(LIBSNARK) \ |
d3612b1c | 569 | $(LIBBITCOIN_CRYPTO) \ |
07f83521 SS |
570 | $(LIBZCASH_LIBS) \ |
571 | $(LIBCRYPTOCONDITIONS) | |
28d412ff | 572 | |
4d65d051 | 573 | komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS) |
cbe39a38 | 574 | # |
2a03a390 | 575 | |
c9c4611d | 576 | # zcash protocol primitives # |
1785bdb9 | 577 | libzcash_a_SOURCES = \ |
8b78a819 T |
578 | zcash/IncrementalMerkleTree.cpp \ |
579 | zcash/NoteEncryption.cpp \ | |
580 | zcash/Address.cpp \ | |
581 | zcash/JoinSplit.cpp \ | |
582 | zcash/Proof.cpp \ | |
583 | zcash/Note.cpp \ | |
584 | zcash/prf.cpp \ | |
585 | zcash/util.cpp \ | |
586 | zcash/circuit/commitment.tcc \ | |
587 | zcash/circuit/gadget.tcc \ | |
588 | zcash/circuit/merkle.tcc \ | |
589 | zcash/circuit/note.tcc \ | |
590 | zcash/circuit/prfs.tcc \ | |
591 | zcash/circuit/utils.tcc | |
e463edc1 | 592 | |
c4379e3a | 593 | libzcash_a_CPPFLAGS = -DMULTICORE -fopenmp -fPIC -DBINARY_OUTPUT -DCURVE_ALT_BN128 -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS $(HARDENED_CPPFLAGS) $(HARDENED_CXXFLAGS) $(HARDENED_LDFLAGS) -pipe $(SAN_LDFLAGS) -O1 -g -Wstack-protector $(SAN_CXXFLAGS) -fstack-protector-all -fPIE -fvisibility=hidden -DSTATIC $(BITCOIN_INCLUDES) |
e463edc1 | 594 | |
c4379e3a | 595 | libzcash_a_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing |
c4379e3a | 596 | libzcash_a_LDFLAGS = $(SAN_LDFLAGS) $(HARDENED_LDFLAGS) |
decde386 SB |
597 | libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT |
598 | ||
08d6b02d | 599 | # zcashconsensus library # |
2cf5f16c | 600 | if BUILD_BITCOIN_LIBS |
08d6b02d JG |
601 | include_HEADERS = script/zcashconsensus.h |
602 | libzcashconsensus_la_SOURCES = \ | |
6d25662f | 603 | crypto/equihash.cpp \ |
36fa4a78 | 604 | crypto/hmac_sha512.cpp \ |
bfc60703 | 605 | crypto/ripemd160.cpp \ |
2cf5f16c | 606 | crypto/sha1.cpp \ |
36fa4a78 PW |
607 | crypto/sha256.cpp \ |
608 | crypto/sha512.cpp \ | |
2cf5f16c | 609 | hash.cpp \ |
bfc60703 | 610 | primitives/transaction.cpp \ |
2cf5f16c | 611 | pubkey.cpp \ |
08d6b02d | 612 | script/zcashconsensus.cpp \ |
bfc60703 WL |
613 | script/interpreter.cpp \ |
614 | script/script.cpp \ | |
2cf5f16c CF |
615 | uint256.cpp \ |
616 | utilstrencodings.cpp | |
617 | ||
618 | if GLIBC_BACK_COMPAT | |
8b78a819 | 619 | libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp |
2cf5f16c CF |
620 | endif |
621 | ||
c459de2f | 622 | libzcashconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) |
3d02d0f6 | 623 | libzcashconsensus_la_LIBADD = $(LIBSECP256K1) |
0cb91a8d | 624 | libzcashconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -I$(srcdir)/cryptoconditions/include -DBUILD_BITCOIN_INTERNAL |
c459de2f | 625 | libzcashconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) |
72ac792b | 626 | |
cdd36c6c | 627 | endif |
72ac792b | 628 | # |
2cf5f16c | 629 | |
9773b95f | 630 | CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno */*.gcno wallet/*/*.gcno |
35b8af92 CF |
631 | |
632 | DISTCLEANFILES = obj/build.h | |
633 | ||
83bef3fc | 634 | EXTRA_DIST = leveldb snark |
35b8af92 CF |
635 | |
636 | clean-local: | |
637 | -$(MAKE) -C leveldb clean | |
4300876c | 638 | -$(MAKE) -C secp256k1 clean |
e2283742 | 639 | -$(MAKE) -C snark clean |
26d1b65c | 640 | rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno |
54372482 | 641 | -rm -f config.h |
65e8ba4d | 642 | |
6b9f0d55 | 643 | .rc.o: |
70c71c50 | 644 | @test -f $(WINDRES) |
71697f97 | 645 | $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@ |
6b9f0d55 CF |
646 | |
647 | .mm.o: | |
70c71c50 | 648 | $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
c459de2f | 649 | $(CPPFLAGS) $(AM_CXXFLAGS) $(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) -c -o $@ $< |
6b9f0d55 | 650 | |
a5e918a0 CF |
651 | check-symbols: $(bin_PROGRAMS) |
652 | if GLIBC_BACK_COMPAT | |
653 | @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..." | |
2d342736 | 654 | $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS) |
a5e918a0 CF |
655 | endif |
656 | ||
56734f4b TH |
657 | check-security: $(bin_PROGRAMS) |
658 | if HARDEN | |
659 | @echo "Checking binary security of [$(bin_PROGRAMS)]..." | |
2d342736 | 660 | $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS) |
56734f4b TH |
661 | endif |
662 | ||
6b9f0d55 | 663 | %.pb.cc %.pb.h: %.proto |
70c71c50 CF |
664 | @test -f $(PROTOC) |
665 | $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) | |
6b9f0d55 | 666 | |
4c121ffd SS |
667 | if ENABLE_TESTS |
668 | include Makefile.ktest.include | |
8962d040 | 669 | #include Makefile.test.include |
670 | #include Makefile.gtest.include | |
4c121ffd | 671 | endif |
65e8ba4d | 672 | |
6e96cf08 | 673 | include Makefile.zcash.include |