]> Git Repo - VerusCoin.git/blame_incremental - src/Makefile.am
test
[VerusCoin.git] / src / Makefile.am
... / ...
CommitLineData
1DIST_SUBDIRS = secp256k1
2AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
3
4
5if EMBEDDED_LEVELDB
6LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
7LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv
8LIBLEVELDB += $(builddir)/leveldb/libleveldb.a
9LIBMEMENV += $(builddir)/leveldb/libmemenv.a
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) \
17 OPT="$(CXXFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS"
18endif
19
20BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
21BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
22
23BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
24
25LIBBITCOIN_SERVER=libbitcoin_server.a
26LIBBITCOIN_WALLET=libbitcoin_wallet.a
27LIBBITCOIN_COMMON=libbitcoin_common.a
28LIBBITCOIN_CLI=libbitcoin_cli.a
29LIBBITCOIN_UTIL=libbitcoin_util.a
30LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
31LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
32LIBBITCOINQT=qt/libbitcoinqt.a
33LIBSECP256K1=secp256k1/libsecp256k1.la
34LIBZCASH=libzcash.a -lcurl
35
36$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
37 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
38
39# Make is not made aware of per-object dependencies to avoid limiting building parallelization
40# But to build the less dependent modules first, we manually select their order here:
41EXTRA_LIBRARIES = \
42 crypto/libbitcoin_crypto.a \
43 libbitcoin_util.a \
44 libbitcoin_common.a \
45 univalue/libbitcoin_univalue.a \
46 libbitcoin_server.a \
47 libbitcoin_cli.a \
48 libzcash.a
49if ENABLE_WALLET
50BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
51EXTRA_LIBRARIES += libbitcoin_wallet.a
52endif
53
54if BUILD_BITCOIN_LIBS
55lib_LTLIBRARIES = libzcashconsensus.la
56LIBZCASH_CONSENSUS=libzcashconsensus.la
57else
58LIBZCASH_CONSENSUS=
59endif
60
61bin_PROGRAMS =
62TESTS =
63
64if BUILD_BITCOIND
65 bin_PROGRAMS += komodod
66endif
67
68if BUILD_BITCOIN_UTILS
69 bin_PROGRAMS += komodo-cli komodo-tx
70endif
71
72LIBZCASH_H = \
73 zcash/IncrementalMerkleTree.hpp \
74 zcash/NoteEncryption.hpp \
75 zcash/Address.hpp \
76 zcash/JoinSplit.hpp \
77 zcash/Note.hpp \
78 zcash/prf.h \
79 zcash/Proof.hpp \
80 zcash/util.h \
81 zcash/Zcash.h
82
83.PHONY: FORCE check-symbols check-security
84# bitcoin core #
85BITCOIN_CORE_H = \
86 addrman.h \
87 alert.h \
88 amount.h \
89 arith_uint256.h \
90 asyncrpcoperation.h \
91 asyncrpcqueue.h \
92 base58.h \
93 bloom.h \
94 chain.h \
95 chainparams.h \
96 chainparamsbase.h \
97 chainparamsseeds.h \
98 checkpoints.h \
99 checkqueue.h \
100 clientversion.h \
101 coincontrol.h \
102 coins.h \
103 compat.h \
104 compat/byteswap.h \
105 compat/endian.h \
106 compat/sanity.h \
107 compressor.h \
108 consensus/consensus.h \
109 consensus/params.h \
110 consensus/validation.h \
111 core_io.h \
112 eccryptoverify.h \
113 ecwrapper.h \
114 hash.h \
115 init.h \
116 key.h \
117 keystore.h \
118 leveldbwrapper.h \
119 limitedmap.h \
120 main.h \
121 memusage.h \
122 merkleblock.h \
123 metrics.h \
124 miner.h \
125 mruset.h \
126 net.h \
127 netbase.h \
128 noui.h \
129 policy/fees.h \
130 pow.h \
131 primitives/block.h \
132 primitives/transaction.h \
133 protocol.h \
134 pubkey.h \
135 random.h \
136 reverselock.h \
137 rpcclient.h \
138 rpcprotocol.h \
139 rpcserver.h \
140 scheduler.h \
141 script/interpreter.h \
142 script/script.h \
143 script/script_error.h \
144 script/sigcache.h \
145 script/sign.h \
146 script/standard.h \
147 serialize.h \
148 streams.h \
149 support/allocators/secure.h \
150 support/allocators/zeroafterfree.h \
151 support/cleanse.h \
152 support/pagelocker.h \
153 sync.h \
154 threadsafety.h \
155 timedata.h \
156 tinyformat.h \
157 txdb.h \
158 txmempool.h \
159 ui_interface.h \
160 uint256.h \
161 uint252.h \
162 undo.h \
163 util.h \
164 utilmoneystr.h \
165 utilstrencodings.h \
166 utiltime.h \
167 validationinterface.h \
168 version.h \
169 wallet/asyncrpcoperation_sendmany.h \
170 wallet/crypter.h \
171 wallet/db.h \
172 wallet/wallet.h \
173 wallet/wallet_ismine.h \
174 wallet/walletdb.h
175
176JSON_H = \
177 json/json_spirit.h \
178 json/json_spirit_error_position.h \
179 json/json_spirit_reader.h \
180 json/json_spirit_reader_template.h \
181 json/json_spirit_stream_reader.h \
182 json/json_spirit_utils.h \
183 json/json_spirit_value.h \
184 json/json_spirit_writer.h \
185 json/json_spirit_writer_template.h
186
187obj/build.h: FORCE
188 @$(MKDIR_P) $(builddir)/obj
189 @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
190 $(abs_top_srcdir)
191libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
192
193# server: shared between bitcoind and bitcoin-qt
194libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
195libbitcoin_server_a_SOURCES = \
196 sendalert.cpp \
197 addrman.cpp \
198 alert.cpp \
199 alertkeys.h \
200 asyncrpcoperation.cpp \
201 asyncrpcqueue.cpp \
202 bloom.cpp \
203 chain.cpp \
204 checkpoints.cpp \
205 init.cpp \
206 leveldbwrapper.cpp \
207 main.cpp \
208 merkleblock.cpp \
209 metrics.cpp \
210 miner.cpp \
211 net.cpp \
212 noui.cpp \
213 policy/fees.cpp \
214 pow.cpp \
215 rest.cpp \
216 rpcblockchain.cpp \
217 rpcmining.cpp \
218 rpcmisc.cpp \
219 rpcnet.cpp \
220 rpcrawtransaction.cpp \
221 rpcserver.cpp \
222 script/sigcache.cpp \
223 timedata.cpp \
224 txdb.cpp \
225 txmempool.cpp \
226 validationinterface.cpp \
227 $(JSON_H) \
228 $(BITCOIN_CORE_H) \
229 $(LIBZCASH_H)
230
231# wallet: shared between bitcoind and bitcoin-qt, but only linked
232# when wallet enabled
233libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
234libbitcoin_wallet_a_SOURCES = \
235 zcbenchmarks.cpp \
236 zcbenchmarks.h \
237 wallet/asyncrpcoperation_sendmany.cpp \
238 wallet/crypter.cpp \
239 wallet/db.cpp \
240 wallet/rpcdump.cpp \
241 wallet/rpcwallet.cpp \
242 wallet/wallet.cpp \
243 wallet/wallet_ismine.cpp \
244 wallet/walletdb.cpp \
245 $(BITCOIN_CORE_H) \
246 $(LIBZCASH_H)
247
248EQUIHASH_TROMP_SOURCES = \
249 pow/tromp/equi_miner.h \
250 pow/tromp/equi.h \
251 pow/tromp/osx_barrier.h
252
253# crypto primitives library
254crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES) -DEQUIHASH_TROMP_ATOMIC
255crypto_libbitcoin_crypto_a_SOURCES = \
256 crypto/common.h \
257 crypto/equihash.cpp \
258 crypto/equihash.h \
259 crypto/equihash.tcc \
260 crypto/hmac_sha256.cpp \
261 crypto/hmac_sha256.h \
262 crypto/hmac_sha512.cpp \
263 crypto/hmac_sha512.h \
264 crypto/ripemd160.cpp \
265 crypto/ripemd160.h \
266 crypto/sha1.cpp \
267 crypto/sha1.h \
268 crypto/sha256.cpp \
269 crypto/sha256.h \
270 crypto/sha512.cpp \
271 crypto/sha512.h \
272 ${EQUIHASH_TROMP_SOURCES}
273
274# univalue JSON library
275univalue_libbitcoin_univalue_a_SOURCES = \
276 univalue/univalue.cpp \
277 univalue/univalue.h \
278 univalue/univalue_escapes.h \
279 univalue/univalue_read.cpp \
280 univalue/univalue_write.cpp
281
282# common: shared between bitcoind, and bitcoin-qt and non-server tools
283libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
284libbitcoin_common_a_SOURCES = \
285 amount.cpp \
286 arith_uint256.cpp \
287 base58.cpp \
288 chainparams.cpp \
289 coins.cpp \
290 compressor.cpp \
291 core_read.cpp \
292 core_write.cpp \
293 eccryptoverify.cpp \
294 ecwrapper.cpp \
295 hash.cpp \
296 key.cpp \
297 keystore.cpp \
298 netbase.cpp \
299 primitives/block.cpp \
300 primitives/transaction.cpp \
301 protocol.cpp \
302 pubkey.cpp \
303 scheduler.cpp \
304 script/interpreter.cpp \
305 script/script.cpp \
306 script/script_error.cpp \
307 script/sign.cpp \
308 script/standard.cpp \
309 $(BITCOIN_CORE_H) \
310 $(LIBZCASH_H)
311
312# util: shared between all executables.
313# This library *must* be included to make sure that the glibc
314# backward-compatibility objects and their sanity checks are linked.
315libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
316libbitcoin_util_a_SOURCES = \
317 support/pagelocker.cpp \
318 chainparamsbase.cpp \
319 clientversion.cpp \
320 compat/glibc_sanity.cpp \
321 compat/glibcxx_sanity.cpp \
322 compat/strnlen.cpp \
323 random.cpp \
324 rpcprotocol.cpp \
325 support/cleanse.cpp \
326 sync.cpp \
327 uint256.cpp \
328 util.cpp \
329 utilmoneystr.cpp \
330 utilstrencodings.cpp \
331 utiltime.cpp \
332 $(BITCOIN_CORE_H) \
333 $(LIBZCASH_H)
334
335if GLIBC_BACK_COMPAT
336libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
337endif
338
339# cli: shared between bitcoin-cli and bitcoin-qt
340libbitcoin_cli_a_CPPFLAGS = $(BITCOIN_INCLUDES)
341libbitcoin_cli_a_SOURCES = \
342 rpcclient.cpp \
343 $(BITCOIN_CORE_H) \
344 $(LIBZCASH_H)
345
346nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
347#
348
349# bitcoind binary #
350komodod_SOURCES = bitcoind.cpp
351komodod_CPPFLAGS = $(BITCOIN_INCLUDES)
352komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
353
354if TARGET_WINDOWS
355komodod_SOURCES += bitcoind-res.rc
356endif
357
358komodod_LDADD = \
359 $(LIBBITCOIN_SERVER) \
360 $(LIBBITCOIN_COMMON) \
361 $(LIBBITCOIN_UNIVALUE) \
362 $(LIBBITCOIN_UTIL) \
363 $(LIBBITCOIN_CRYPTO) \
364 $(LIBZCASH) \
365 $(LIBLEVELDB) \
366 $(LIBMEMENV) \
367 $(LIBSECP256K1)
368
369if ENABLE_WALLET
370komodod_LDADD += libbitcoin_wallet.a
371endif
372
373komodod_LDADD += \
374 $(BOOST_LIBS) \
375 $(BDB_LIBS) \
376 $(SSL_LIBS) \
377 $(CRYPTO_LIBS) \
378 $(MINIUPNPC_LIBS) \
379 $(LIBZCASH) \
380 $(LIBBITCOIN_CRYPTO) \
381 $(LIBZCASH_LIBS)
382#
383
384# bitcoin-cli binary #
385komodo_cli_SOURCES = bitcoin-cli.cpp
386komodo_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
387komodo_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
388
389if TARGET_WINDOWS
390komodo_cli_SOURCES += bitcoin-cli-res.rc
391endif
392
393komodo_cli_LDADD = \
394 $(LIBBITCOIN_CLI) \
395 $(LIBBITCOIN_UTIL) \
396 $(BOOST_LIBS) \
397 $(SSL_LIBS) \
398 $(CRYPTO_LIBS) \
399 $(LIBZCASH) \
400 $(LIBBITCOIN_CRYPTO) \
401 $(LIBZCASH_LIBS)
402#
403
404# zcash-tx binary #
405komodo_tx_SOURCES = komodo-tx.cpp
406komodo_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
407komodo_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
408
409if TARGET_WINDOWS
410komodo_tx_SOURCES += bitcoin-tx-res.rc
411endif
412
413# FIXME: Is libzcash needed for zcash_tx?
414komodo_tx_LDADD = \
415 $(LIBBITCOIN_UNIVALUE) \
416 $(LIBBITCOIN_COMMON) \
417 $(LIBBITCOIN_UTIL) \
418 $(LIBSECP256K1) \
419 $(LIBZCASH) \
420 $(LIBBITCOIN_CRYPTO) \
421 $(LIBZCASH_LIBS)
422
423komodo_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
424#
425
426# zcash protocol primitives #
427libzcash_a_SOURCES = \
428 zcash/IncrementalMerkleTree.cpp \
429 zcash/NoteEncryption.cpp \
430 zcash/Address.cpp \
431 zcash/JoinSplit.cpp \
432 zcash/Proof.cpp \
433 zcash/Note.cpp \
434 zcash/prf.cpp \
435 zcash/util.cpp \
436 zcash/circuit/commitment.tcc \
437 zcash/circuit/gadget.tcc \
438 zcash/circuit/merkle.tcc \
439 zcash/circuit/note.tcc \
440 zcash/circuit/prfs.tcc \
441 zcash/circuit/utils.tcc
442
443libzcash_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)
444
445libzcash_a_CXXFLAGS = $(HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing
446
447libzcash_a_LDFLAGS = $(HARDENED_LDFLAGS)
448
449libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT
450
451# zcashconsensus library #
452if BUILD_BITCOIN_LIBS
453include_HEADERS = script/zcashconsensus.h
454libzcashconsensus_la_SOURCES = \
455 crypto/equihash.cpp \
456 crypto/hmac_sha512.cpp \
457 crypto/ripemd160.cpp \
458 crypto/sha1.cpp \
459 crypto/sha256.cpp \
460 crypto/sha512.cpp \
461 eccryptoverify.cpp \
462 ecwrapper.cpp \
463 hash.cpp \
464 primitives/transaction.cpp \
465 pubkey.cpp \
466 script/zcashconsensus.cpp \
467 script/interpreter.cpp \
468 script/script.cpp \
469 uint256.cpp \
470 utilstrencodings.cpp
471
472if GLIBC_BACK_COMPAT
473 libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp
474endif
475
476libzcashconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
477libzcashconsensus_la_LIBADD = $(CRYPTO_LIBS)
478libzcashconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
479
480endif
481#
482
483CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
484
485DISTCLEANFILES = obj/build.h
486
487EXTRA_DIST = leveldb
488
489clean-local:
490 -$(MAKE) -C leveldb clean
491 -$(MAKE) -C secp256k1 clean
492 rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
493 -rm -f config.h
494
495.rc.o:
496 @test -f $(WINDRES)
497 $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@
498
499.mm.o:
500 $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
501 $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $<
502
503check-symbols: $(bin_PROGRAMS)
504if GLIBC_BACK_COMPAT
505 @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..."
506 $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS)
507endif
508
509check-security: $(bin_PROGRAMS)
510if HARDEN
511 @echo "Checking binary security of [$(bin_PROGRAMS)]..."
512 $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS)
513endif
514
515%.pb.cc %.pb.h: %.proto
516 @test -f $(PROTOC)
517 $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
518
519if ENABLE_TESTS
520include Makefile.test.include
521include Makefile.gtest.include
522endif
523
524if ENABLE_QT
525include Makefile.qt.include
526endif
527
528if ENABLE_QT_TESTS
529include Makefile.qttest.include
530endif
531
532include Makefile.zcash.include
This page took 0.026631 seconds and 4 git commands to generate.