2019-04-07 11:56:45 -07:00
|
|
|
# Copyright (c) 2016-2019 The Zcash developers
|
|
|
|
# Copyright (c) 2013-2019 The Bitcoin Core developers
|
|
|
|
# Copyright (c) 2013-2019 Bitcoin Developers
|
|
|
|
# Distributed under the MIT software license, see the accompanying
|
2019-07-18 07:16:09 -07:00
|
|
|
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
2019-04-07 11:56:45 -07:00
|
|
|
|
2017-11-15 02:14:19 -08:00
|
|
|
DIST_SUBDIRS = secp256k1 univalue
|
2013-09-08 19:02:28 -07:00
|
|
|
|
2018-03-14 20:07:16 -07:00
|
|
|
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS)
|
2018-03-15 05:05:48 -07:00
|
|
|
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS)
|
|
|
|
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS)
|
2015-03-26 16:15:28 -07:00
|
|
|
EXTRA_LIBRARIES =
|
2013-05-27 16:55:01 -07:00
|
|
|
|
2014-06-09 11:58:30 -07:00
|
|
|
BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
|
2019-10-26 06:09:25 -07:00
|
|
|
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
|
2014-06-05 12:24:48 -07:00
|
|
|
|
2020-07-10 05:51:40 -07:00
|
|
|
BITCOIN_CONFIG_INCLUDES += -I$(srcdir)/rust/include
|
2020-02-04 04:20:49 -08:00
|
|
|
BITCOIN_INCLUDES += -I$(srcdir)/rust/include
|
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_COMMON=libbitcoin_common.a
|
|
|
|
LIBBITCOIN_CLI=libbitcoin_cli.a
|
|
|
|
LIBBITCOIN_UTIL=libbitcoin_util.a
|
|
|
|
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
|
2020-02-04 04:55:35 -08:00
|
|
|
LIBRUSTZCASH=$(top_builddir)/target/$(RUST_TARGET)/release/librustzcash.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
|
|
|
|
2015-03-26 16:15:28 -07:00
|
|
|
if ENABLE_ZMQ
|
|
|
|
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
|
|
|
|
endif
|
|
|
|
if BUILD_BITCOIN_LIBS
|
|
|
|
LIBZCASH_CONSENSUS=libzcashconsensus.la
|
|
|
|
endif
|
|
|
|
if ENABLE_WALLET
|
|
|
|
LIBBITCOIN_WALLET=libbitcoin_wallet.a
|
|
|
|
endif
|
|
|
|
|
2020-02-04 04:20:49 -08:00
|
|
|
RUST_ENV_VARS = RUSTC="$(RUSTC)" TERM=dumb
|
2020-04-07 21:00:19 -07:00
|
|
|
RUST_BUILD_OPTS = --lib --release --target $(RUST_TARGET)
|
2020-02-04 04:20:49 -08:00
|
|
|
|
2020-04-07 21:08:01 -07:00
|
|
|
rust_verbose = $(rust_verbose_@AM_V@)
|
|
|
|
rust_verbose_ = $(rust_verbose_@AM_DEFAULT_V@)
|
|
|
|
rust_verbose_1 = --verbose
|
|
|
|
|
2020-02-04 04:20:49 -08:00
|
|
|
if ENABLE_ONLINE_RUST
|
|
|
|
# Ensure that .cargo/config does not exist
|
2020-02-04 04:55:35 -08:00
|
|
|
CARGO_CONFIGURED = $(top_srcdir)/.cargo/.configured-for-online
|
2020-02-04 04:20:49 -08:00
|
|
|
$(CARGO_CONFIGURED):
|
2020-02-04 04:55:35 -08:00
|
|
|
$(AM_V_at)rm -f $(top_srcdir)/.cargo/.configured-for-offline $(top_srcdir)/.cargo/config
|
2020-02-04 04:20:49 -08:00
|
|
|
$(AM_V_at)touch $@
|
|
|
|
|
|
|
|
else
|
|
|
|
# Enable dependency vendoring
|
|
|
|
RUST_BUILD_OPTS += --locked --offline
|
|
|
|
|
2020-02-04 04:55:35 -08:00
|
|
|
CARGO_CONFIGURED = $(top_srcdir)/.cargo/.configured-for-offline
|
|
|
|
$(CARGO_CONFIGURED): $(top_srcdir)/.cargo/config.offline
|
|
|
|
$(AM_V_at)rm -f $(top_srcdir)/.cargo/.configured-for-online
|
|
|
|
$(AM_V_at)cp $< $(top_srcdir)/.cargo/config
|
|
|
|
$(AM_V_at)echo "directory = \"$(RUST_VENDORED_SOURCES)\"" >>$(top_srcdir)/.cargo/config
|
2020-02-04 04:20:49 -08:00
|
|
|
$(AM_V_at)touch $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
cargo-build: $(CARGO_CONFIGURED)
|
2020-04-07 21:08:01 -07:00
|
|
|
$(RUST_ENV_VARS) $(CARGO) build $(RUST_BUILD_OPTS) $(rust_verbose) --manifest-path $(top_srcdir)/Cargo.toml
|
2020-02-04 04:20:49 -08:00
|
|
|
|
|
|
|
$(LIBRUSTZCASH): cargo-build
|
|
|
|
|
2014-11-05 07:58:37 -08:00
|
|
|
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/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-13 10:40:47 -07:00
|
|
|
$(LIBUNIVALUE): $(wildcard univalue/lib/*) $(wildcard univalue/include/*)
|
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
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-03-26 16:15:28 -07:00
|
|
|
EXTRA_LIBRARIES += \
|
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
|
|
|
$(LIBBITCOIN_UTIL) \
|
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_SERVER) \
|
|
|
|
$(LIBBITCOIN_CLI) \
|
|
|
|
$(LIBBITCOIN_WALLET) \
|
|
|
|
$(LIBBITCOIN_ZMQ) \
|
|
|
|
$(LIBZCASH)
|
2013-05-27 16:55:01 -07:00
|
|
|
|
2015-03-26 16:15:28 -07:00
|
|
|
lib_LTLIBRARIES = $(LIBZCASH_CONSENSUS)
|
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 =
|
Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)
Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.
The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.
See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'
To compile and run benchmarks:
cd src; make bench
Sample output:
Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2015-09-24 10:13:38 -07:00
|
|
|
BENCHMARKS =
|
2013-09-07 19:44:12 -07:00
|
|
|
|
|
|
|
if BUILD_BITCOIND
|
2015-11-30 12:03:21 -08:00
|
|
|
bin_PROGRAMS += zcashd
|
2013-09-07 19:44:12 -07:00
|
|
|
endif
|
|
|
|
|
2014-08-15 21:48:24 -07:00
|
|
|
if BUILD_BITCOIN_UTILS
|
2016-10-18 14:39:03 -07:00
|
|
|
bin_PROGRAMS += zcash-cli zcash-tx
|
2013-09-07 19:44:12 -07:00
|
|
|
endif
|
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 \
|
2020-02-18 07:28:04 -08:00
|
|
|
zcash/address/sapling.hpp \
|
|
|
|
zcash/address/sprout.hpp \
|
2020-02-18 07:48:13 -08:00
|
|
|
zcash/address/zip32.h \
|
2019-11-22 00:25:12 -08:00
|
|
|
zcash/History.hpp \
|
2016-05-04 17:25:42 -07:00
|
|
|
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 \
|
2020-02-18 07:48:13 -08:00
|
|
|
zcash/Zcash.h
|
2016-02-15 14:27:15 -08:00
|
|
|
|
2020-02-04 04:20:49 -08:00
|
|
|
.PHONY: FORCE cargo-build 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 = \
|
2019-04-21 06:56:08 -07:00
|
|
|
addressindex.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
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 \
|
2017-08-25 18:12:39 -07:00
|
|
|
bech32.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 \
|
2020-06-05 14:46:45 -07:00
|
|
|
consensus/funding.h \
|
2015-02-11 02:58:11 -08:00
|
|
|
consensus/params.h \
|
2018-01-17 03:25:28 -08:00
|
|
|
consensus/upgrades.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 \
|
2017-04-24 23:06:29 -07:00
|
|
|
deprecation.h \
|
2020-01-27 06:59:24 -08:00
|
|
|
experimental_features.h \
|
2017-03-01 07:53:56 -08:00
|
|
|
fs.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 \
|
2020-07-14 09:41:39 -07:00
|
|
|
key_constants.h \
|
2017-09-19 18:12:25 -07:00
|
|
|
key_io.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
keystore.h \
|
2015-10-22 18:33:06 -07:00
|
|
|
dbwrapper.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
limitedmap.h \
|
2020-10-09 08:30:51 -07:00
|
|
|
logging.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
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 \
|
2015-06-23 22:25:30 -07:00
|
|
|
policy/policy.h \
|
2014-03-10 08:46:53 -07:00
|
|
|
pow.h \
|
2015-10-28 23:11:24 -07:00
|
|
|
prevector.h \
|
2014-12-15 01:22:19 -08:00
|
|
|
primitives/block.h \
|
|
|
|
primitives/transaction.h \
|
2020-07-07 18:23:03 -07:00
|
|
|
proof_verifier.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 \
|
2016-01-14 16:55:17 -08:00
|
|
|
rpc/client.h \
|
|
|
|
rpc/protocol.h \
|
|
|
|
rpc/server.h \
|
2016-03-29 10:43:02 -07:00
|
|
|
rpc/register.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 \
|
2016-04-18 06:12:46 -07:00
|
|
|
script/ismine.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
serialize.h \
|
2019-04-23 10:06:23 -07:00
|
|
|
spentindex.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 \
|
2016-09-18 00:55:14 -07:00
|
|
|
support/lockedpool.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
sync.h \
|
|
|
|
threadsafety.h \
|
2014-06-19 06:08:37 -07:00
|
|
|
timedata.h \
|
2019-02-21 13:01:12 -08:00
|
|
|
timestampindex.h \
|
2014-01-16 06:52:37 -08:00
|
|
|
tinyformat.h \
|
2015-08-25 11:12:08 -07:00
|
|
|
torcontrol.h \
|
2018-07-17 09:36:38 -07:00
|
|
|
transaction_builder.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
txdb.h \
|
2019-10-09 14:22:49 -07:00
|
|
|
mempool_limit.h \
|
2014-01-11 06:22:07 -08:00
|
|
|
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 \
|
2019-03-05 12:41:39 -08:00
|
|
|
utiltest.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 \
|
2019-05-10 11:20:52 -07:00
|
|
|
wallet/asyncrpcoperation_common.h \
|
2017-12-11 08:43:09 -08:00
|
|
|
wallet/asyncrpcoperation_mergetoaddress.h \
|
2019-03-18 19:33:02 -07:00
|
|
|
wallet/asyncrpcoperation_saplingmigration.h \
|
2016-08-16 10:33:04 -07:00
|
|
|
wallet/asyncrpcoperation_sendmany.h \
|
2017-09-15 12:59:27 -07:00
|
|
|
wallet/asyncrpcoperation_shieldcoinbase.h \
|
2015-03-22 12:18:55 -07:00
|
|
|
wallet/crypter.h \
|
2015-05-13 09:59:50 -07:00
|
|
|
wallet/db.h \
|
2019-03-05 13:04:23 -08:00
|
|
|
wallet/paymentdisclosure.h \
|
|
|
|
wallet/paymentdisclosuredb.h \
|
2016-01-06 23:33:49 -08:00
|
|
|
wallet/rpcwallet.h \
|
2015-02-03 12:09:47 -08:00
|
|
|
wallet/wallet.h \
|
2014-11-18 09:06:32 -08:00
|
|
|
wallet/walletdb.h \
|
2016-11-29 22:07:42 -08:00
|
|
|
warnings.h \
|
2014-11-18 09:06:32 -08:00
|
|
|
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-11-09 17:50:25 -08:00
|
|
|
libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
|
|
|
|
libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
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 \
|
2017-04-24 23:06:29 -07:00
|
|
|
deprecation.cpp \
|
2020-01-27 06:59:24 -08:00
|
|
|
experimental_features.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 \
|
2015-10-22 18:33:06 -07:00
|
|
|
dbwrapper.cpp \
|
2013-11-29 07:50:11 -08:00
|
|
|
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-10-11 15:41:05 -07:00
|
|
|
policy/policy.cpp \
|
2014-03-10 08:46:53 -07:00
|
|
|
pow.cpp \
|
2014-11-11 01:52:43 -08:00
|
|
|
rest.cpp \
|
2016-01-14 16:55:17 -08:00
|
|
|
rpc/blockchain.cpp \
|
|
|
|
rpc/mining.cpp \
|
|
|
|
rpc/misc.cpp \
|
|
|
|
rpc/net.cpp \
|
|
|
|
rpc/rawtransaction.cpp \
|
|
|
|
rpc/server.cpp \
|
2014-11-06 00:24:41 -08:00
|
|
|
script/sigcache.cpp \
|
2016-04-18 06:12:46 -07:00
|
|
|
script/ismine.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 \
|
2019-10-09 14:22:49 -07:00
|
|
|
mempool_limit.cpp \
|
2013-11-29 07:50:11 -08:00
|
|
|
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
|
|
|
if ENABLE_ZMQ
|
2015-10-07 21:00:03 -07:00
|
|
|
libbitcoin_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS)
|
2015-11-09 17:50:25 -08:00
|
|
|
libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-11-18 09:06:32 -08:00
|
|
|
libbitcoin_zmq_a_SOURCES = \
|
|
|
|
zmq/zmqabstractnotifier.cpp \
|
|
|
|
zmq/zmqnotificationinterface.cpp \
|
|
|
|
zmq/zmqpublishnotifier.cpp
|
|
|
|
endif
|
|
|
|
|
2017-02-09 17:56:21 -08:00
|
|
|
# wallet: zcashd, but only linked when wallet enabled
|
2015-11-09 17:50:25 -08:00
|
|
|
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2013-11-29 07:50:11 -08:00
|
|
|
libbitcoin_wallet_a_SOURCES = \
|
2016-04-07 14:37:39 -07:00
|
|
|
zcbenchmarks.cpp \
|
2016-10-14 22:15:56 -07:00
|
|
|
zcbenchmarks.h \
|
2019-05-10 11:20:52 -07:00
|
|
|
wallet/asyncrpcoperation_common.cpp \
|
2017-12-11 08:43:09 -08:00
|
|
|
wallet/asyncrpcoperation_mergetoaddress.cpp \
|
2019-03-18 19:33:02 -07:00
|
|
|
wallet/asyncrpcoperation_saplingmigration.cpp \
|
2016-08-16 10:33:04 -07:00
|
|
|
wallet/asyncrpcoperation_sendmany.cpp \
|
2017-09-15 12:59:27 -07:00
|
|
|
wallet/asyncrpcoperation_shieldcoinbase.cpp \
|
2015-03-22 12:18:55 -07:00
|
|
|
wallet/crypter.cpp \
|
2015-02-03 12:09:47 -08:00
|
|
|
wallet/db.cpp \
|
2019-03-05 13:04:23 -08:00
|
|
|
wallet/paymentdisclosure.cpp \
|
|
|
|
wallet/paymentdisclosuredb.cpp \
|
2017-11-14 13:29:05 -08:00
|
|
|
wallet/rpcdisclosure.cpp \
|
2015-02-03 12:09:47 -08:00
|
|
|
wallet/rpcdump.cpp \
|
|
|
|
wallet/rpcwallet.cpp \
|
|
|
|
wallet/wallet.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
|
2015-11-09 17:50:25 -08:00
|
|
|
crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES)
|
|
|
|
crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-06-09 12:17:27 -07:00
|
|
|
crypto_libbitcoin_crypto_a_SOURCES = \
|
2016-03-30 06:37:41 -07:00
|
|
|
crypto/aes.cpp \
|
|
|
|
crypto/aes.h \
|
2014-06-09 12:17:27 -07:00
|
|
|
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
|
|
|
|
|
|
|
|
if ENABLE_MINING
|
|
|
|
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
|
|
|
endif
|
2014-06-09 12:17:27 -07:00
|
|
|
|
2017-02-09 17:56:21 -08:00
|
|
|
# common: shared between zcashd and non-server tools
|
2015-11-09 17:50:25 -08:00
|
|
|
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
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 \
|
2017-08-25 18:12:39 -07:00
|
|
|
bech32.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 \
|
2020-06-05 14:46:45 -07:00
|
|
|
consensus/funding.cpp \
|
2019-07-29 13:47:06 -07:00
|
|
|
consensus/params.cpp \
|
2018-01-17 03:25:28 -08:00
|
|
|
consensus/upgrades.cpp \
|
2014-06-23 20:10:24 -07:00
|
|
|
core_read.cpp \
|
|
|
|
core_write.cpp \
|
2013-11-27 06:41:12 -08:00
|
|
|
hash.cpp \
|
|
|
|
key.cpp \
|
2017-09-19 18:12:25 -07:00
|
|
|
key_io.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 \
|
2020-07-07 18:23:03 -07:00
|
|
|
proof_verifier.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 \
|
2018-07-17 09:36:38 -07:00
|
|
|
transaction_builder.cpp \
|
2019-03-05 12:41:39 -08:00
|
|
|
utiltest.cpp \
|
2016-11-29 22:07:42 -08:00
|
|
|
warnings.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.
|
2015-11-09 17:50:25 -08:00
|
|
|
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-06-19 06:10:04 -07:00
|
|
|
libbitcoin_util_a_SOURCES = \
|
2016-09-18 00:55:14 -07:00
|
|
|
support/lockedpool.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 \
|
2017-03-01 07:53:56 -08:00
|
|
|
fs.cpp \
|
2020-10-09 08:30:51 -07:00
|
|
|
logging.cpp \
|
2014-06-26 05:41:53 -07:00
|
|
|
random.cpp \
|
2016-01-14 16:55:17 -08:00
|
|
|
rpc/protocol.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
|
|
|
if GLIBC_BACK_COMPAT
|
2014-06-19 06:10:04 -07:00
|
|
|
libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
|
2014-03-27 16:58:41 -07:00
|
|
|
endif
|
|
|
|
|
2017-02-09 17:56:21 -08:00
|
|
|
# cli: zcash-cli
|
2015-11-09 17:50:25 -08:00
|
|
|
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2013-11-27 06:41:12 -08:00
|
|
|
libbitcoin_cli_a_SOURCES = \
|
2016-01-14 16:55:17 -08:00
|
|
|
rpc/client.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
|
2015-11-09 17:50:25 -08:00
|
|
|
zcashd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
zcashd_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2015-11-30 12:03:21 -08:00
|
|
|
zcashd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
|
2014-11-20 15:24:50 -08:00
|
|
|
|
|
|
|
if TARGET_WINDOWS
|
2015-11-30 12:03:21 -08:00
|
|
|
zcashd_SOURCES += bitcoind-res.rc
|
2014-11-20 15:24:50 -08:00
|
|
|
endif
|
|
|
|
|
2015-11-30 12:03:21 -08:00
|
|
|
zcashd_LDADD = \
|
2014-06-19 06:10:04 -07:00
|
|
|
$(LIBBITCOIN_SERVER) \
|
2018-08-04 09:45:21 -07:00
|
|
|
$(LIBBITCOIN_WALLET) \
|
2014-06-19 06:10:04 -07:00
|
|
|
$(LIBBITCOIN_COMMON) \
|
2015-09-04 07:11:34 -07:00
|
|
|
$(LIBUNIVALUE) \
|
2014-06-19 06:10:04 -07:00
|
|
|
$(LIBBITCOIN_UTIL) \
|
2015-03-26 16:15:28 -07:00
|
|
|
$(LIBBITCOIN_ZMQ) \
|
2014-06-19 06:10:04 -07:00
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
2016-05-23 15:36:48 -07:00
|
|
|
$(LIBZCASH) \
|
2020-02-04 04:20:49 -08:00
|
|
|
$(LIBRUSTZCASH) \
|
2013-11-12 12:09:55 -08:00
|
|
|
$(LIBLEVELDB) \
|
2017-04-13 10:09:19 -07:00
|
|
|
$(LIBLEVELDB_SSE42) \
|
2014-11-05 07:58:37 -08:00
|
|
|
$(LIBMEMENV) \
|
|
|
|
$(LIBSECP256K1)
|
2014-06-06 07:57:28 -07:00
|
|
|
|
2015-12-21 19:12:23 -08:00
|
|
|
zcashd_LDADD += \
|
|
|
|
$(BOOST_LIBS) \
|
|
|
|
$(BDB_LIBS) \
|
2015-01-19 21:04:59 -08:00
|
|
|
$(EVENT_PTHREADS_LIBS) \
|
|
|
|
$(EVENT_LIBS) \
|
2015-03-26 16:15:28 -07:00
|
|
|
$(ZMQ_LIBS) \
|
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-11-09 17:50:25 -08:00
|
|
|
zcash_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
|
|
|
|
zcash_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
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
|
|
|
if TARGET_WINDOWS
|
2015-11-30 12:03:21 -08:00
|
|
|
zcash_cli_SOURCES += bitcoin-cli-res.rc
|
2013-09-18 12:53:29 -07:00
|
|
|
endif
|
|
|
|
|
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) \
|
2015-01-19 21:04:59 -08:00
|
|
|
$(EVENT_LIBS) \
|
2016-05-23 15:36:48 -07:00
|
|
|
$(LIBZCASH) \
|
2020-02-04 04:20:49 -08:00
|
|
|
$(LIBRUSTZCASH) \
|
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
|
2015-11-09 17:50:25 -08:00
|
|
|
zcash_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
zcash_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2016-10-18 14:39:03 -07:00
|
|
|
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
|
|
|
if TARGET_WINDOWS
|
2016-10-18 14:39:03 -07:00
|
|
|
zcash_tx_SOURCES += bitcoin-tx-res.rc
|
2015-05-02 08:30:38 -07:00
|
|
|
endif
|
|
|
|
|
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) \
|
2020-02-04 04:20:49 -08:00
|
|
|
$(LIBRUSTZCASH) \
|
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
|
|
|
|
2019-10-26 06:09:25 -07:00
|
|
|
zcash_tx_LDADD += $(BOOST_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 \
|
2020-02-18 07:28:04 -08:00
|
|
|
zcash/address/sapling.cpp \
|
|
|
|
zcash/address/sprout.cpp \
|
2020-02-18 07:48:13 -08:00
|
|
|
zcash/address/zip32.cpp \
|
2019-11-22 00:25:12 -08:00
|
|
|
zcash/History.cpp \
|
2016-05-04 17:25:42 -07:00
|
|
|
zcash/JoinSplit.cpp \
|
|
|
|
zcash/Note.cpp \
|
2016-05-12 12:19:13 -07:00
|
|
|
zcash/prf.cpp \
|
2020-02-18 07:48:13 -08:00
|
|
|
zcash/util.cpp
|
2016-02-15 14:27:15 -08:00
|
|
|
|
2020-02-08 11:48:56 -08:00
|
|
|
libzcash_a_CPPFLAGS = $(AM_CPPFLAGS) $(PIC_FLAGS) $(BITCOIN_INCLUDES)
|
2018-04-14 07:51:29 -07:00
|
|
|
libzcash_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
|
|
|
libzcash_a_LDFLAGS = $(AM_LDFLAGS)
|
2016-02-15 14:27:15 -08:00
|
|
|
|
2016-10-18 13:52:45 -07:00
|
|
|
# zcashconsensus library #
|
2014-10-14 15:22:55 -07:00
|
|
|
if BUILD_BITCOIN_LIBS
|
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
|
|
|
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
|
|
|
|
|
|
|
|
if GLIBC_BACK_COMPAT
|
2016-10-18 13:52:45 -07:00
|
|
|
libzcashconsensus_la_SOURCES += compat/glibc_compat.cpp
|
2014-10-14 15:22:55 -07:00
|
|
|
endif
|
|
|
|
|
2015-11-09 17:50:25 -08:00
|
|
|
libzcashconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
|
2015-07-28 11:11:20 -07:00
|
|
|
libzcashconsensus_la_LIBADD = $(LIBSECP256K1)
|
2020-07-14 03:43:09 -07:00
|
|
|
libzcashconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/rust/include -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
|
2015-11-09 17:50:25 -08:00
|
|
|
libzcashconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-11-20 15:24:50 -08:00
|
|
|
|
2014-11-06 19:43:19 -08:00
|
|
|
endif
|
2014-11-20 15:24:50 -08:00
|
|
|
#
|
2014-10-14 15:22:55 -07:00
|
|
|
|
2016-05-27 11:14:44 -07:00
|
|
|
CTAES_DIST = crypto/ctaes/bench.c
|
|
|
|
CTAES_DIST += crypto/ctaes/ctaes.c
|
|
|
|
CTAES_DIST += crypto/ctaes/ctaes.h
|
|
|
|
CTAES_DIST += crypto/ctaes/README.md
|
|
|
|
CTAES_DIST += crypto/ctaes/test.c
|
|
|
|
|
2016-06-01 15:05:09 -07:00
|
|
|
CLEANFILES = *.gcda *.gcno */*.gcno wallet/*/*.gcno
|
2013-05-27 16:55:01 -07:00
|
|
|
|
|
|
|
DISTCLEANFILES = obj/build.h
|
|
|
|
|
2020-09-25 07:39:08 -07:00
|
|
|
EXTRA_DIST = $(CTAES_DIST) rust
|
2013-05-27 16:55:01 -07:00
|
|
|
|
|
|
|
clean-local:
|
2020-04-07 18:50:58 -07:00
|
|
|
rm -f $(top_srcdir)/.cargo/config $(top_srcdir)/.cargo/.configured-for-*
|
2014-11-05 17:56:45 -08:00
|
|
|
-$(MAKE) -C secp256k1 clean
|
2015-10-13 10:40:47 -07:00
|
|
|
-$(MAKE) -C univalue clean
|
2013-11-27 18:17:17 -08:00
|
|
|
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
|
2019-10-28 10:52:31 -07:00
|
|
|
rm -f fuzz.cpp
|
2020-02-26 08:31:28 -08:00
|
|
|
rm -rf fuzzing/*/output
|
2014-06-09 11:58:30 -07:00
|
|
|
-rm -f config.h
|
2020-11-16 02:19:22 -08:00
|
|
|
-rm -f *.lib bench/*.lib test/*.lib
|
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) \
|
2015-11-09 17:50:25 -08:00
|
|
|
$(CPPFLAGS) $(AM_CXXFLAGS) $(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) -c -o $@ $<
|
2014-06-04 14:13:03 -07:00
|
|
|
|
2016-01-26 11:52:56 -08:00
|
|
|
check-symbols: $(bin_PROGRAMS)
|
|
|
|
if GLIBC_BACK_COMPAT
|
|
|
|
@echo "Checking glibc back compat of [$(bin_PROGRAMS)]..."
|
2017-11-19 21:48:12 -08:00
|
|
|
$(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS)
|
2016-01-26 11:52:56 -08:00
|
|
|
endif
|
|
|
|
|
2016-07-21 12:41:06 -07:00
|
|
|
check-security: $(bin_PROGRAMS)
|
|
|
|
if HARDEN
|
|
|
|
@echo "Checking binary security of [$(bin_PROGRAMS)]..."
|
2017-11-19 21:48:12 -08:00
|
|
|
$(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS)
|
2016-07-21 12:41:06 -07:00
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
2016-02-17 11:35:35 -08:00
|
|
|
if EMBEDDED_LEVELDB
|
|
|
|
include Makefile.leveldb.include
|
|
|
|
endif
|
|
|
|
|
2014-05-28 10:38:41 -07:00
|
|
|
if ENABLE_TESTS
|
|
|
|
include Makefile.test.include
|
2016-05-02 22:14:53 -07:00
|
|
|
include Makefile.gtest.include
|
2014-05-28 10:38:41 -07:00
|
|
|
endif
|
Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)
Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.
The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.
See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'
To compile and run benchmarks:
cd src; make bench
Sample output:
Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2015-09-24 10:13:38 -07:00
|
|
|
|
|
|
|
if ENABLE_BENCH
|
|
|
|
include Makefile.bench.include
|
|
|
|
endif
|