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