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