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