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