]> Git Repo - VerusCoin.git/blob - src/Makefile.am
wip
[VerusCoin.git] / src / Makefile.am
1 DIST_SUBDIRS = secp256k1 univalue cryptoconditions
2
3 AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(SAN_LDFLAGS) $(HARDENED_LDFLAGS)
4 AM_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS)
5 AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
6
7 if EMBEDDED_LEVELDB
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
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) \
19           OPT="$(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS"
20 endif
21
22 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
23 BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
24
25 BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
26 BITCOIN_INCLUDES += -I$(srcdir)/cryptoconditions/include
27 BITCOIN_INCLUDES += -I$(srcdir)/snark
28 BITCOIN_INCLUDES += -I$(srcdir)/snark/libsnark
29 BITCOIN_INCLUDES += -I$(srcdir)/univalue/include
30
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
37 LIBBITCOIN_SERVER=libbitcoin_server.a
38 endif
39
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
45 LIBSECP256K1=secp256k1/libsecp256k1.la
46 LIBCRYPTOCONDITIONS=cryptoconditions/libcryptoconditions_core.la
47 LIBSNARK=snark/libsnark.a
48 LIBUNIVALUE=univalue/libunivalue.la
49 LIBZCASH=libzcash.a -lcurl
50
51 $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
52         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
53
54 LIBSNARK_CXXFLAGS = -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all
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
59
60 $(LIBSNARK): $(wildcard snark/src/*)
61         $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64"
62
63 libsnark-tests: $(wildcard snark/src/*)
64         $(AM_V_at) CXXFLAGS="$(LIBSNARK_CXXFLAGS)" $(MAKE) $(AM_MAKEFLAGS) -C snark/ check DEPINST="$(LIBSNARK_DEPINST)" $(LIBSNARK_CONFIG_FLAGS) OPTFLAGS="-O2 -march=x86-64"
65
66 $(LIBUNIVALUE): $(wildcard univalue/lib/*)
67         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C univalue/
68
69 $(LIBCRYPTOCONDITIONS): $(wildcard cryptoconditions/src/*) $(wildcard cryptoconditions/include/*)
70         $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
71
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:
74 EXTRA_LIBRARIES = \
75         crypto/libbitcoin_crypto.a \
76         libbitcoin_util.a \
77         libbitcoin_common.a \
78         libbitcoin_server.a \
79         libbitcoin_cli.a \
80         libzcash.a
81 if ENABLE_WALLET
82 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
83 EXTRA_LIBRARIES += libbitcoin_wallet.a
84 endif
85 if ENABLE_ZMQ
86 EXTRA_LIBRARIES += libbitcoin_zmq.a
87 endif
88 if ENABLE_PROTON
89 EXTRA_LIBRARIES += libbitcoin_proton.a
90 endif
91
92 if BUILD_BITCOIN_LIBS
93 lib_LTLIBRARIES = libzcashconsensus.la
94 LIBZCASH_CONSENSUS=libzcashconsensus.la
95 else
96 LIBZCASH_CONSENSUS=
97 endif
98
99 bin_PROGRAMS =
100 noinst_PROGRAMS =
101 TESTS =
102
103 #if BUILD_BITCOIND
104   bin_PROGRAMS += komodod
105 #endif
106
107 if BUILD_BITCOIN_UTILS
108   bin_PROGRAMS += komodo-cli komodo-tx
109 endif
110 if ENABLE_WALLET
111   bin_PROGRAMS += wallet-utility
112 endif
113
114
115 LIBZCASH_H = \
116   zcash/IncrementalMerkleTree.hpp \
117   zcash/NoteEncryption.hpp \
118   zcash/Address.hpp \
119   zcash/JoinSplit.hpp \
120   zcash/Note.hpp \
121   zcash/prf.h \
122   zcash/Proof.hpp \
123   zcash/util.h \
124   zcash/Zcash.h
125
126 .PHONY: FORCE collate-libsnark check-symbols check-security
127 # bitcoin core #
128 BITCOIN_CORE_H = \
129   addressindex.h \
130   spentindex.h \
131   addrman.h \
132   alert.h \
133   amount.h \
134   amqp/amqpabstractnotifier.h \
135   amqp/amqpconfig.h \
136   amqp/amqpnotificationinterface.h \
137   amqp/amqppublishnotifier.h \
138   amqp/amqpsender.h \
139   arith_uint256.h \
140   asyncrpcoperation.h \
141   asyncrpcqueue.h \
142   base58.h \
143   bloom.h \
144   cc/eval.h \
145   chain.h \
146   chainparams.h \
147   chainparamsbase.h \
148   chainparamsseeds.h \
149   checkpoints.h \
150   checkqueue.h \
151   clientversion.h \
152   coincontrol.h \
153   coins.h \
154   compat.h \
155   compat/byteswap.h \
156   compat/endian.h \
157   compat/sanity.h \
158   compressor.h \
159   consensus/consensus.h \
160   consensus/params.h \
161   consensus/upgrades.h \
162   consensus/validation.h \
163   core_io.h \
164   core_memusage.h \
165   deprecation.h \
166   hash.h \
167   httprpc.h \
168   httpserver.h \
169   init.h \
170   key.h \
171   keystore.h \
172   leveldbwrapper.h \
173   limitedmap.h \
174   main.h \
175   memusage.h \
176   merkleblock.h \
177   metrics.h \
178   miner.h \
179   mruset.h \
180   net.h \
181   netbase.h \
182   noui.h \
183   paymentdisclosure.h \
184   paymentdisclosuredb.h \
185   policy/fees.h \
186   pow.h \
187   primitives/block.h \
188   primitives/transaction.h \
189   protocol.h \
190   pubkey.h \
191   random.h \
192   reverselock.h \
193   rpcclient.h \
194   rpcprotocol.h \
195   rpcserver.h \
196   scheduler.h \
197   script/interpreter.h \
198   script/script.h \
199   script/script_error.h \
200   script/serverchecker.h \
201   script/sign.h \
202   script/standard.h \
203   serialize.h \
204   streams.h \
205   support/allocators/secure.h \
206   support/allocators/zeroafterfree.h \
207   support/cleanse.h \
208   support/events.h \
209   support/pagelocker.h \
210   sync.h \
211   threadsafety.h \
212   timedata.h \
213   tinyformat.h \
214   torcontrol.h \
215   txdb.h \
216   txmempool.h \
217   ui_interface.h \
218   uint256.h \
219   uint252.h \
220   undo.h \
221   util.h \
222   utilmoneystr.h \
223   utilstrencodings.h \
224   utiltime.h \
225   validationinterface.h \
226   version.h \
227   wallet/asyncrpcoperation_mergetoaddress.h \
228   wallet/asyncrpcoperation_sendmany.h \
229   wallet/asyncrpcoperation_shieldcoinbase.h \
230   wallet/crypter.h \
231   wallet/db.h \
232   wallet/wallet.h \
233   wallet/wallet_ismine.h \
234   wallet/walletdb.h \
235   zmq/zmqabstractnotifier.h \
236   zmq/zmqconfig.h\
237   zmq/zmqnotificationinterface.h \
238   zmq/zmqpublishnotifier.h
239
240
241 obj/build.h: FORCE
242         @$(MKDIR_P) $(builddir)/obj
243         @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
244         $(abs_top_srcdir)
245 libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
246
247 # server: zcashd
248 libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
249 libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
250 libbitcoin_server_a_SOURCES = \
251   sendalert.cpp \
252   addrman.cpp \
253   alert.cpp \
254   alertkeys.h \
255   asyncrpcoperation.cpp \
256   asyncrpcqueue.cpp \
257   bloom.cpp \
258   cc/eval.cpp \
259   cc/import.cpp \
260   cc/betprotocol.cpp \
261   chain.cpp \
262   checkpoints.cpp \
263   crosschain.cpp \
264   deprecation.cpp \
265   httprpc.cpp \
266   httpserver.cpp \
267   init.cpp \
268   leveldbwrapper.cpp \
269   main.cpp \
270   merkleblock.cpp \
271   metrics.cpp \
272   miner.cpp \
273   net.cpp \
274   noui.cpp \
275   notarisationdb.cpp \
276   paymentdisclosure.cpp \
277   paymentdisclosuredb.cpp \
278   policy/fees.cpp \
279   pow.cpp \
280   rest.cpp \
281   rpcblockchain.cpp \
282   rpcmining.cpp \
283   rpcmisc.cpp \
284   rpcnet.cpp \
285   rpcrawtransaction.cpp \
286   rpcserver.cpp \
287   script/serverchecker.cpp \
288   timedata.cpp \
289   torcontrol.cpp \
290   txdb.cpp \
291   txmempool.cpp \
292   validationinterface.cpp \
293   $(BITCOIN_CORE_H) \
294   $(LIBZCASH_H)
295
296 if ENABLE_ZMQ
297 LIBBITCOIN_ZMQ=libbitcoin_zmq.a
298
299 libbitcoin_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS)
300 libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
301 libbitcoin_zmq_a_SOURCES = \
302         zmq/zmqabstractnotifier.cpp \
303         zmq/zmqnotificationinterface.cpp \
304         zmq/zmqpublishnotifier.cpp
305 endif
306
307 if ENABLE_PROTON
308 LIBBITCOIN_PROTON=libbitcoin_proton.a
309
310 libbitcoin_proton_a_CPPFLAGS = $(BITCOIN_INCLUDES)
311 libbitcoin_proton_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
312 libbitcoin_proton_a_SOURCES = \
313   amqp/amqpabstractnotifier.cpp \
314   amqp/amqpnotificationinterface.cpp \
315   amqp/amqppublishnotifier.cpp
316 endif
317
318 # wallet: zcashd, but only linked when wallet enabled
319 libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
320 libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
321 libbitcoin_wallet_a_SOURCES = \
322   utiltest.cpp \
323   utiltest.h \
324   zcbenchmarks.cpp \
325   zcbenchmarks.h \
326   wallet/asyncrpcoperation_mergetoaddress.cpp \
327   wallet/asyncrpcoperation_sendmany.cpp \
328   wallet/asyncrpcoperation_shieldcoinbase.cpp \
329   wallet/crypter.cpp \
330   wallet/db.cpp \
331   paymentdisclosure.cpp \
332   paymentdisclosuredb.cpp \
333   wallet/rpcdisclosure.cpp \
334   wallet/rpcdump.cpp \
335   wallet/rpcwallet.cpp \
336   wallet/wallet.cpp \
337   wallet/wallet_ismine.cpp \
338   wallet/walletdb.cpp \
339   $(BITCOIN_CORE_H) \
340   $(LIBZCASH_H)
341
342 # crypto primitives library
343 crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES)
344 crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
345 crypto_libbitcoin_crypto_a_SOURCES = \
346         crypto/common.h \
347         crypto/equihash.cpp \
348         crypto/equihash.h \
349         crypto/equihash.tcc \
350         crypto/hmac_sha256.cpp \
351         crypto/hmac_sha256.h \
352         crypto/hmac_sha512.cpp \
353         crypto/hmac_sha512.h \
354         crypto/ripemd160.cpp \
355         crypto/ripemd160.h \
356         crypto/sha1.cpp \
357         crypto/sha1.h \
358         crypto/sha256.cpp \
359         crypto/sha256.h \
360         crypto/sha512.cpp \
361         crypto/sha512.h
362
363 if ENABLE_MINING
364 EQUIHASH_TROMP_SOURCES = \
365         pow/tromp/equi_miner.h \
366         pow/tromp/equi.h \
367         pow/tromp/osx_barrier.h
368
369 crypto_libbitcoin_crypto_a_CPPFLAGS += \
370         -DEQUIHASH_TROMP_ATOMIC
371 crypto_libbitcoin_crypto_a_SOURCES += \
372         ${EQUIHASH_TROMP_SOURCES}
373 endif
374
375 # common: shared between zcashd and non-server tools
376 libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
377 libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
378 libbitcoin_common_a_SOURCES = \
379   amount.cpp \
380   arith_uint256.cpp \
381   base58.cpp \
382   chainparams.cpp \
383   coins.cpp \
384   compressor.cpp \
385   consensus/upgrades.cpp \
386   core_read.cpp \
387   core_write.cpp \
388   hash.cpp \
389   importcoin.cpp \
390   key.cpp \
391   keystore.cpp \
392   netbase.cpp \
393   primitives/block.cpp \
394   primitives/transaction.cpp \
395   protocol.cpp \
396   pubkey.cpp \
397   scheduler.cpp \
398   script/cc.cpp \
399   script/interpreter.cpp \
400   script/script.cpp \
401   script/script_error.cpp \
402   script/sign.cpp \
403   script/standard.cpp \
404   $(BITCOIN_CORE_H) \
405   $(LIBZCASH_H)
406
407 # util: shared between all executables.
408 # This library *must* be included to make sure that the glibc
409 # backward-compatibility objects and their sanity checks are linked.
410 libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
411 libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
412 libbitcoin_util_a_SOURCES = \
413         support/pagelocker.cpp \
414         chainparamsbase.cpp \
415         clientversion.cpp \
416         compat/glibc_sanity.cpp \
417         compat/glibcxx_sanity.cpp \
418         compat/strnlen.cpp \
419         random.cpp \
420         rpcprotocol.cpp \
421         support/cleanse.cpp \
422         sync.cpp \
423         uint256.cpp \
424         util.cpp \
425         utilmoneystr.cpp \
426         utilstrencodings.cpp \
427         utiltime.cpp \
428         $(BITCOIN_CORE_H) \
429         $(LIBZCASH_H)
430
431 if GLIBC_BACK_COMPAT
432 libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
433 endif
434
435 # cli: zcash-cli
436 libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
437 libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
438 libbitcoin_cli_a_SOURCES = \
439         rpcclient.cpp \
440         $(BITCOIN_CORE_H) \
441         $(LIBZCASH_H)
442
443 nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
444 #
445
446 # bitcoind binary #
447 komodod_SOURCES = bitcoind.cpp
448 komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
449 komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
450 komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
451
452 if TARGET_WINDOWS
453 komodod_SOURCES += bitcoind-res.rc
454 endif
455
456 komodod_LDADD = \
457   $(LIBBITCOIN_SERVER) \
458   $(LIBBITCOIN_COMMON) \
459   $(LIBUNIVALUE) \
460   $(LIBBITCOIN_UTIL) \
461   $(LIBBITCOIN_CRYPTO) \
462   $(LIBZCASH) \
463   $(LIBSNARK) \
464   $(LIBLEVELDB) \
465   $(LIBMEMENV) \
466   $(LIBSECP256K1) \
467   $(LIBCRYPTOCONDITIONS)
468
469 if ENABLE_ZMQ
470 komodod_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
471 endif
472
473 if ENABLE_WALLET
474 komodod_LDADD += libbitcoin_wallet.a
475 endif
476
477 komodod_LDADD += \
478   $(BOOST_LIBS) \
479   $(BDB_LIBS) \
480   $(SSL_LIBS) \
481   $(CRYPTO_LIBS) \
482   $(EVENT_PTHREADS_LIBS) \
483   $(EVENT_LIBS) \
484   $(LIBBITCOIN_CRYPTO) \
485   $(LIBZCASH_LIBS)
486
487 if ENABLE_PROTON
488 komodod_LDADD += $(LIBBITCOIN_PROTON) $(PROTON_LIBS)
489 endif
490
491 # bitcoin-cli binary #
492 komodo_cli_SOURCES = bitcoin-cli.cpp
493 komodo_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
494 komodo_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
495 komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
496
497 # wallet-utility binary #
498 if ENABLE_WALLET
499 wallet_utility_SOURCES = wallet-utility.cpp
500 wallet_utility_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
501 wallet_utility_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
502 wallet_utility_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
503 endif
504
505 if TARGET_WINDOWS
506 komodo_cli_SOURCES += bitcoin-cli-res.rc
507 endif
508
509 komodo_cli_LDADD = \
510         $(LIBBITCOIN_CLI) \
511         $(LIBUNIVALUE) \
512         $(LIBBITCOIN_UTIL) \
513         $(BOOST_LIBS) \
514         $(SSL_LIBS) \
515         $(CRYPTO_LIBS) \
516         $(EVENT_LIBS) \
517         $(LIBZCASH) \
518         $(LIBBITCOIN_CRYPTO) \
519         $(LIBZCASH_LIBS)
520
521 if ENABLE_WALLET
522 wallet_utility_LDADD = \
523         libbitcoin_wallet.a \
524         $(LIBBITCOIN_COMMON) \
525         $(LIBBITCOIN_CRYPTO) \
526         $(LIBSECP256K1) \
527         $(LIBBITCOIN_UTIL) \
528         $(BOOST_LIBS) \
529         $(BDB_LIBS) \
530         $(CRYPTO_LIBS) \
531         $(LIBZCASH) \
532         $(LIBSNARK) \
533         $(LIBZCASH_LIBS)\
534   $(LIBCRYPTOCONDITIONS)
535 endif
536
537 # zcash-tx binary #
538 komodo_tx_SOURCES = komodo-tx.cpp
539 komodo_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
540 komodo_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
541 komodo_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
542
543 if TARGET_WINDOWS
544 komodo_tx_SOURCES += bitcoin-tx-res.rc
545 endif
546
547 # FIXME: Is libzcash needed for zcash_tx?
548 komodo_tx_LDADD = \
549   $(LIBUNIVALUE) \
550   $(LIBBITCOIN_COMMON) \
551   $(LIBBITCOIN_UTIL) \
552   $(LIBSECP256K1) \
553   $(LIBZCASH) \
554   $(LIBSNARK) \
555   $(LIBBITCOIN_CRYPTO) \
556   $(LIBZCASH_LIBS) \
557   $(LIBCRYPTOCONDITIONS)
558
559 komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
560 #
561
562 # zcash protocol primitives #
563 libzcash_a_SOURCES = \
564         zcash/IncrementalMerkleTree.cpp \
565         zcash/NoteEncryption.cpp \
566         zcash/Address.cpp \
567         zcash/JoinSplit.cpp \
568         zcash/Proof.cpp \
569         zcash/Note.cpp \
570         zcash/prf.cpp \
571         zcash/util.cpp \
572         zcash/circuit/commitment.tcc \
573         zcash/circuit/gadget.tcc \
574         zcash/circuit/merkle.tcc \
575         zcash/circuit/note.tcc \
576         zcash/circuit/prfs.tcc \
577         zcash/circuit/utils.tcc
578
579 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)
580
581 libzcash_a_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing
582 libzcash_a_LDFLAGS = $(SAN_LDFLAGS) $(HARDENED_LDFLAGS)
583 libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT
584
585 # zcashconsensus library #
586 if BUILD_BITCOIN_LIBS
587 include_HEADERS = script/zcashconsensus.h
588 libzcashconsensus_la_SOURCES = \
589   crypto/equihash.cpp \
590   crypto/hmac_sha512.cpp \
591   crypto/ripemd160.cpp \
592   crypto/sha1.cpp \
593   crypto/sha256.cpp \
594   crypto/sha512.cpp \
595   hash.cpp \
596   primitives/transaction.cpp \
597   pubkey.cpp \
598   script/zcashconsensus.cpp \
599   script/interpreter.cpp \
600   script/script.cpp \
601   uint256.cpp \
602   utilstrencodings.cpp
603
604 if GLIBC_BACK_COMPAT
605 libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp
606 endif
607
608 libzcashconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
609 libzcashconsensus_la_LIBADD = $(LIBSECP256K1)
610 libzcashconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -I$(srcdir)/cryptoconditions/include -DBUILD_BITCOIN_INTERNAL
611 libzcashconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
612
613 endif
614 #
615
616 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno */*.gcno wallet/*/*.gcno
617
618 DISTCLEANFILES = obj/build.h
619
620 EXTRA_DIST = leveldb snark
621
622 clean-local:
623         -$(MAKE) -C leveldb clean
624         -$(MAKE) -C secp256k1 clean
625         -$(MAKE) -C snark clean
626         rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
627         -rm -f config.h
628
629 .rc.o:
630         @test -f $(WINDRES)
631         $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@
632
633 .mm.o:
634         $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
635           $(CPPFLAGS) $(AM_CXXFLAGS) $(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) -c -o $@ $<
636
637 check-symbols: $(bin_PROGRAMS)
638 if GLIBC_BACK_COMPAT
639         @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..."
640         $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS)
641 endif
642
643 check-security: $(bin_PROGRAMS)
644 if HARDEN
645         @echo "Checking binary security of [$(bin_PROGRAMS)]..."
646         $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS)
647 endif
648
649 %.pb.cc %.pb.h: %.proto
650         @test -f $(PROTOC)
651         $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
652
653 if ENABLE_TESTS
654 include Makefile.ktest.include
655 #include Makefile.test.include
656 #include Makefile.gtest.include
657 endif
658
659 include Makefile.zcash.include
This page took 0.057999 seconds and 4 git commands to generate.