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