2015-09-04 07:11:34 -07:00
DIST_SUBDIRS = secp256k1 univalue
2014-07-08 12:53:53 -07:00
AM_LDFLAGS = $( PTHREAD_CFLAGS) $( LIBTOOL_LDFLAGS)
2013-09-08 19:02:28 -07:00
2013-05-27 16:55:01 -07:00
2014-06-04 14:13:03 -07:00
i f E M B E D D E D _ L E V E L D B
2014-06-05 11:22:54 -07:00
LEVELDB_CPPFLAGS += -I$( srcdir) /leveldb/include
LEVELDB_CPPFLAGS += -I$( srcdir) /leveldb/helpers/memenv
LIBLEVELDB += $( builddir) /leveldb/libleveldb.a
LIBMEMENV += $( builddir) /leveldb/libmemenv.a
2014-06-04 14:13:03 -07:00
# 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
$(LIBLEVELDB) : $( LIBMEMENV )
$(LIBLEVELDB) $(LIBMEMENV) :
@echo "Building LevelDB ..." && $( MAKE) -C $( @D) $( @F) CXX = " $( CXX) " \
CC = " $( CC) " PLATFORM = $( TARGET_OS) AR = " $( AR) " $( LEVELDB_TARGET_FLAGS) \
2015-04-25 08:01:59 -07:00
OPT = " $( CXXFLAGS) $( CPPFLAGS) -D__STDC_LIMIT_MACROS "
2014-06-04 14:13:03 -07:00
e n d i f
2014-06-09 11:58:30 -07:00
BITCOIN_CONFIG_INCLUDES = -I$( builddir) /config
2014-08-07 08:16:07 -07:00
BITCOIN_INCLUDES = -I$( builddir) -I$( builddir) /obj $( BOOST_CPPFLAGS) $( LEVELDB_CPPFLAGS) $( CRYPTO_CFLAGS) $( SSL_CFLAGS)
2014-06-05 12:24:48 -07:00
2014-06-06 07:57:28 -07:00
BITCOIN_INCLUDES += -I$( srcdir) /secp256k1/include
2015-09-04 07:11:34 -07:00
BITCOIN_INCLUDES += -I$( srcdir) /univalue/include
2014-06-06 07:57:28 -07:00
2014-06-19 06:10:04 -07:00
LIBBITCOIN_SERVER = libbitcoin_server.a
LIBBITCOIN_WALLET = libbitcoin_wallet.a
LIBBITCOIN_COMMON = libbitcoin_common.a
LIBBITCOIN_CLI = libbitcoin_cli.a
LIBBITCOIN_UTIL = libbitcoin_util.a
LIBBITCOIN_CRYPTO = crypto/libbitcoin_crypto.a
2014-11-05 07:58:37 -08:00
LIBSECP256K1 = secp256k1/libsecp256k1.la
2015-10-07 21:09:44 -07:00
LIBUNIVALUE = univalue/libunivalue.la
2016-05-23 15:36:48 -07:00
LIBZCASH = libzcash.a
2014-11-05 07:58:37 -08:00
$(LIBSECP256K1) : $( wildcard secp 256k 1/src /*) $( wildcard secp 256k 1/include /*)
2014-11-05 17:56:45 -08:00
$( AM_V_at) $( MAKE) $( AM_MAKEFLAGS) -C $( @D) $( @F)
2017-02-09 17:56:21 -08:00
2015-10-01 04:01:58 -07:00
$(LIBUNIVALUE) : $( wildcard univalue /lib /*)
$( AM_V_at) $( MAKE) $( AM_MAKEFLAGS) -C univalue/
2014-06-19 06:10:04 -07:00
2014-10-20 23:36:09 -07:00
# Make is not made aware of per-object dependencies to avoid limiting building parallelization
# But to build the less dependent modules first, we manually select their order here:
2015-01-05 12:34:00 -08:00
EXTRA_LIBRARIES = \
2014-10-20 23:36:09 -07:00
crypto/libbitcoin_crypto.a \
2014-06-19 06:10:04 -07:00
libbitcoin_util.a \
2014-10-20 23:36:09 -07:00
libbitcoin_common.a \
libbitcoin_server.a \
2016-02-15 14:27:15 -08:00
libbitcoin_cli.a \
2016-05-23 15:36:48 -07:00
libzcash.a
2013-11-29 07:50:11 -08:00
i f E N A B L E _ W A L L E T
2014-06-05 12:24:48 -07:00
BITCOIN_INCLUDES += $( BDB_CPPFLAGS)
2015-01-05 12:34:00 -08:00
EXTRA_LIBRARIES += libbitcoin_wallet.a
2013-11-29 07:50:11 -08:00
e n d i f
2014-11-18 09:06:32 -08:00
i f E N A B L E _ Z M Q
EXTRA_LIBRARIES += libbitcoin_zmq.a
e n d i f
2013-05-27 16:55:01 -07:00
2014-11-06 19:43:19 -08:00
i f B U I L D _ B I T C O I N _ L I B S
2016-10-18 13:52:45 -07:00
lib_LTLIBRARIES = libzcashconsensus.la
LIBZCASH_CONSENSUS = libzcashconsensus.la
2014-11-06 19:43:19 -08:00
e l s e
2016-10-18 13:52:45 -07:00
LIBZCASH_CONSENSUS =
2014-11-06 19:43:19 -08:00
e n d i f
2014-10-14 15:22:55 -07:00
2013-09-07 19:44:12 -07:00
bin_PROGRAMS =
2017-01-03 02:23:21 -08:00
noinst_PROGRAMS =
2014-05-28 10:38:41 -07:00
TESTS =
2013-09-07 19:44:12 -07:00
i f B U I L D _ B I T C O I N D
2015-11-30 12:03:21 -08:00
bin_PROGRAMS += zcashd
2013-09-07 19:44:12 -07:00
e n d i f
2014-08-15 21:48:24 -07:00
i f B U I L D _ B I T C O I N _ U T I L S
2016-10-18 14:39:03 -07:00
bin_PROGRAMS += zcash-cli zcash-tx
2013-09-07 19:44:12 -07:00
e n d i f
2013-05-27 16:55:01 -07:00
2016-05-23 15:36:48 -07:00
LIBZCASH_H = \
2016-10-14 18:04:08 -07:00
zcash/IncrementalMerkleTree.hpp \
2016-03-31 21:18:36 -07:00
zcash/NoteEncryption.hpp \
2016-05-04 17:25:42 -07:00
zcash/Address.hpp \
zcash/JoinSplit.hpp \
zcash/Note.hpp \
2016-05-12 12:19:13 -07:00
zcash/prf.h \
2016-10-14 21:36:54 -07:00
zcash/Proof.hpp \
2016-10-14 21:27:32 -07:00
zcash/util.h \
zcash/Zcash.h
2016-02-15 14:27:15 -08:00
2016-01-26 11:52:56 -08:00
.PHONY : FORCE check -symbols check -security
2013-05-27 16:55:01 -07:00
# bitcoin core #
2014-01-11 06:22:07 -08:00
BITCOIN_CORE_H = \
addrman.h \
alert.h \
2014-04-22 15:46:19 -07:00
amount.h \
2014-12-15 01:22:19 -08:00
arith_uint256.h \
2016-08-16 10:33:04 -07:00
asyncrpcoperation.h \
asyncrpcqueue.h \
2014-05-09 08:56:16 -07:00
base58.h \
2014-01-11 06:22:07 -08:00
bloom.h \
2014-09-02 17:20:09 -07:00
chain.h \
2014-12-15 01:22:19 -08:00
chainparams.h \
2015-05-13 09:59:50 -07:00
chainparamsbase.h \
2014-07-24 04:52:57 -07:00
chainparamsseeds.h \
2014-01-11 06:22:07 -08:00
checkpoints.h \
checkqueue.h \
clientversion.h \
coincontrol.h \
coins.h \
compat.h \
2015-05-13 09:59:50 -07:00
compat/byteswap.h \
compat/endian.h \
compat/sanity.h \
2014-10-18 19:28:43 -07:00
compressor.h \
2015-01-24 06:29:29 -08:00
consensus/consensus.h \
2015-02-11 02:58:11 -08:00
consensus/params.h \
2015-01-24 06:57:12 -08:00
consensus/validation.h \
2014-06-23 20:10:24 -07:00
core_io.h \
2015-07-17 10:46:18 -07:00
core_memusage.h \
2014-10-21 13:05:51 -07:00
eccryptoverify.h \
2014-10-21 12:04:03 -07:00
ecwrapper.h \
2014-01-11 06:22:07 -08:00
hash.h \
evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.
- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.
- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral
- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.
- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.
By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.
What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.
Configuration options:
- `-rpcthreads`: repurposed as "number of work handler threads". Still
defaults to 4.
- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.
- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.
- `-debug=http`: low-level http activity logging
2015-01-22 22:53:17 -08:00
httprpc.h \
httpserver.h \
2014-01-11 06:22:07 -08:00
init.h \
key.h \
keystore.h \
leveldbwrapper.h \
limitedmap.h \
main.h \
2015-05-03 15:20:46 -07:00
memusage.h \
2014-10-30 15:50:15 -07:00
merkleblock.h \
2016-09-03 09:39:45 -07:00
metrics.h \
2014-01-11 06:22:07 -08:00
miner.h \
mruset.h \
net.h \
2015-05-13 09:59:50 -07:00
netbase.h \
2014-01-11 06:22:07 -08:00
noui.h \
2014-08-26 13:28:32 -07:00
policy/fees.h \
2014-03-10 08:46:53 -07:00
pow.h \
2014-12-15 01:22:19 -08:00
primitives/block.h \
primitives/transaction.h \
2014-01-11 06:22:07 -08:00
protocol.h \
2014-10-28 14:47:18 -07:00
pubkey.h \
2014-06-26 05:41:53 -07:00
random.h \
2015-09-03 09:53:00 -07:00
reverselock.h \
2013-11-20 05:18:57 -08:00
rpcclient.h \
rpcprotocol.h \
rpcserver.h \
2015-04-02 07:33:45 -07:00
scheduler.h \
2014-09-14 03:43:56 -07:00
script/interpreter.h \
2014-08-20 08:37:40 -07:00
script/script.h \
2015-05-13 09:59:50 -07:00
script/script_error.h \
2014-09-10 07:16:09 -07:00
script/sigcache.h \
2014-08-27 08:22:33 -07:00
script/sign.h \
2014-08-22 18:35:51 -07:00
script/standard.h \
2014-01-11 06:22:07 -08:00
serialize.h \
2014-10-22 12:08:30 -07:00
streams.h \
2015-01-22 12:02:44 -08:00
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
2015-01-20 16:23:25 -08:00
support/cleanse.h \
2016-12-19 22:59:42 -08:00
support/events.h \
2015-01-22 12:02:44 -08:00
support/pagelocker.h \
2014-01-11 06:22:07 -08:00
sync.h \
threadsafety.h \
2014-06-19 06:08:37 -07:00
timedata.h \
2014-01-16 06:52:37 -08:00
tinyformat.h \
2015-08-25 11:12:08 -07:00
torcontrol.h \
2014-01-11 06:22:07 -08:00
txdb.h \
txmempool.h \
ui_interface.h \
uint256.h \
2016-05-16 08:50:31 -07:00
uint252.h \
2014-10-18 10:53:37 -07:00
undo.h \
2014-01-11 06:22:07 -08:00
util.h \
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-21 07:11:09 -07:00
utilmoneystr.h \
2014-12-15 01:22:19 -08:00
utilstrencodings.h \
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-21 07:11:09 -07:00
utiltime.h \
2015-02-04 16:11:44 -08:00
validationinterface.h \
2014-01-11 06:22:07 -08:00
version.h \
2016-08-16 10:33:04 -07:00
wallet/asyncrpcoperation_sendmany.h \
2015-03-22 12:18:55 -07:00
wallet/crypter.h \
2015-05-13 09:59:50 -07:00
wallet/db.h \
2015-02-03 12:09:47 -08:00
wallet/wallet.h \
wallet/wallet_ismine.h \
2014-11-18 09:06:32 -08:00
wallet/walletdb.h \
zmq/zmqabstractnotifier.h \
zmq/zmqconfig.h\
zmq/zmqnotificationinterface.h \
zmq/zmqpublishnotifier.h
2014-01-11 06:22:07 -08:00
2013-05-27 16:55:01 -07:00
obj/build.h : FORCE
2014-06-05 11:22:54 -07:00
@$( MKDIR_P) $( builddir) /obj
2013-05-27 16:55:01 -07:00
@$( top_srcdir) /share/genbuild.sh $( abs_top_builddir) /src/obj/build.h \
$( abs_top_srcdir)
2014-10-28 18:33:23 -07:00
libbitcoin_util_a-clientversion.$(OBJEXT) : obj /build .h
2013-05-27 16:55:01 -07:00
2017-02-09 17:56:21 -08:00
# server: zcashd
2015-01-19 21:04:59 -08:00
libbitcoin_server_a_CPPFLAGS = $( BITCOIN_INCLUDES) $( MINIUPNPC_CPPFLAGS) $( EVENT_CFLAGS) $( EVENT_PTHREADS_CFLAGS)
2013-11-29 07:50:11 -08:00
libbitcoin_server_a_SOURCES = \
2016-07-15 19:57:55 -07:00
sendalert.cpp \
2013-11-29 07:50:11 -08:00
addrman.cpp \
alert.cpp \
2016-10-14 21:48:18 -07:00
alertkeys.h \
2016-08-16 10:33:04 -07:00
asyncrpcoperation.cpp \
asyncrpcqueue.cpp \
2013-11-20 05:18:57 -08:00
bloom.cpp \
2014-09-02 17:20:09 -07:00
chain.cpp \
2013-11-29 07:50:11 -08:00
checkpoints.cpp \
evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.
- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.
- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral
- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.
- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.
By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.
What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.
Configuration options:
- `-rpcthreads`: repurposed as "number of work handler threads". Still
defaults to 4.
- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.
- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.
- `-debug=http`: low-level http activity logging
2015-01-22 22:53:17 -08:00
httprpc.cpp \
httpserver.cpp \
2013-11-29 07:50:11 -08:00
init.cpp \
leveldbwrapper.cpp \
main.cpp \
2014-10-30 15:50:15 -07:00
merkleblock.cpp \
2016-09-03 09:39:45 -07:00
metrics.cpp \
2013-12-08 06:26:08 -08:00
miner.cpp \
2013-11-29 07:50:11 -08:00
net.cpp \
noui.cpp \
2014-08-26 13:28:32 -07:00
policy/fees.cpp \
2014-03-10 08:46:53 -07:00
pow.cpp \
2014-11-11 01:52:43 -08:00
rest.cpp \
2013-11-29 07:50:11 -08:00
rpcblockchain.cpp \
2013-12-08 06:26:08 -08:00
rpcmining.cpp \
2013-12-13 07:01:22 -08:00
rpcmisc.cpp \
2013-11-29 07:50:11 -08:00
rpcnet.cpp \
rpcrawtransaction.cpp \
2014-03-25 03:34:28 -07:00
rpcserver.cpp \
2014-11-06 00:24:41 -08:00
script/sigcache.cpp \
2014-06-19 06:08:37 -07:00
timedata.cpp \
2015-08-25 11:12:08 -07:00
torcontrol.cpp \
2013-11-29 07:50:11 -08:00
txdb.cpp \
txmempool.cpp \
2015-02-04 16:11:44 -08:00
validationinterface.cpp \
2016-02-15 14:27:15 -08:00
$( BITCOIN_CORE_H) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_H)
2013-11-29 07:50:11 -08:00
2014-11-18 09:06:32 -08:00
i f E N A B L E _ Z M Q
LIBBITCOIN_ZMQ = libbitcoin_zmq.a
2015-10-07 21:00:03 -07:00
libbitcoin_zmq_a_CPPFLAGS = $( BITCOIN_INCLUDES) $( ZMQ_CFLAGS)
2014-11-18 09:06:32 -08:00
libbitcoin_zmq_a_SOURCES = \
zmq/zmqabstractnotifier.cpp \
zmq/zmqnotificationinterface.cpp \
zmq/zmqpublishnotifier.cpp
e n d i f
2017-02-09 17:56:21 -08:00
# wallet: zcashd, but only linked when wallet enabled
2014-06-05 12:24:48 -07:00
libbitcoin_wallet_a_CPPFLAGS = $( BITCOIN_INCLUDES)
2013-11-29 07:50:11 -08:00
libbitcoin_wallet_a_SOURCES = \
2016-11-17 01:26:46 -08:00
utiltest.cpp \
utiltest.h \
2016-04-07 14:37:39 -07:00
zcbenchmarks.cpp \
2016-10-14 22:15:56 -07:00
zcbenchmarks.h \
2016-08-16 10:33:04 -07:00
wallet/asyncrpcoperation_sendmany.cpp \
2015-03-22 12:18:55 -07:00
wallet/crypter.cpp \
2015-02-03 12:09:47 -08:00
wallet/db.cpp \
wallet/rpcdump.cpp \
wallet/rpcwallet.cpp \
wallet/wallet.cpp \
wallet/wallet_ismine.cpp \
wallet/walletdb.cpp \
2016-02-15 14:27:15 -08:00
$( BITCOIN_CORE_H) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_H)
2013-11-27 06:41:12 -08:00
2014-06-19 06:10:04 -07:00
# crypto primitives library
2016-11-06 11:40:34 -08:00
crypto_libbitcoin_crypto_a_CPPFLAGS = $( BITCOIN_CONFIG_INCLUDES)
2014-06-09 12:17:27 -07:00
crypto_libbitcoin_crypto_a_SOURCES = \
crypto/common.h \
2016-02-28 12:15:53 -08:00
crypto/equihash.cpp \
crypto/equihash.h \
2016-10-14 21:19:21 -07:00
crypto/equihash.tcc \
2015-05-13 09:59:50 -07:00
crypto/hmac_sha256.cpp \
2014-10-26 01:38:13 -07:00
crypto/hmac_sha256.h \
2015-05-13 09:59:50 -07:00
crypto/hmac_sha512.cpp \
2014-10-26 01:23:23 -07:00
crypto/hmac_sha512.h \
2015-05-13 09:59:50 -07:00
crypto/ripemd160.cpp \
crypto/ripemd160.h \
crypto/sha1.cpp \
2014-06-09 12:17:27 -07:00
crypto/sha1.h \
2015-05-13 09:59:50 -07:00
crypto/sha256.cpp \
crypto/sha256.h \
crypto/sha512.cpp \
2016-11-06 11:40:34 -08:00
crypto/sha512.h
i f E N A B L E _ M I N I N G
EQUIHASH_TROMP_SOURCES = \
pow/tromp/equi_miner.h \
pow/tromp/equi.h \
pow/tromp/osx_barrier.h
crypto_libbitcoin_crypto_a_CPPFLAGS += \
-DEQUIHASH_TROMP_ATOMIC
crypto_libbitcoin_crypto_a_SOURCES += \
2016-10-19 22:03:16 -07:00
${ EQUIHASH_TROMP_SOURCES }
2016-11-06 11:40:34 -08:00
e n d i f
2014-06-09 12:17:27 -07:00
2017-02-09 17:56:21 -08:00
# common: shared between zcashd and non-server tools
2014-06-05 12:24:48 -07:00
libbitcoin_common_a_CPPFLAGS = $( BITCOIN_INCLUDES)
2013-11-27 06:41:12 -08:00
libbitcoin_common_a_SOURCES = \
2014-10-22 17:05:11 -07:00
amount.cpp \
2015-05-13 09:59:50 -07:00
arith_uint256.cpp \
2014-06-25 01:03:00 -07:00
base58.cpp \
2013-11-27 06:41:12 -08:00
chainparams.cpp \
2014-06-25 01:03:00 -07:00
coins.cpp \
2014-10-18 19:28:43 -07:00
compressor.cpp \
2014-06-23 20:10:24 -07:00
core_read.cpp \
core_write.cpp \
2014-10-21 13:05:51 -07:00
eccryptoverify.cpp \
2014-10-21 12:04:03 -07:00
ecwrapper.cpp \
2013-11-27 06:41:12 -08:00
hash.cpp \
key.cpp \
2014-06-25 01:03:00 -07:00
keystore.cpp \
2013-11-27 06:41:12 -08:00
netbase.cpp \
2015-05-13 09:59:50 -07:00
primitives/block.cpp \
primitives/transaction.cpp \
2013-11-27 06:41:12 -08:00
protocol.cpp \
2014-10-28 14:47:18 -07:00
pubkey.cpp \
2015-04-02 07:33:45 -07:00
scheduler.cpp \
2014-09-14 03:43:56 -07:00
script/interpreter.cpp \
2014-08-20 08:37:40 -07:00
script/script.cpp \
2015-05-13 09:59:50 -07:00
script/script_error.cpp \
2014-08-27 08:22:33 -07:00
script/sign.cpp \
2014-08-22 18:35:51 -07:00
script/standard.cpp \
2016-02-15 14:27:15 -08:00
$( BITCOIN_CORE_H) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_H)
2014-06-19 06:10:04 -07:00
# util: shared between all executables.
# This library *must* be included to make sure that the glibc
# backward-compatibility objects and their sanity checks are linked.
libbitcoin_util_a_CPPFLAGS = $( BITCOIN_INCLUDES)
libbitcoin_util_a_SOURCES = \
2015-01-22 12:02:44 -08:00
support/pagelocker.cpp \
2014-06-19 06:10:04 -07:00
chainparamsbase.cpp \
2014-10-28 18:33:23 -07:00
clientversion.cpp \
2014-12-15 01:22:19 -08:00
compat/glibc_sanity.cpp \
compat/glibcxx_sanity.cpp \
compat/strnlen.cpp \
2014-06-26 05:41:53 -07:00
random.cpp \
2014-06-19 06:10:04 -07:00
rpcprotocol.cpp \
2015-01-20 16:23:25 -08:00
support/cleanse.cpp \
2013-11-27 06:41:12 -08:00
sync.cpp \
2014-06-28 08:35:22 -07:00
uint256.cpp \
2013-11-27 06:41:12 -08:00
util.cpp \
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-21 07:11:09 -07:00
utilmoneystr.cpp \
2014-12-15 01:22:19 -08:00
utilstrencodings.cpp \
Split up util.cpp/h
Split up util.cpp/h into:
- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)
The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).
Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-21 07:11:09 -07:00
utiltime.cpp \
2016-02-15 14:27:15 -08:00
$( BITCOIN_CORE_H) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_H)
2013-05-27 16:55:01 -07:00
2014-03-27 16:58:41 -07:00
i f G L I B C _ B A C K _ C O M P A T
2014-06-19 06:10:04 -07:00
libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
2014-03-27 16:58:41 -07:00
e n d i f
2017-02-09 17:56:21 -08:00
# cli: zcash-cli
2014-08-15 15:56:28 -07:00
libbitcoin_cli_a_CPPFLAGS = $( BITCOIN_INCLUDES)
2013-11-27 06:41:12 -08:00
libbitcoin_cli_a_SOURCES = \
rpcclient.cpp \
2016-02-15 14:27:15 -08:00
$( BITCOIN_CORE_H) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_H)
2013-11-27 06:41:12 -08:00
2014-06-19 06:10:04 -07:00
nodist_libbitcoin_util_a_SOURCES = $( srcdir) /obj/build.h
2013-05-27 16:55:01 -07:00
#
# bitcoind binary #
2015-11-30 12:03:21 -08:00
zcashd_SOURCES = bitcoind.cpp
zcashd_CPPFLAGS = $( BITCOIN_INCLUDES)
zcashd_LDFLAGS = $( RELDFLAGS) $( AM_LDFLAGS) $( LIBTOOL_APP_LDFLAGS)
2014-11-20 15:24:50 -08:00
i f T A R G E T _ W I N D O W S
2015-11-30 12:03:21 -08:00
zcashd_SOURCES += bitcoind-res.rc
2014-11-20 15:24:50 -08:00
e n d i f
2015-11-30 12:03:21 -08:00
zcashd_LDADD = \
2014-06-19 06:10:04 -07:00
$( LIBBITCOIN_SERVER) \
$( LIBBITCOIN_COMMON) \
2015-09-04 07:11:34 -07:00
$( LIBUNIVALUE) \
2014-06-19 06:10:04 -07:00
$( LIBBITCOIN_UTIL) \
$( LIBBITCOIN_CRYPTO) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH) \
2013-11-12 12:09:55 -08:00
$( LIBLEVELDB) \
2014-11-05 07:58:37 -08:00
$( LIBMEMENV) \
$( LIBSECP256K1)
2014-06-06 07:57:28 -07:00
2014-11-18 09:06:32 -08:00
i f E N A B L E _ Z M Q
zcashd_LDADD += $( LIBBITCOIN_ZMQ) $( ZMQ_LIBS)
e n d i f
2013-11-29 07:50:11 -08:00
i f E N A B L E _ W A L L E T
2015-11-30 12:03:21 -08:00
zcashd_LDADD += libbitcoin_wallet.a
2013-11-29 07:50:11 -08:00
e n d i f
2014-11-20 15:24:50 -08:00
2015-12-21 19:12:23 -08:00
zcashd_LDADD += \
$( BOOST_LIBS) \
$( BDB_LIBS) \
$( SSL_LIBS) \
$( CRYPTO_LIBS) \
$( MINIUPNPC_LIBS) \
2015-01-19 21:04:59 -08:00
$( EVENT_PTHREADS_LIBS) \
$( EVENT_LIBS) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH) \
2016-03-31 14:59:06 -07:00
$( LIBBITCOIN_CRYPTO) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_LIBS)
2013-05-27 16:55:01 -07:00
2014-11-20 15:24:50 -08:00
# bitcoin-cli binary #
2015-11-30 12:03:21 -08:00
zcash_cli_SOURCES = bitcoin-cli.cpp
2015-01-19 21:04:59 -08:00
zcash_cli_CPPFLAGS = $( BITCOIN_INCLUDES) $( EVENT_CFLAGS)
2015-11-30 12:03:21 -08:00
zcash_cli_LDFLAGS = $( RELDFLAGS) $( AM_LDFLAGS) $( LIBTOOL_APP_LDFLAGS)
2014-11-20 15:24:50 -08:00
2013-09-18 12:53:29 -07:00
i f T A R G E T _ W I N D O W S
2015-11-30 12:03:21 -08:00
zcash_cli_SOURCES += bitcoin-cli-res.rc
2013-09-18 12:53:29 -07:00
e n d i f
2015-11-30 12:03:21 -08:00
zcash_cli_LDADD = \
2014-06-19 06:10:04 -07:00
$( LIBBITCOIN_CLI) \
2015-09-04 07:11:34 -07:00
$( LIBUNIVALUE) \
2015-12-21 19:12:23 -08:00
$( LIBBITCOIN_UTIL) \
$( BOOST_LIBS) \
$( SSL_LIBS) \
$( CRYPTO_LIBS) \
2015-01-19 21:04:59 -08:00
$( EVENT_LIBS) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH) \
2016-03-31 14:59:06 -07:00
$( LIBBITCOIN_CRYPTO) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_LIBS)
2013-10-11 14:09:59 -07:00
#
2016-10-18 14:39:03 -07:00
# zcash-tx binary #
zcash_tx_SOURCES = bitcoin-tx.cpp
zcash_tx_CPPFLAGS = $( BITCOIN_INCLUDES)
zcash_tx_LDFLAGS = $( RELDFLAGS) $( AM_LDFLAGS) $( LIBTOOL_APP_LDFLAGS)
2014-11-20 15:24:50 -08:00
2015-05-02 08:30:38 -07:00
i f T A R G E T _ W I N D O W S
2016-10-18 14:39:03 -07:00
zcash_tx_SOURCES += bitcoin-tx-res.rc
2015-05-02 08:30:38 -07:00
e n d i f
2016-10-18 14:39:03 -07:00
# FIXME: Is libzcash needed for zcash_tx?
zcash_tx_LDADD = \
2015-09-04 07:11:34 -07:00
$( LIBUNIVALUE) \
2014-07-29 08:12:44 -07:00
$( LIBBITCOIN_COMMON) \
$( LIBBITCOIN_UTIL) \
2015-12-21 19:12:23 -08:00
$( LIBSECP256K1) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH) \
2016-03-31 14:59:06 -07:00
$( LIBBITCOIN_CRYPTO) \
2016-05-23 15:36:48 -07:00
$( LIBZCASH_LIBS)
2014-10-12 20:28:58 -07:00
2016-10-18 14:39:03 -07:00
zcash_tx_LDADD += $( BOOST_LIBS) $( CRYPTO_LIBS)
2014-07-29 08:12:44 -07:00
#
2013-10-11 14:09:59 -07:00
2016-07-11 18:27:52 -07:00
# zcash protocol primitives #
2016-05-23 15:36:48 -07:00
libzcash_a_SOURCES = \
2016-03-28 01:40:21 -07:00
zcash/IncrementalMerkleTree.cpp \
2016-03-31 21:18:36 -07:00
zcash/NoteEncryption.cpp \
2016-05-04 17:25:42 -07:00
zcash/Address.cpp \
zcash/JoinSplit.cpp \
2016-08-16 13:08:59 -07:00
zcash/Proof.cpp \
2016-05-04 17:25:42 -07:00
zcash/Note.cpp \
2016-05-12 12:19:13 -07:00
zcash/prf.cpp \
2016-10-14 22:03:30 -07:00
zcash/util.cpp \
zcash/circuit/commitment.tcc \
zcash/circuit/gadget.tcc \
zcash/circuit/merkle.tcc \
zcash/circuit/note.tcc \
zcash/circuit/prfs.tcc \
zcash/circuit/utils.tcc
2016-02-15 14:27:15 -08:00
2016-08-17 10:57:51 -07:00
libzcash_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)
libzcash_a_CXXFLAGS = $( HARDENED_CXXFLAGS) -fwrapv -fno-strict-aliasing
libzcash_a_LDFLAGS = $( HARDENED_LDFLAGS)
2016-02-15 14:27:15 -08:00
2016-08-18 11:21:19 -07:00
libzcash_a_CPPFLAGS += -DMONTGOMERY_OUTPUT
2016-10-18 13:52:45 -07:00
# zcashconsensus library #
2014-10-14 15:22:55 -07:00
i f B U I L D _ B I T C O I N _ L I B S
2016-10-18 13:52:45 -07:00
include_HEADERS = script/zcashconsensus.h
libzcashconsensus_la_SOURCES = \
2016-02-28 12:15:53 -08:00
crypto/equihash.cpp \
2014-10-26 01:23:23 -07:00
crypto/hmac_sha512.cpp \
2014-12-15 01:22:19 -08:00
crypto/ripemd160.cpp \
2014-10-14 15:22:55 -07:00
crypto/sha1.cpp \
2014-10-26 01:23:23 -07:00
crypto/sha256.cpp \
crypto/sha512.cpp \
2014-10-14 15:22:55 -07:00
eccryptoverify.cpp \
ecwrapper.cpp \
hash.cpp \
2014-12-15 01:22:19 -08:00
primitives/transaction.cpp \
2014-10-14 15:22:55 -07:00
pubkey.cpp \
2016-10-18 13:52:45 -07:00
script/zcashconsensus.cpp \
2014-12-15 01:22:19 -08:00
script/interpreter.cpp \
script/script.cpp \
2014-10-14 15:22:55 -07:00
uint256.cpp \
utilstrencodings.cpp
i f G L I B C _ B A C K _ C O M P A T
2016-10-18 13:52:45 -07:00
libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp
2014-10-14 15:22:55 -07:00
e n d i f
2016-10-18 13:52:45 -07:00
libzcashconsensus_la_LDFLAGS = -no-undefined $( RELDFLAGS)
libzcashconsensus_la_LIBADD = $( CRYPTO_LIBS)
libzcashconsensus_la_CPPFLAGS = $( CRYPTO_CFLAGS) -I$( builddir) /obj -DBUILD_BITCOIN_INTERNAL
2014-11-20 15:24:50 -08:00
2014-11-06 19:43:19 -08:00
e n d i f
2014-11-20 15:24:50 -08:00
#
2014-10-14 15:22:55 -07:00
2017-01-18 04:57:05 -08:00
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno */*.gcno wallet/*/*.gcno
2013-05-27 16:55:01 -07:00
DISTCLEANFILES = obj/build.h
2016-05-04 17:26:35 -07:00
EXTRA_DIST = leveldb
2013-05-27 16:55:01 -07:00
clean-local :
-$( MAKE) -C leveldb clean
2014-11-05 17:56:45 -08:00
-$( MAKE) -C secp256k1 clean
2013-11-27 18:17:17 -08:00
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
2014-06-09 11:58:30 -07:00
-rm -f config.h
2014-05-28 10:38:41 -07:00
2014-06-04 14:13:03 -07:00
.rc.o :
2014-06-05 11:17:50 -07:00
@test -f $( WINDRES)
2014-10-28 18:33:23 -07:00
$( AM_V_GEN) $( WINDRES) -DWINDRES_PREPROC -i $< -o $@
2014-06-04 14:13:03 -07:00
.mm.o :
2014-06-05 11:17:50 -07:00
$( AM_V_CXX) $( OBJCXX) $( DEFS) $( DEFAULT_INCLUDES) $( INCLUDES) $( AM_CPPFLAGS) \
2017-02-09 17:56:21 -08:00
$( CPPFLAGS) $( AM_CXXFLAGS) $( CXXFLAGS) -c -o $@ $<
2014-06-04 14:13:03 -07:00
2016-01-26 11:52:56 -08:00
check-symbols : $( bin_PROGRAMS )
i f G L I B C _ B A C K _ C O M P A T
@echo " Checking glibc back compat of [ $( bin_PROGRAMS) ]... "
$( AM_V_at) READELF = $( READELF) CPPFILT = $( CPPFILT) $( top_srcdir) /contrib/devtools/symbol-check.py < $( bin_PROGRAMS)
e n d i f
2016-07-21 12:41:06 -07:00
check-security : $( bin_PROGRAMS )
i f H A R D E N
@echo " Checking binary security of [ $( bin_PROGRAMS) ]... "
$( AM_V_at) READELF = $( READELF) OBJDUMP = $( OBJDUMP) $( top_srcdir) /contrib/devtools/security-check.py < $( bin_PROGRAMS)
e n d i f
2014-06-04 14:13:03 -07:00
%.pb.cc %.pb.h : %.proto
2014-06-05 11:17:50 -07:00
@test -f $( PROTOC)
$( AM_V_GEN) $( PROTOC) --cpp_out= $( @D) --proto_path= $( abspath $( <D) $<)
2014-06-04 14:13:03 -07:00
2014-05-28 10:38:41 -07:00
i f E N A B L E _ T E S T S
i n c l u d e M a k e f i l e . t e s t . i n c l u d e
2016-05-02 22:14:53 -07:00
i n c l u d e M a k e f i l e . g t e s t . i n c l u d e
2014-05-28 10:38:41 -07:00
e n d i f
2016-02-15 21:57:55 -08:00
i n c l u d e M a k e f i l e . z c a s h . i n c l u d e