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