2016-09-21 22:31:23 +00:00
|
|
|
# Copyright (c) 2013-2016 The Bitcoin Core developers
|
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2020-09-25 16:53:04 -04:00
|
|
|
# Pattern rule to print variables, e.g. make print-top_srcdir
|
2021-06-13 11:38:59 -04:00
|
|
|
print-%: FORCE
|
2021-02-25 18:16:07 -05:00
|
|
|
@echo '$*'='$($*)'
|
2020-09-25 16:53:04 -04:00
|
|
|
|
2021-07-15 18:42:17 +00:00
|
|
|
DIST_SUBDIRS = secp256k1
|
2013-09-09 02:02:28 +00:00
|
|
|
|
2022-02-17 11:43:30 +00:00
|
|
|
AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) $(LTO_LDFLAGS) $(CORE_LDFLAGS)
|
2022-02-17 16:16:52 +00:00
|
|
|
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(LTO_CXXFLAGS) $(CORE_CXXFLAGS)
|
2022-02-17 11:31:36 +00:00
|
|
|
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS)
|
2017-04-17 15:10:47 -04:00
|
|
|
AM_LIBTOOLFLAGS = --preserve-dup-deps
|
2020-07-17 14:43:29 +08:00
|
|
|
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
2016-02-17 14:35:35 -05:00
|
|
|
EXTRA_LIBRARIES =
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2022-02-08 17:06:21 -05:00
|
|
|
lib_LTLIBRARIES =
|
2021-12-22 01:16:00 -05:00
|
|
|
noinst_LTLIBRARIES =
|
|
|
|
|
|
|
|
bin_PROGRAMS =
|
|
|
|
noinst_PROGRAMS =
|
|
|
|
TESTS =
|
|
|
|
BENCHMARKS =
|
|
|
|
|
2022-05-30 10:24:00 +01:00
|
|
|
BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
|
2014-06-06 10:57:28 -04:00
|
|
|
|
2021-12-20 10:53:01 -05:00
|
|
|
LIBBITCOIN_NODE=libbitcoin_node.a
|
2014-06-19 15:10:04 +02:00
|
|
|
LIBBITCOIN_COMMON=libbitcoin_common.a
|
2015-11-20 16:46:03 +01:00
|
|
|
LIBBITCOIN_CONSENSUS=libbitcoin_consensus.a
|
2014-06-19 15:10:04 +02:00
|
|
|
LIBBITCOIN_CLI=libbitcoin_cli.a
|
|
|
|
LIBBITCOIN_UTIL=libbitcoin_util.a
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la
|
2014-06-19 15:10:04 +02:00
|
|
|
LIBBITCOINQT=qt/libbitcoinqt.a
|
2014-11-05 07:58:37 -08:00
|
|
|
LIBSECP256K1=secp256k1/libsecp256k1.la
|
|
|
|
|
2015-03-26 19:15:28 -04:00
|
|
|
if ENABLE_ZMQ
|
|
|
|
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
|
|
|
|
endif
|
|
|
|
if BUILD_BITCOIN_LIBS
|
|
|
|
LIBBITCOINCONSENSUS=libbitcoinconsensus.la
|
|
|
|
endif
|
build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
--patience --color-moved=dimmed-zebra
Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.
See previous commit "build: Add example bitcoin-chainstate executable"
for more context.
We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility
When compiling for mingw-w64, specify -static in both:
- ..._la_CXXFLAGS so that libtool will avoid building two versions of
each object (one PIC, one non-PIC). We just need the one that is
suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.
If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.
Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.
However, on other targets, the shared library creation works fine.
-----
Note to users: You need to either specify:
--enable-experimental-util-chainstate
or,
--with-experimental-kernel-lib
To build the libbitcionkernel library. See the configure help for more
details.
build shared libbitcoinkernel where we can
2021-12-21 20:10:05 -05:00
|
|
|
if BUILD_BITCOIN_KERNEL_LIB
|
|
|
|
LIBBITCOINKERNEL=libbitcoinkernel.la
|
|
|
|
endif
|
2015-03-26 19:15:28 -04:00
|
|
|
if ENABLE_WALLET
|
|
|
|
LIBBITCOIN_WALLET=libbitcoin_wallet.a
|
2016-09-16 16:45:36 +02:00
|
|
|
LIBBITCOIN_WALLET_TOOL=libbitcoin_wallet_tool.a
|
2015-03-26 19:15:28 -04:00
|
|
|
endif
|
|
|
|
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO = $(LIBBITCOIN_CRYPTO_BASE)
|
2018-06-06 15:20:34 -04:00
|
|
|
if ENABLE_SSE41
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO_SSE41 = crypto/libbitcoin_crypto_sse41.la
|
2018-06-06 15:20:34 -04:00
|
|
|
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41)
|
|
|
|
endif
|
|
|
|
if ENABLE_AVX2
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO_AVX2 = crypto/libbitcoin_crypto_avx2.la
|
2018-06-06 15:20:34 -04:00
|
|
|
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_AVX2)
|
|
|
|
endif
|
2022-01-20 17:26:00 +01:00
|
|
|
if ENABLE_X86_SHANI
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO_X86_SHANI = crypto/libbitcoin_crypto_x86_shani.la
|
2022-01-20 17:26:00 +01:00
|
|
|
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_X86_SHANI)
|
2018-06-24 10:50:40 -07:00
|
|
|
endif
|
2022-01-20 18:57:27 +01:00
|
|
|
if ENABLE_ARM_SHANI
|
2021-12-22 01:16:00 -05:00
|
|
|
LIBBITCOIN_CRYPTO_ARM_SHANI = crypto/libbitcoin_crypto_arm_shani.la
|
2022-01-20 18:57:27 +01:00
|
|
|
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI)
|
2018-06-24 10:50:40 -07:00
|
|
|
endif
|
2021-12-22 01:16:00 -05:00
|
|
|
noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO)
|
2018-06-06 15:20:34 -04:00
|
|
|
|
2018-03-26 18:36:17 +09:00
|
|
|
$(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*)
|
2014-11-05 20:56:45 -05:00
|
|
|
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
2014-06-19 15:10:04 +02:00
|
|
|
|
2014-10-21 08:36:09 +02: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:
|
2016-02-17 14:35:35 -05:00
|
|
|
EXTRA_LIBRARIES += \
|
2015-03-26 19:15:28 -04:00
|
|
|
$(LIBBITCOIN_UTIL) \
|
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
2021-12-20 10:53:01 -05:00
|
|
|
$(LIBBITCOIN_NODE) \
|
2015-03-26 19:15:28 -04:00
|
|
|
$(LIBBITCOIN_CLI) \
|
2017-12-05 15:57:12 -05:00
|
|
|
$(LIBBITCOIN_IPC) \
|
2015-03-26 19:15:28 -04:00
|
|
|
$(LIBBITCOIN_WALLET) \
|
2016-09-16 16:45:36 +02:00
|
|
|
$(LIBBITCOIN_WALLET_TOOL) \
|
2015-03-26 19:15:28 -04:00
|
|
|
$(LIBBITCOIN_ZMQ)
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2013-09-08 02:44:12 +00:00
|
|
|
if BUILD_BITCOIND
|
|
|
|
bin_PROGRAMS += bitcoind
|
|
|
|
endif
|
|
|
|
|
2019-07-10 13:46:31 -04:00
|
|
|
if BUILD_BITCOIN_NODE
|
|
|
|
bin_PROGRAMS += bitcoin-node
|
|
|
|
endif
|
|
|
|
|
2014-12-25 11:43:52 +00:00
|
|
|
if BUILD_BITCOIN_CLI
|
|
|
|
bin_PROGRAMS += bitcoin-cli
|
|
|
|
endif
|
2020-09-10 08:09:07 +10:00
|
|
|
|
2014-12-25 11:43:52 +00:00
|
|
|
if BUILD_BITCOIN_TX
|
|
|
|
bin_PROGRAMS += bitcoin-tx
|
2013-09-08 02:44:12 +00:00
|
|
|
endif
|
2020-09-10 08:09:07 +10:00
|
|
|
|
2016-09-16 16:45:36 +02:00
|
|
|
if ENABLE_WALLET
|
|
|
|
if BUILD_BITCOIN_WALLET
|
|
|
|
bin_PROGRAMS += bitcoin-wallet
|
|
|
|
endif
|
|
|
|
endif
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2020-09-10 08:09:07 +10:00
|
|
|
if BUILD_BITCOIN_UTIL
|
|
|
|
bin_PROGRAMS += bitcoin-util
|
|
|
|
endif
|
|
|
|
|
2021-09-01 15:46:51 -04:00
|
|
|
if BUILD_BITCOIN_CHAINSTATE
|
|
|
|
bin_PROGRAMS += bitcoin-chainstate
|
|
|
|
endif
|
|
|
|
|
2016-01-26 14:52:56 -05:00
|
|
|
.PHONY: FORCE check-symbols check-security
|
2013-05-27 19:55:01 -04:00
|
|
|
# bitcoin core #
|
2014-01-11 15:22:07 +01:00
|
|
|
BITCOIN_CORE_H = \
|
2016-04-16 00:13:15 -04:00
|
|
|
addrdb.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
addrman.h \
|
2021-09-01 11:21:29 -07:00
|
|
|
addrman_impl.h \
|
2018-09-25 07:00:36 +02:00
|
|
|
attributes.h \
|
2017-10-05 16:40:43 -04:00
|
|
|
banman.h \
|
2014-05-09 17:56:16 +02:00
|
|
|
base58.h \
|
2017-08-25 18:12:39 -07:00
|
|
|
bech32.h \
|
2016-04-15 12:23:57 -07:00
|
|
|
blockencodings.h \
|
2018-01-23 16:10:08 -08:00
|
|
|
blockfilter.h \
|
2014-09-03 02:20:09 +02:00
|
|
|
chain.h \
|
2014-12-15 10:22:19 +01:00
|
|
|
chainparams.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
chainparamsbase.h \
|
2014-07-24 13:52:57 +02:00
|
|
|
chainparamsseeds.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
checkqueue.h \
|
|
|
|
clientversion.h \
|
|
|
|
coins.h \
|
2021-09-29 17:09:55 +02:00
|
|
|
common/bloom.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
compat.h \
|
2019-02-11 23:52:59 +01:00
|
|
|
compat/assumptions.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
compat/byteswap.h \
|
2019-10-27 12:52:31 -07:00
|
|
|
compat/cpuid.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
compat/endian.h \
|
2014-10-19 04:28:43 +02:00
|
|
|
compressor.h \
|
2021-12-01 19:11:37 +00:00
|
|
|
node/connection_types.h \
|
2015-01-24 15:29:29 +01:00
|
|
|
consensus/consensus.h \
|
2019-04-02 13:41:12 -04:00
|
|
|
consensus/tx_check.h \
|
2016-07-11 16:34:21 +02:00
|
|
|
consensus/tx_verify.h \
|
2014-06-23 23:10:24 -04:00
|
|
|
core_io.h \
|
2015-07-17 13:46:18 -04:00
|
|
|
core_memusage.h \
|
2016-12-21 01:39:59 +01:00
|
|
|
cuckoocache.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
dbwrapper.h \
|
2021-03-11 12:17:22 +10:00
|
|
|
deploymentinfo.h \
|
2020-06-16 18:58:56 +10:00
|
|
|
deploymentstatus.h \
|
2022-05-26 16:07:04 +02:00
|
|
|
node/eviction.h \
|
2021-03-18 14:17:39 +01:00
|
|
|
external_signer.h \
|
2019-01-06 11:06:31 -08:00
|
|
|
flatfile.h \
|
2017-03-01 15:53:56 +00:00
|
|
|
fs.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-23 07:53:17 +01:00
|
|
|
httprpc.h \
|
|
|
|
httpserver.h \
|
2020-11-27 13:59:26 +01:00
|
|
|
i2p.h \
|
2018-05-15 15:57:48 -07:00
|
|
|
index/base.h \
|
2018-08-27 17:01:24 -07:00
|
|
|
index/blockfilterindex.h \
|
2020-01-24 18:56:47 +01:00
|
|
|
index/coinstatsindex.h \
|
2019-01-20 14:17:17 -05:00
|
|
|
index/disktxpos.h \
|
2017-12-08 10:19:57 -08:00
|
|
|
index/txindex.h \
|
2016-04-30 21:45:26 -07:00
|
|
|
indirectmap.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
init.h \
|
2021-04-18 18:56:12 -04:00
|
|
|
init/common.h \
|
2017-05-30 15:55:17 -04:00
|
|
|
interfaces/chain.h \
|
2020-11-24 13:59:33 -05:00
|
|
|
interfaces/echo.h \
|
2018-04-07 03:42:02 -04:00
|
|
|
interfaces/handler.h \
|
2017-12-05 15:57:12 -05:00
|
|
|
interfaces/init.h \
|
|
|
|
interfaces/ipc.h \
|
2018-04-07 03:42:02 -04:00
|
|
|
interfaces/node.h \
|
|
|
|
interfaces/wallet.h \
|
2022-03-01 16:14:12 -05:00
|
|
|
kernel/chainstatemanager_opts.h \
|
2022-05-27 16:47:05 -04:00
|
|
|
kernel/checks.h \
|
2022-02-16 17:51:57 -05:00
|
|
|
kernel/coinstats.h \
|
2022-05-25 14:55:44 -04:00
|
|
|
kernel/context.h \
|
2022-03-17 22:09:05 -04:00
|
|
|
kernel/mempool_limits.h \
|
pool: Add and use MemPoolOptions, ApplyArgsManOptions
Reviewers: Note that CTxMemPool now requires a non-defaulted
CTxMemPool::Options for its constructor. Meaning that there's no need to
worry about a stray CTxMemPool constructor somewhere defaulting to
something incorrect. All instances of CTxMemPool construction are
addressed here in this commit.
We set options for CTxMemPool and construct it in many different ways. A
good example can be seen in how we determine CTxMemPool's check_ratio in
AppInitMain(...).
1. We first set the default based on chainparams's
DefaultConsistencyChecks()
2. Then, we apply the ArgsManager option on top of that default
3. Finally, we clamp the result of that between 0 and 1 Million
With this patch, most CTxMemPool construction are along the lines of:
MemPoolOptions mempool_opts{...default overrides...};
ApplyArgsManOptions(argsman, mempool_opts);
...hard overrides...
CTxMemPool pool{mempool_opts};
This "compositional" style of building options means that we can omit
unnecessary/irrelevant steps wherever we want but also maintain full
customizability.
For example:
- For users of libbitcoinkernel, where we eventually want to remove
ArgsManager, they simply won't call (or even know about)
ApplyArgsManOptions.
- See src/init.cpp to see how the check_ratio CTxMemPool option works
after this change.
A MemPoolOptionsForTest helper was also added and used by tests/fuzz
tests where a local CTxMemPool needed to be created.
The change in src/test/fuzz/tx_pool.cpp seemingly changes behaviour by
applying ArgsManager options on top of the CTxMemPool::Options defaults.
However, in future commits where we introduce flags like -maxmempool,
the call to ApplyArgsManOptions is actually what preserves the existing
behaviour. Previously, although it wasn't obvious, our CTxMemPool would
consult gArgs for flags like -maxmempool when it needed it, so it
already relied on ArgsManager information. This patchset just laid bare
the obfuscatory perils of globals.
[META] As this patchset progresses, we will move more and more
CTxMemPool-relevant options into MemPoolOptions and add their
ArgsMan-related logic to ApplyArgsManOptions.
2022-03-18 13:51:37 -04:00
|
|
|
kernel/mempool_options.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
key.h \
|
2017-09-19 18:12:25 -07:00
|
|
|
key_io.h \
|
2018-04-18 10:05:05 -07:00
|
|
|
logging.h \
|
2019-09-19 13:59:49 -04:00
|
|
|
logging/timer.h \
|
2020-02-06 19:00:26 +02:00
|
|
|
mapport.h \
|
pool: Add and use MemPoolOptions, ApplyArgsManOptions
Reviewers: Note that CTxMemPool now requires a non-defaulted
CTxMemPool::Options for its constructor. Meaning that there's no need to
worry about a stray CTxMemPool constructor somewhere defaulting to
something incorrect. All instances of CTxMemPool construction are
addressed here in this commit.
We set options for CTxMemPool and construct it in many different ways. A
good example can be seen in how we determine CTxMemPool's check_ratio in
AppInitMain(...).
1. We first set the default based on chainparams's
DefaultConsistencyChecks()
2. Then, we apply the ArgsManager option on top of that default
3. Finally, we clamp the result of that between 0 and 1 Million
With this patch, most CTxMemPool construction are along the lines of:
MemPoolOptions mempool_opts{...default overrides...};
ApplyArgsManOptions(argsman, mempool_opts);
...hard overrides...
CTxMemPool pool{mempool_opts};
This "compositional" style of building options means that we can omit
unnecessary/irrelevant steps wherever we want but also maintain full
customizability.
For example:
- For users of libbitcoinkernel, where we eventually want to remove
ArgsManager, they simply won't call (or even know about)
ApplyArgsManOptions.
- See src/init.cpp to see how the check_ratio CTxMemPool option works
after this change.
A MemPoolOptionsForTest helper was also added and used by tests/fuzz
tests where a local CTxMemPool needed to be created.
The change in src/test/fuzz/tx_pool.cpp seemingly changes behaviour by
applying ArgsManager options on top of the CTxMemPool::Options defaults.
However, in future commits where we introduce flags like -maxmempool,
the call to ApplyArgsManOptions is actually what preserves the existing
behaviour. Previously, although it wasn't obvious, our CTxMemPool would
consult gArgs for flags like -maxmempool when it needed it, so it
already relied on ArgsManager information. This patchset just laid bare
the obfuscatory perils of globals.
[META] As this patchset progresses, we will move more and more
CTxMemPool-relevant options into MemPoolOptions and add their
ArgsMan-related logic to ApplyArgsManOptions.
2022-03-18 13:51:37 -04:00
|
|
|
mempool_args.h \
|
2015-05-04 00:20:46 +02:00
|
|
|
memusage.h \
|
2014-10-30 15:50:15 -07:00
|
|
|
merkleblock.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
net.h \
|
2019-06-20 18:37:51 +09:00
|
|
|
net_permissions.h \
|
2016-12-01 15:45:50 -08:00
|
|
|
net_processing.h \
|
2019-10-29 10:49:48 +02:00
|
|
|
net_types.h \
|
2016-05-31 17:25:03 -04:00
|
|
|
netaddress.h \
|
2016-08-12 14:21:50 -04:00
|
|
|
netbase.h \
|
2021-08-31 13:22:36 +01:00
|
|
|
netgroup.h \
|
2016-11-10 17:05:23 -05:00
|
|
|
netmessagemaker.h \
|
2021-04-02 19:17:00 +02:00
|
|
|
node/blockstorage.h \
|
2021-09-21 11:37:03 -04:00
|
|
|
node/caches.h \
|
2021-09-20 16:12:18 -04:00
|
|
|
node/chainstate.h \
|
2018-07-17 13:04:35 -04:00
|
|
|
node/coin.h \
|
2019-09-17 17:11:31 -04:00
|
|
|
node/context.h \
|
2021-11-15 13:48:58 +01:00
|
|
|
node/miner.h \
|
2021-11-12 10:59:36 +01:00
|
|
|
node/minisketchwrapper.h \
|
2019-04-08 16:33:05 -04:00
|
|
|
node/psbt.h \
|
2019-01-08 22:16:50 -08:00
|
|
|
node/transaction.h \
|
2022-06-14 10:38:51 +02:00
|
|
|
node/interface_ui.h \
|
2019-03-28 12:08:32 -04:00
|
|
|
node/utxo_snapshot.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
noui.h \
|
2018-07-09 18:15:50 +10:00
|
|
|
outputtype.h \
|
2016-03-31 23:30:17 +02:00
|
|
|
policy/feerate.h \
|
2014-08-26 16:28:32 -04:00
|
|
|
policy/fees.h \
|
2021-12-08 16:19:31 -05:00
|
|
|
policy/fees_args.h \
|
2021-02-11 09:50:42 -08:00
|
|
|
policy/packages.h \
|
2015-06-24 07:25:30 +02:00
|
|
|
policy/policy.h \
|
2015-12-16 14:57:54 -05:00
|
|
|
policy/rbf.h \
|
2019-04-02 14:14:58 -04:00
|
|
|
policy/settings.h \
|
2014-03-10 08:46:53 -07:00
|
|
|
pow.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
protocol.h \
|
2019-01-09 02:06:29 -08:00
|
|
|
psbt.h \
|
2014-06-26 14:41:53 +02:00
|
|
|
random.h \
|
2019-10-26 12:20:12 -07:00
|
|
|
randomenv.h \
|
2022-01-27 21:20:05 +00:00
|
|
|
rest.h \
|
2017-04-13 00:24:40 +02:00
|
|
|
reverse_iterator.h \
|
2017-03-27 12:14:43 +02:00
|
|
|
rpc/blockchain.h \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/client.h \
|
2022-03-11 17:51:36 +01:00
|
|
|
rpc/mempool.h \
|
2020-05-31 14:11:21 +02:00
|
|
|
rpc/mining.h \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/protocol.h \
|
2019-04-02 16:51:32 -04:00
|
|
|
rpc/rawtransaction_util.h \
|
2016-03-29 19:43:02 +02:00
|
|
|
rpc/register.h \
|
2019-06-20 02:39:38 +09:00
|
|
|
rpc/request.h \
|
|
|
|
rpc/server.h \
|
2021-04-21 16:39:40 +02:00
|
|
|
rpc/server_util.h \
|
2017-09-29 00:21:28 -04:00
|
|
|
rpc/util.h \
|
2015-04-02 10:33:45 -04:00
|
|
|
scheduler.h \
|
2018-07-04 18:08:19 -07:00
|
|
|
script/descriptor.h \
|
2019-06-17 15:47:12 -04:00
|
|
|
script/keyorigin.h \
|
2019-08-28 16:23:03 -07:00
|
|
|
script/miniscript.h \
|
2014-09-10 16:16:09 +02:00
|
|
|
script/sigcache.h \
|
2014-08-27 17:22:33 +02:00
|
|
|
script/sign.h \
|
2019-06-06 22:52:24 +02:00
|
|
|
script/signingprovider.h \
|
2014-08-23 03:35:51 +02:00
|
|
|
script/standard.h \
|
2018-05-16 19:17:40 +00:00
|
|
|
shutdown.h \
|
2019-07-17 17:41:32 +09:00
|
|
|
signet.h \
|
2014-10-22 15:08:30 -04:00
|
|
|
streams.h \
|
2015-01-22 15:02:44 -05:00
|
|
|
support/allocators/secure.h \
|
|
|
|
support/allocators/zeroafterfree.h \
|
2015-01-20 19:23:25 -05:00
|
|
|
support/cleanse.h \
|
2016-12-20 15:59:42 +09:00
|
|
|
support/events.h \
|
2016-09-18 09:55:14 +02:00
|
|
|
support/lockedpool.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
sync.h \
|
2016-12-27 17:12:15 -05:00
|
|
|
threadinterrupt.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
threadsafety.h \
|
2014-06-19 15:08:37 +02:00
|
|
|
timedata.h \
|
2015-08-25 20:12:08 +02:00
|
|
|
torcontrol.h \
|
2014-01-11 15:22:07 +01:00
|
|
|
txdb.h \
|
|
|
|
txmempool.h \
|
2021-01-31 00:55:54 +10:00
|
|
|
txorphanage.h \
|
|
|
|
txrequest.h \
|
2014-10-18 19:53:37 +02:00
|
|
|
undo.h \
|
2019-12-18 14:27:03 -05:00
|
|
|
util/asmap.h \
|
2018-11-06 09:23:43 -05:00
|
|
|
util/bip32.h \
|
2018-08-20 23:35:29 -07:00
|
|
|
util/bytevectorhash.h \
|
2019-09-23 14:45:51 -04:00
|
|
|
util/check.h \
|
2022-03-11 10:14:31 +01:00
|
|
|
util/designator.h \
|
2020-12-04 12:49:22 +10:00
|
|
|
util/epochguard.h \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/error.h \
|
2022-01-06 11:27:06 -05:00
|
|
|
util/fastrange.h \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/fees.h \
|
2021-02-01 13:35:28 +01:00
|
|
|
util/getuniquepath.h \
|
2020-02-21 15:57:02 +00:00
|
|
|
util/golombrice.h \
|
2021-04-04 12:25:56 +02:00
|
|
|
util/hash_type.h \
|
2019-09-17 17:02:56 -04:00
|
|
|
util/hasher.h \
|
2019-09-25 10:55:52 -04:00
|
|
|
util/macros.h \
|
2019-11-19 15:49:35 +01:00
|
|
|
util/message.h \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/moneystr.h \
|
2021-11-02 09:48:10 +01:00
|
|
|
util/overflow.h \
|
2021-02-16 22:36:26 -05:00
|
|
|
util/overloaded.h \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/rbf.h \
|
2020-11-18 17:13:27 +01:00
|
|
|
util/readwritefile.h \
|
Introduce generic 'Result' class
Useful to encapsulate the function result object (in case of having it) or, in case of failure, the failure reason.
This let us clean lot of boilerplate code, as now instead of returning a boolean and having to add a ref arg for the
return object and another ref for the error string. We can simply return a 'BResult<Obj>'.
Example of what we currently have:
```
bool doSomething(arg1, arg2, arg3, arg4, &result, &error_string) {
do something...
if (error) {
error_string = "something bad happened";
return false;
}
result = goodResult;
return true;
}
```
Example of what we will get with this commit:
```
BResult<Obj> doSomething(arg1, arg2, arg3, arg4) {
do something...
if (error) return {"something happened"};
// good
return {goodResult};
}
```
This allows a similar boilerplate cleanup on the function callers side as well. They don't have to add the extra
pre-function-call error string and result object declarations to pass the references to the function.
2022-04-08 16:24:46 -03:00
|
|
|
util/result.h \
|
2021-05-16 17:23:17 -07:00
|
|
|
util/serfloat.h \
|
2019-03-05 16:07:48 -05:00
|
|
|
util/settings.h \
|
2021-01-04 13:02:43 +01:00
|
|
|
util/sock.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
util/spanparsing.h \
|
2019-08-20 14:51:43 -04:00
|
|
|
util/string.h \
|
2021-10-01 13:53:59 +00:00
|
|
|
util/syscall_sandbox.h \
|
2022-04-20 16:17:19 +02:00
|
|
|
util/syserror.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
util/system.h \
|
2021-04-13 20:44:46 +03:00
|
|
|
util/thread.h \
|
2018-06-13 14:50:59 -04:00
|
|
|
util/threadnames.h \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/time.h \
|
2021-01-26 19:36:41 +01:00
|
|
|
util/tokenpipe.h \
|
2020-05-20 13:35:27 -07:00
|
|
|
util/trace.h \
|
2019-06-17 10:56:52 +03:00
|
|
|
util/translation.h \
|
2021-05-31 15:59:24 +02:00
|
|
|
util/types.h \
|
2020-06-19 18:07:18 -04:00
|
|
|
util/ui_change_type.h \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/url.h \
|
2019-08-28 15:12:51 -07:00
|
|
|
util/vector.h \
|
2016-12-01 16:06:41 -08:00
|
|
|
validation.h \
|
2015-02-05 01:11:44 +01:00
|
|
|
validationinterface.h \
|
2016-02-15 05:13:27 +01:00
|
|
|
versionbits.h \
|
2020-06-15 14:29:29 -04:00
|
|
|
wallet/bdb.h \
|
2016-10-21 11:47:10 +02:00
|
|
|
wallet/coincontrol.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
wallet/coinselection.h \
|
2020-05-28 02:13:19 -04:00
|
|
|
wallet/context.h \
|
2015-03-22 15:18:55 -04:00
|
|
|
wallet/crypter.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
wallet/db.h \
|
2020-06-01 16:31:25 -04:00
|
|
|
wallet/dump.h \
|
2020-02-19 16:40:00 +01:00
|
|
|
wallet/external_signer_scriptpubkeyman.h \
|
2017-03-03 16:15:47 +01:00
|
|
|
wallet/feebumper.h \
|
2017-08-02 07:19:28 -04:00
|
|
|
wallet/fees.h \
|
2019-06-06 09:53:16 +02:00
|
|
|
wallet/ismine.h \
|
2019-04-02 17:11:26 -04:00
|
|
|
wallet/load.h \
|
2021-02-10 16:06:01 -05:00
|
|
|
wallet/receive.h \
|
2021-12-01 13:10:43 +13:00
|
|
|
wallet/rpc/util.h \
|
2021-12-01 16:43:31 +13:00
|
|
|
wallet/rpc/wallet.h \
|
2020-05-15 19:37:55 -04:00
|
|
|
wallet/salvage.h \
|
2019-10-07 14:11:34 -04:00
|
|
|
wallet/scriptpubkeyman.h \
|
2021-02-10 16:06:01 -05:00
|
|
|
wallet/spend.h \
|
2020-05-26 20:53:01 -04:00
|
|
|
wallet/sqlite.h \
|
2021-02-10 16:06:01 -05:00
|
|
|
wallet/transaction.h \
|
2015-02-03 21:09:47 +01:00
|
|
|
wallet/wallet.h \
|
2014-11-18 12:06:32 -05:00
|
|
|
wallet/walletdb.h \
|
2016-09-16 16:45:36 +02:00
|
|
|
wallet/wallettool.h \
|
2017-10-09 09:48:07 +13:00
|
|
|
wallet/walletutil.h \
|
2020-06-19 18:15:22 -04:00
|
|
|
walletinitinterface.h \
|
2016-11-30 06:07:42 +00:00
|
|
|
warnings.h \
|
2014-11-18 12:06:32 -05:00
|
|
|
zmq/zmqabstractnotifier.h \
|
|
|
|
zmq/zmqnotificationinterface.h \
|
2018-06-29 16:10:01 +02:00
|
|
|
zmq/zmqpublishnotifier.h \
|
2018-07-17 12:51:23 +02:00
|
|
|
zmq/zmqrpc.h \
|
|
|
|
zmq/zmqutil.h
|
2014-11-18 12:06:32 -05:00
|
|
|
|
2014-01-11 15:22:07 +01:00
|
|
|
|
2013-05-27 19:55:01 -04:00
|
|
|
obj/build.h: FORCE
|
2014-06-05 14:22:54 -04:00
|
|
|
@$(MKDIR_P) $(builddir)/obj
|
2017-03-23 10:54:18 -07:00
|
|
|
@$(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \
|
|
|
|
"$(abs_top_srcdir)"
|
2014-10-28 21:33:23 -04:00
|
|
|
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2017-12-05 15:57:12 -05:00
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
# server: shared between bitcoind and bitcoin-qt
|
2019-04-02 17:14:35 -04:00
|
|
|
# Contains code accessing mempool and chain state that is meant to be separated
|
|
|
|
# from wallet and gui code (see node/README.md). Shared code should go in
|
|
|
|
# libbitcoin_common or libbitcoin_util libraries, instead.
|
2021-12-20 10:53:01 -05:00
|
|
|
libbitcoin_node_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(NATPMP_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
|
|
|
|
libbitcoin_node_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
|
|
|
libbitcoin_node_a_SOURCES = \
|
2016-04-16 00:13:15 -04:00
|
|
|
addrdb.cpp \
|
2017-04-30 13:25:39 +02:00
|
|
|
addrman.cpp \
|
2017-10-05 16:40:43 -04:00
|
|
|
banman.cpp \
|
2016-04-15 12:23:57 -07:00
|
|
|
blockencodings.cpp \
|
2018-01-23 16:25:21 -08:00
|
|
|
blockfilter.cpp \
|
2014-09-03 02:20:09 +02:00
|
|
|
chain.cpp \
|
2016-07-11 16:34:21 +02:00
|
|
|
consensus/tx_verify.cpp \
|
2020-06-19 18:15:22 -04:00
|
|
|
dbwrapper.cpp \
|
2020-07-03 04:01:23 +10:00
|
|
|
deploymentstatus.cpp \
|
2019-01-06 11:06:31 -08:00
|
|
|
flatfile.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-23 07:53:17 +01:00
|
|
|
httprpc.cpp \
|
|
|
|
httpserver.cpp \
|
2020-11-27 13:59:26 +01:00
|
|
|
i2p.cpp \
|
2018-05-15 15:57:48 -07:00
|
|
|
index/base.cpp \
|
2018-08-27 17:01:24 -07:00
|
|
|
index/blockfilterindex.cpp \
|
2020-01-24 18:56:47 +01:00
|
|
|
index/coinstatsindex.cpp \
|
2017-12-08 10:19:57 -08:00
|
|
|
index/txindex.cpp \
|
2020-06-19 18:15:22 -04:00
|
|
|
init.cpp \
|
2022-05-27 16:47:05 -04:00
|
|
|
kernel/checks.cpp \
|
2022-02-16 15:31:02 -05:00
|
|
|
kernel/coinstats.cpp \
|
2022-05-25 14:31:54 -04:00
|
|
|
kernel/context.cpp \
|
2020-02-06 19:00:26 +02:00
|
|
|
mapport.cpp \
|
pool: Add and use MemPoolOptions, ApplyArgsManOptions
Reviewers: Note that CTxMemPool now requires a non-defaulted
CTxMemPool::Options for its constructor. Meaning that there's no need to
worry about a stray CTxMemPool constructor somewhere defaulting to
something incorrect. All instances of CTxMemPool construction are
addressed here in this commit.
We set options for CTxMemPool and construct it in many different ways. A
good example can be seen in how we determine CTxMemPool's check_ratio in
AppInitMain(...).
1. We first set the default based on chainparams's
DefaultConsistencyChecks()
2. Then, we apply the ArgsManager option on top of that default
3. Finally, we clamp the result of that between 0 and 1 Million
With this patch, most CTxMemPool construction are along the lines of:
MemPoolOptions mempool_opts{...default overrides...};
ApplyArgsManOptions(argsman, mempool_opts);
...hard overrides...
CTxMemPool pool{mempool_opts};
This "compositional" style of building options means that we can omit
unnecessary/irrelevant steps wherever we want but also maintain full
customizability.
For example:
- For users of libbitcoinkernel, where we eventually want to remove
ArgsManager, they simply won't call (or even know about)
ApplyArgsManOptions.
- See src/init.cpp to see how the check_ratio CTxMemPool option works
after this change.
A MemPoolOptionsForTest helper was also added and used by tests/fuzz
tests where a local CTxMemPool needed to be created.
The change in src/test/fuzz/tx_pool.cpp seemingly changes behaviour by
applying ArgsManager options on top of the CTxMemPool::Options defaults.
However, in future commits where we introduce flags like -maxmempool,
the call to ApplyArgsManOptions is actually what preserves the existing
behaviour. Previously, although it wasn't obvious, our CTxMemPool would
consult gArgs for flags like -maxmempool when it needed it, so it
already relied on ArgsManager information. This patchset just laid bare
the obfuscatory perils of globals.
[META] As this patchset progresses, we will move more and more
CTxMemPool-relevant options into MemPoolOptions and add their
ArgsMan-related logic to ApplyArgsManOptions.
2022-03-18 13:51:37 -04:00
|
|
|
mempool_args.cpp \
|
2013-11-29 16:50:11 +01:00
|
|
|
net.cpp \
|
2021-08-31 13:22:36 +01:00
|
|
|
netgroup.cpp \
|
2016-12-01 15:45:50 -08:00
|
|
|
net_processing.cpp \
|
2021-04-02 19:17:00 +02:00
|
|
|
node/blockstorage.cpp \
|
2021-09-21 11:37:03 -04:00
|
|
|
node/caches.cpp \
|
2021-09-20 16:12:18 -04:00
|
|
|
node/chainstate.cpp \
|
2018-07-17 13:04:35 -04:00
|
|
|
node/coin.cpp \
|
2021-12-01 19:11:37 +00:00
|
|
|
node/connection_types.cpp \
|
2019-09-17 18:28:03 -04:00
|
|
|
node/context.cpp \
|
2022-05-26 16:07:04 +02:00
|
|
|
node/eviction.cpp \
|
2020-11-24 10:13:23 -05:00
|
|
|
node/interfaces.cpp \
|
2021-11-15 13:48:58 +01:00
|
|
|
node/miner.cpp \
|
2021-11-12 10:59:36 +01:00
|
|
|
node/minisketchwrapper.cpp \
|
2019-04-08 16:33:05 -04:00
|
|
|
node/psbt.cpp \
|
2019-01-08 22:16:50 -08:00
|
|
|
node/transaction.cpp \
|
2022-06-14 10:38:51 +02:00
|
|
|
node/interface_ui.cpp \
|
2013-11-29 16:50:11 +01:00
|
|
|
noui.cpp \
|
2014-08-26 16:28:32 -04:00
|
|
|
policy/fees.cpp \
|
2021-12-08 16:19:31 -05:00
|
|
|
policy/fees_args.cpp \
|
2021-06-02 16:19:29 +01:00
|
|
|
policy/packages.cpp \
|
2017-02-03 19:23:22 +00:00
|
|
|
policy/rbf.cpp \
|
2019-04-02 14:14:58 -04:00
|
|
|
policy/settings.cpp \
|
2014-03-10 08:46:53 -07:00
|
|
|
pow.cpp \
|
2014-11-11 04:52:43 -05:00
|
|
|
rest.cpp \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/blockchain.cpp \
|
2022-04-29 15:37:25 +02:00
|
|
|
rpc/fees.cpp \
|
2022-03-11 17:51:36 +01:00
|
|
|
rpc/mempool.cpp \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/mining.cpp \
|
2022-05-03 09:05:07 +02:00
|
|
|
rpc/node.cpp \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/net.cpp \
|
2022-05-03 08:30:16 +02:00
|
|
|
rpc/output_script.cpp \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/rawtransaction.cpp \
|
|
|
|
rpc/server.cpp \
|
2021-04-21 16:39:40 +02:00
|
|
|
rpc/server_util.cpp \
|
2022-04-28 10:30:40 +02:00
|
|
|
rpc/signmessage.cpp \
|
2022-03-16 12:06:15 +01:00
|
|
|
rpc/txoutproof.cpp \
|
2014-11-06 00:24:41 -08:00
|
|
|
script/sigcache.cpp \
|
2018-05-16 19:17:40 +00:00
|
|
|
shutdown.cpp \
|
2019-07-17 17:41:32 +09:00
|
|
|
signet.cpp \
|
2014-06-19 15:08:37 +02:00
|
|
|
timedata.cpp \
|
2015-08-25 20:12:08 +02:00
|
|
|
torcontrol.cpp \
|
2013-11-29 16:50:11 +01:00
|
|
|
txdb.cpp \
|
|
|
|
txmempool.cpp \
|
2021-01-31 00:55:54 +10:00
|
|
|
txorphanage.cpp \
|
|
|
|
txrequest.cpp \
|
2016-12-01 16:06:41 -08:00
|
|
|
validation.cpp \
|
2015-02-05 01:11:44 +01:00
|
|
|
validationinterface.cpp \
|
2016-02-15 05:13:27 +01:00
|
|
|
versionbits.cpp \
|
2013-11-29 16:50:11 +01:00
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
2019-04-02 17:11:26 -04:00
|
|
|
if ENABLE_WALLET
|
2021-12-20 10:53:01 -05:00
|
|
|
libbitcoin_node_a_SOURCES += wallet/init.cpp
|
2022-05-30 10:24:00 +01:00
|
|
|
libbitcoin_node_a_CPPFLAGS += $(BDB_CPPFLAGS)
|
2019-04-02 17:11:26 -04:00
|
|
|
endif
|
2018-09-07 12:35:42 -04:00
|
|
|
if !ENABLE_WALLET
|
2021-12-20 10:53:01 -05:00
|
|
|
libbitcoin_node_a_SOURCES += dummywallet.cpp
|
2018-09-07 12:35:42 -04:00
|
|
|
endif
|
|
|
|
|
2014-11-18 12:06:32 -05:00
|
|
|
if ENABLE_ZMQ
|
2019-07-22 14:26:18 +02:00
|
|
|
libbitcoin_zmq_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS)
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-11-18 12:06:32 -05:00
|
|
|
libbitcoin_zmq_a_SOURCES = \
|
|
|
|
zmq/zmqabstractnotifier.cpp \
|
|
|
|
zmq/zmqnotificationinterface.cpp \
|
2018-06-29 16:10:01 +02:00
|
|
|
zmq/zmqpublishnotifier.cpp \
|
2018-07-17 12:51:23 +02:00
|
|
|
zmq/zmqrpc.cpp \
|
|
|
|
zmq/zmqutil.cpp
|
2014-11-18 12:06:32 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
# wallet: shared between bitcoind and bitcoin-qt, but only linked
|
|
|
|
# when wallet enabled
|
2022-05-30 10:24:00 +01:00
|
|
|
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BDB_CPPFLAGS) $(SQLITE_CFLAGS)
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2013-11-29 16:50:11 +01:00
|
|
|
libbitcoin_wallet_a_SOURCES = \
|
2018-07-17 14:26:35 +09:00
|
|
|
wallet/coincontrol.cpp \
|
2020-05-28 02:13:19 -04:00
|
|
|
wallet/context.cpp \
|
2015-03-22 15:18:55 -04:00
|
|
|
wallet/crypter.cpp \
|
2015-02-03 21:09:47 +01:00
|
|
|
wallet/db.cpp \
|
2020-06-01 16:31:25 -04:00
|
|
|
wallet/dump.cpp \
|
2020-02-19 16:40:00 +01:00
|
|
|
wallet/external_signer_scriptpubkeyman.cpp \
|
2017-03-03 16:15:47 +01:00
|
|
|
wallet/feebumper.cpp \
|
2017-08-02 07:19:28 -04:00
|
|
|
wallet/fees.cpp \
|
2020-11-24 10:20:16 -05:00
|
|
|
wallet/interfaces.cpp \
|
2019-04-02 17:11:26 -04:00
|
|
|
wallet/load.cpp \
|
2021-02-10 16:06:01 -05:00
|
|
|
wallet/receive.cpp \
|
2021-12-01 15:40:40 +13:00
|
|
|
wallet/rpc/addresses.cpp \
|
2021-11-30 14:49:00 +13:00
|
|
|
wallet/rpc/backup.cpp \
|
2021-12-01 16:09:30 +13:00
|
|
|
wallet/rpc/coins.cpp \
|
2021-12-01 14:50:19 +13:00
|
|
|
wallet/rpc/encrypt.cpp \
|
2021-12-01 16:40:55 +13:00
|
|
|
wallet/rpc/spend.cpp \
|
2021-11-26 13:48:32 +01:00
|
|
|
wallet/rpc/signmessage.cpp \
|
2021-12-01 15:06:45 +13:00
|
|
|
wallet/rpc/transactions.cpp \
|
2021-12-01 13:10:43 +13:00
|
|
|
wallet/rpc/util.cpp \
|
2021-12-01 16:43:31 +13:00
|
|
|
wallet/rpc/wallet.cpp \
|
2019-10-07 14:11:34 -04:00
|
|
|
wallet/scriptpubkeyman.cpp \
|
2021-02-10 16:06:01 -05:00
|
|
|
wallet/spend.cpp \
|
|
|
|
wallet/transaction.cpp \
|
2015-02-03 21:09:47 +01:00
|
|
|
wallet/wallet.cpp \
|
|
|
|
wallet/walletdb.cpp \
|
2017-10-09 09:48:07 +13:00
|
|
|
wallet/walletutil.cpp \
|
2018-03-05 16:29:37 -05:00
|
|
|
wallet/coinselection.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
2020-10-15 13:50:00 +00:00
|
|
|
if USE_SQLITE
|
|
|
|
libbitcoin_wallet_a_SOURCES += wallet/sqlite.cpp
|
|
|
|
endif
|
2020-10-19 15:34:21 -04:00
|
|
|
if USE_BDB
|
|
|
|
libbitcoin_wallet_a_SOURCES += wallet/bdb.cpp wallet/salvage.cpp
|
|
|
|
endif
|
2020-10-15 13:50:00 +00:00
|
|
|
|
2016-09-16 16:45:36 +02:00
|
|
|
libbitcoin_wallet_tool_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_wallet_tool_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
|
|
|
libbitcoin_wallet_tool_a_SOURCES = \
|
|
|
|
wallet/wallettool.cpp \
|
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
# crypto primitives library
|
2021-12-22 01:16:00 -05:00
|
|
|
crypto_libbitcoin_crypto_base_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
|
|
|
|
# Specify -static in both CXXFLAGS and LDFLAGS so libtool will only build a
|
|
|
|
# static version of this library. We don't need a dynamic version, and a dynamic
|
|
|
|
# version can't be used on windows anyway because the library doesn't currently
|
|
|
|
# export DLL symbols.
|
|
|
|
crypto_libbitcoin_crypto_base_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_base_la_LDFLAGS = $(AM_LDFLAGS) -static
|
|
|
|
|
|
|
|
crypto_libbitcoin_crypto_base_la_SOURCES = \
|
2016-03-30 15:37:41 +02:00
|
|
|
crypto/aes.cpp \
|
|
|
|
crypto/aes.h \
|
2019-03-11 16:15:45 +01:00
|
|
|
crypto/chacha_poly_aead.h \
|
|
|
|
crypto/chacha_poly_aead.cpp \
|
2017-02-15 12:29:23 -08:00
|
|
|
crypto/chacha20.h \
|
|
|
|
crypto/chacha20.cpp \
|
2014-06-09 15:17:27 -04:00
|
|
|
crypto/common.h \
|
2018-08-24 11:10:43 +02:00
|
|
|
crypto/hkdf_sha256_32.cpp \
|
|
|
|
crypto/hkdf_sha256_32.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
crypto/hmac_sha256.cpp \
|
2014-10-26 01:38:13 -07:00
|
|
|
crypto/hmac_sha256.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
crypto/hmac_sha512.cpp \
|
2014-10-26 01:23:23 -07:00
|
|
|
crypto/hmac_sha512.h \
|
2019-03-03 21:12:34 +01:00
|
|
|
crypto/poly1305.h \
|
|
|
|
crypto/poly1305.cpp \
|
2020-12-20 22:27:14 +01:00
|
|
|
crypto/muhash.h \
|
|
|
|
crypto/muhash.cpp \
|
2015-05-13 18:59:50 +02:00
|
|
|
crypto/ripemd160.cpp \
|
|
|
|
crypto/ripemd160.h \
|
|
|
|
crypto/sha1.cpp \
|
2014-06-09 15:17:27 -04:00
|
|
|
crypto/sha1.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
crypto/sha256.cpp \
|
|
|
|
crypto/sha256.h \
|
2020-08-30 12:54:45 -07:00
|
|
|
crypto/sha3.cpp \
|
|
|
|
crypto/sha3.h \
|
2015-05-13 18:59:50 +02:00
|
|
|
crypto/sha512.cpp \
|
2018-08-24 14:48:23 -07:00
|
|
|
crypto/sha512.h \
|
|
|
|
crypto/siphash.cpp \
|
|
|
|
crypto/siphash.h
|
2014-06-09 15:17:27 -04:00
|
|
|
|
2017-08-28 11:01:28 +02:00
|
|
|
if USE_ASM
|
2021-12-22 01:16:00 -05:00
|
|
|
crypto_libbitcoin_crypto_base_la_SOURCES += crypto/sha256_sse4.cpp
|
2017-07-18 01:06:11 -07:00
|
|
|
endif
|
|
|
|
|
2021-12-22 01:16:00 -05:00
|
|
|
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
|
|
|
|
# CXXFLAGS above
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_LDFLAGS = $(AM_LDFLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_CXXFLAGS += $(SSE41_CXXFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_CPPFLAGS += -DENABLE_SSE41
|
|
|
|
crypto_libbitcoin_crypto_sse41_la_SOURCES = crypto/sha256_sse41.cpp
|
|
|
|
|
|
|
|
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
|
|
|
|
# CXXFLAGS above
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_LDFLAGS = $(AM_LDFLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_CXXFLAGS += $(AVX2_CXXFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_CPPFLAGS += -DENABLE_AVX2
|
|
|
|
crypto_libbitcoin_crypto_avx2_la_SOURCES = crypto/sha256_avx2.cpp
|
|
|
|
|
|
|
|
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
|
|
|
|
# CXXFLAGS above
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_LDFLAGS = $(AM_LDFLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_CXXFLAGS += $(X86_SHANI_CXXFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_CPPFLAGS += -DENABLE_X86_SHANI
|
|
|
|
crypto_libbitcoin_crypto_x86_shani_la_SOURCES = crypto/sha256_x86_shani.cpp
|
|
|
|
|
|
|
|
# See explanation for -static in crypto_libbitcoin_crypto_base_la's LDFLAGS and
|
|
|
|
# CXXFLAGS above
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_LDFLAGS = $(AM_LDFLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -static
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_CXXFLAGS += $(ARM_SHANI_CXXFLAGS)
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_CPPFLAGS += -DENABLE_ARM_SHANI
|
|
|
|
crypto_libbitcoin_crypto_arm_shani_la_SOURCES = crypto/sha256_arm_shani.cpp
|
2018-06-24 10:50:40 -07:00
|
|
|
|
2015-11-20 16:46:03 +01:00
|
|
|
# consensus: shared between all executables that validate any consensus rules.
|
|
|
|
libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
|
|
|
libbitcoin_consensus_a_SOURCES = \
|
2015-11-24 06:26:15 +01:00
|
|
|
arith_uint256.cpp \
|
|
|
|
arith_uint256.h \
|
2021-09-11 10:29:00 +08:00
|
|
|
consensus/amount.h \
|
2015-11-24 06:26:15 +01:00
|
|
|
consensus/merkle.cpp \
|
|
|
|
consensus/merkle.h \
|
|
|
|
consensus/params.h \
|
2019-04-02 13:41:12 -04:00
|
|
|
consensus/tx_check.cpp \
|
2015-11-24 06:26:15 +01:00
|
|
|
consensus/validation.h \
|
2015-11-20 16:46:03 +01:00
|
|
|
hash.cpp \
|
|
|
|
hash.h \
|
|
|
|
prevector.h \
|
2015-11-24 06:26:15 +01:00
|
|
|
primitives/block.cpp \
|
|
|
|
primitives/block.h \
|
2015-11-20 16:46:03 +01:00
|
|
|
primitives/transaction.cpp \
|
|
|
|
primitives/transaction.h \
|
|
|
|
pubkey.cpp \
|
|
|
|
pubkey.h \
|
|
|
|
script/bitcoinconsensus.cpp \
|
|
|
|
script/interpreter.cpp \
|
|
|
|
script/interpreter.h \
|
|
|
|
script/script.cpp \
|
|
|
|
script/script.h \
|
|
|
|
script/script_error.cpp \
|
|
|
|
script/script_error.h \
|
|
|
|
serialize.h \
|
2018-04-04 11:56:22 -07:00
|
|
|
span.h \
|
2015-11-20 16:46:03 +01:00
|
|
|
tinyformat.h \
|
|
|
|
uint256.cpp \
|
|
|
|
uint256.h \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/strencodings.cpp \
|
|
|
|
util/strencodings.h \
|
2015-11-20 16:46:03 +01:00
|
|
|
version.h
|
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
# common: shared between bitcoind, and bitcoin-qt and non-server tools
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2013-11-27 15:41:12 +01:00
|
|
|
libbitcoin_common_a_SOURCES = \
|
2014-06-25 10:03:00 +02:00
|
|
|
base58.cpp \
|
2017-08-25 18:12:39 -07:00
|
|
|
bech32.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
chainparams.cpp \
|
2014-06-25 10:03:00 +02:00
|
|
|
coins.cpp \
|
2021-09-29 17:09:55 +02:00
|
|
|
common/bloom.cpp \
|
2014-10-19 04:28:43 +02:00
|
|
|
compressor.cpp \
|
2014-06-23 23:10:24 -04:00
|
|
|
core_read.cpp \
|
|
|
|
core_write.cpp \
|
2021-03-11 12:17:22 +10:00
|
|
|
deploymentinfo.cpp \
|
2021-03-18 14:17:39 +01:00
|
|
|
external_signer.cpp \
|
2021-04-18 18:56:12 -04:00
|
|
|
init/common.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
key.cpp \
|
2017-09-19 18:12:25 -07:00
|
|
|
key_io.cpp \
|
2019-04-02 16:57:36 -04:00
|
|
|
merkleblock.cpp \
|
2021-08-31 09:59:12 -04:00
|
|
|
net_types.cpp \
|
2016-05-31 17:25:03 -04:00
|
|
|
netaddress.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
netbase.cpp \
|
2019-06-20 18:37:51 +09:00
|
|
|
net_permissions.cpp \
|
2019-04-02 16:57:36 -04:00
|
|
|
outputtype.cpp \
|
2016-03-31 23:30:17 +02:00
|
|
|
policy/feerate.cpp \
|
2019-04-02 14:14:58 -04:00
|
|
|
policy/policy.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
protocol.cpp \
|
2019-03-05 18:55:40 -08:00
|
|
|
psbt.cpp \
|
2019-04-02 16:51:32 -04:00
|
|
|
rpc/rawtransaction_util.cpp \
|
2021-03-18 14:17:39 +01:00
|
|
|
rpc/external_signer.cpp \
|
2019-04-02 16:42:51 -04:00
|
|
|
rpc/util.cpp \
|
2015-04-02 10:33:45 -04:00
|
|
|
scheduler.cpp \
|
2018-07-04 18:08:19 -07:00
|
|
|
script/descriptor.cpp \
|
2019-08-28 16:23:03 -07:00
|
|
|
script/miniscript.cpp \
|
2014-08-27 17:22:33 +02:00
|
|
|
script/sign.cpp \
|
2019-06-06 22:52:24 +02:00
|
|
|
script/signingprovider.cpp \
|
2014-08-23 03:35:51 +02:00
|
|
|
script/standard.cpp \
|
2016-11-30 06:07:42 +00:00
|
|
|
warnings.cpp \
|
2014-06-19 15:10:04 +02:00
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
|
|
|
# util: shared between all executables.
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-06-19 15:10:04 +02:00
|
|
|
libbitcoin_util_a_SOURCES = \
|
2016-09-18 09:55:14 +02:00
|
|
|
support/lockedpool.cpp \
|
2014-06-19 15:10:04 +02:00
|
|
|
chainparamsbase.cpp \
|
2014-10-28 21:33:23 -04:00
|
|
|
clientversion.cpp \
|
2017-03-01 15:53:56 +00:00
|
|
|
fs.cpp \
|
2020-11-24 13:59:33 -05:00
|
|
|
interfaces/echo.cpp \
|
2019-04-02 16:57:36 -04:00
|
|
|
interfaces/handler.cpp \
|
2017-12-05 15:57:12 -05:00
|
|
|
interfaces/init.cpp \
|
2018-04-18 10:05:05 -07:00
|
|
|
logging.cpp \
|
2014-06-26 14:41:53 +02:00
|
|
|
random.cpp \
|
2019-10-26 12:20:12 -07:00
|
|
|
randomenv.cpp \
|
2019-06-20 02:39:38 +09:00
|
|
|
rpc/request.cpp \
|
2015-01-20 19:23:25 -05:00
|
|
|
support/cleanse.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
sync.cpp \
|
2016-12-27 17:12:15 -05:00
|
|
|
threadinterrupt.cpp \
|
2019-12-18 14:27:03 -05:00
|
|
|
util/asmap.cpp \
|
2018-11-06 09:23:43 -05:00
|
|
|
util/bip32.cpp \
|
2018-08-20 23:35:29 -07:00
|
|
|
util/bytevectorhash.cpp \
|
2022-03-26 12:41:28 +10:00
|
|
|
util/check.cpp \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/error.cpp \
|
|
|
|
util/fees.cpp \
|
2021-02-01 13:35:28 +01:00
|
|
|
util/getuniquepath.cpp \
|
2019-09-17 17:02:56 -04:00
|
|
|
util/hasher.cpp \
|
2021-01-04 13:02:43 +01:00
|
|
|
util/sock.cpp \
|
2022-04-20 16:17:19 +02:00
|
|
|
util/syserror.cpp \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/system.cpp \
|
2019-11-19 15:49:35 +01:00
|
|
|
util/message.cpp \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/moneystr.cpp \
|
2019-04-02 17:03:37 -04:00
|
|
|
util/rbf.cpp \
|
2020-11-18 17:13:27 +01:00
|
|
|
util/readwritefile.cpp \
|
2019-03-05 16:07:48 -05:00
|
|
|
util/settings.cpp \
|
2021-04-13 20:44:46 +03:00
|
|
|
util/thread.cpp \
|
2018-06-13 14:50:59 -04:00
|
|
|
util/threadnames.cpp \
|
2021-05-16 17:23:17 -07:00
|
|
|
util/serfloat.cpp \
|
2019-07-30 14:53:05 -07:00
|
|
|
util/spanparsing.cpp \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/strencodings.cpp \
|
2019-08-20 14:51:43 -04:00
|
|
|
util/string.cpp \
|
2021-10-01 13:53:59 +00:00
|
|
|
util/syscall_sandbox.cpp \
|
2018-10-22 15:51:11 -07:00
|
|
|
util/time.cpp \
|
2021-01-26 19:36:41 +01:00
|
|
|
util/tokenpipe.cpp \
|
2013-05-27 19:55:01 -04:00
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
2020-04-02 08:28:11 -04:00
|
|
|
if USE_LIBEVENT
|
|
|
|
libbitcoin_util_a_SOURCES += util/url.cpp
|
|
|
|
endif
|
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
# cli: shared between bitcoin-cli and bitcoin-qt
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2013-11-27 15:41:12 +01:00
|
|
|
libbitcoin_cli_a_SOURCES = \
|
2018-07-19 23:48:38 +09:00
|
|
|
compat/stdin.h \
|
|
|
|
compat/stdin.cpp \
|
2016-01-15 11:55:17 +11:00
|
|
|
rpc/client.cpp \
|
2013-11-27 15:41:12 +01:00
|
|
|
$(BITCOIN_CORE_H)
|
|
|
|
|
2014-06-19 15:10:04 +02:00
|
|
|
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
|
2013-05-27 19:55:01 -04:00
|
|
|
#
|
|
|
|
|
2019-07-10 13:46:31 -04:00
|
|
|
# bitcoind & bitcoin-node binaries #
|
|
|
|
bitcoin_daemon_sources = bitcoind.cpp
|
|
|
|
bitcoin_bin_cppflags = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
bitcoin_bin_cxxflags = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2020-07-17 14:43:29 +08:00
|
|
|
bitcoin_bin_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
|
2014-11-21 12:24:50 +13:00
|
|
|
|
|
|
|
if TARGET_WINDOWS
|
2019-07-10 13:46:31 -04:00
|
|
|
bitcoin_daemon_sources += bitcoind-res.rc
|
2014-11-21 12:24:50 +13:00
|
|
|
endif
|
|
|
|
|
2019-07-10 13:46:31 -04:00
|
|
|
bitcoin_bin_ldadd = \
|
2017-06-12 18:53:46 -07:00
|
|
|
$(LIBBITCOIN_WALLET) \
|
2014-06-19 15:10:04 +02:00
|
|
|
$(LIBBITCOIN_COMMON) \
|
2020-04-10 19:36:19 -04:00
|
|
|
$(LIBBITCOIN_UTIL) \
|
2019-07-10 13:46:31 -04:00
|
|
|
$(LIBUNIVALUE) \
|
2015-03-26 19:15:28 -04:00
|
|
|
$(LIBBITCOIN_ZMQ) \
|
2015-11-20 16:46:03 +01:00
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
2014-06-19 15:10:04 +02:00
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
2013-11-12 20:09:55 +00:00
|
|
|
$(LIBLEVELDB) \
|
2014-11-05 07:58:37 -08:00
|
|
|
$(LIBMEMENV) \
|
|
|
|
$(LIBSECP256K1)
|
2014-06-06 10:57:28 -04:00
|
|
|
|
2022-02-09 18:16:34 +00:00
|
|
|
bitcoin_bin_ldadd += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(SQLITE_LIBS)
|
2019-07-10 13:46:31 -04:00
|
|
|
|
2017-12-05 15:57:12 -05:00
|
|
|
bitcoind_SOURCES = $(bitcoin_daemon_sources) init/bitcoind.cpp
|
2019-07-10 13:46:31 -04:00
|
|
|
bitcoind_CPPFLAGS = $(bitcoin_bin_cppflags)
|
|
|
|
bitcoind_CXXFLAGS = $(bitcoin_bin_cxxflags)
|
|
|
|
bitcoind_LDFLAGS = $(bitcoin_bin_ldflags)
|
2021-12-20 10:53:01 -05:00
|
|
|
bitcoind_LDADD = $(LIBBITCOIN_NODE) $(bitcoin_bin_ldadd)
|
2019-07-10 13:46:31 -04:00
|
|
|
|
2017-12-05 15:57:12 -05:00
|
|
|
bitcoin_node_SOURCES = $(bitcoin_daemon_sources) init/bitcoin-node.cpp
|
2019-07-10 13:46:31 -04:00
|
|
|
bitcoin_node_CPPFLAGS = $(bitcoin_bin_cppflags)
|
|
|
|
bitcoin_node_CXXFLAGS = $(bitcoin_bin_cxxflags)
|
|
|
|
bitcoin_node_LDFLAGS = $(bitcoin_bin_ldflags)
|
2021-12-20 10:53:01 -05:00
|
|
|
bitcoin_node_LDADD = $(LIBBITCOIN_NODE) $(bitcoin_bin_ldadd) $(LIBBITCOIN_IPC) $(LIBMULTIPROCESS_LIBS)
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2014-11-21 12:24:50 +13:00
|
|
|
# bitcoin-cli binary #
|
|
|
|
bitcoin_cli_SOURCES = bitcoin-cli.cpp
|
2015-11-09 20:50:25 -05:00
|
|
|
bitcoin_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
|
|
|
|
bitcoin_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2020-07-17 14:43:29 +08:00
|
|
|
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
|
2014-11-21 12:24:50 +13:00
|
|
|
|
2013-09-18 15:53:29 -04:00
|
|
|
if TARGET_WINDOWS
|
2014-11-21 12:24:50 +13:00
|
|
|
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
|
2013-09-18 15:53:29 -04:00
|
|
|
endif
|
|
|
|
|
2014-01-11 15:22:07 +01:00
|
|
|
bitcoin_cli_LDADD = \
|
2014-06-19 15:10:04 +02:00
|
|
|
$(LIBBITCOIN_CLI) \
|
2015-09-04 16:11:34 +02:00
|
|
|
$(LIBUNIVALUE) \
|
2016-04-16 12:25:12 +02:00
|
|
|
$(LIBBITCOIN_UTIL) \
|
2018-06-06 15:20:34 -04:00
|
|
|
$(LIBBITCOIN_CRYPTO)
|
2014-06-06 10:57:28 -04:00
|
|
|
|
2022-02-09 18:16:34 +00:00
|
|
|
bitcoin_cli_LDADD += $(EVENT_LIBS)
|
2013-10-11 23:09:59 +02:00
|
|
|
#
|
|
|
|
|
2014-07-29 11:12:44 -04:00
|
|
|
# bitcoin-tx binary #
|
2014-11-21 12:24:50 +13:00
|
|
|
bitcoin_tx_SOURCES = bitcoin-tx.cpp
|
2015-11-09 20:50:25 -05:00
|
|
|
bitcoin_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
bitcoin_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2020-07-17 14:43:29 +08:00
|
|
|
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
|
2014-11-21 12:24:50 +13:00
|
|
|
|
2015-05-02 15:30:38 +00:00
|
|
|
if TARGET_WINDOWS
|
|
|
|
bitcoin_tx_SOURCES += bitcoin-tx-res.rc
|
|
|
|
endif
|
|
|
|
|
2014-07-29 11:12:44 -04:00
|
|
|
bitcoin_tx_LDADD = \
|
2015-09-04 16:11:34 +02:00
|
|
|
$(LIBUNIVALUE) \
|
2014-07-29 11:12:44 -04:00
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_UTIL) \
|
2015-11-20 16:46:03 +01:00
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
2014-11-05 07:58:37 -08:00
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
2014-11-21 12:24:50 +13:00
|
|
|
$(LIBSECP256K1)
|
2014-07-29 11:12:44 -04:00
|
|
|
#
|
2013-10-11 23:09:59 +02:00
|
|
|
|
2016-09-16 16:45:36 +02:00
|
|
|
# bitcoin-wallet binary #
|
|
|
|
bitcoin_wallet_SOURCES = bitcoin-wallet.cpp
|
2017-12-05 15:57:12 -05:00
|
|
|
bitcoin_wallet_SOURCES += init/bitcoin-wallet.cpp
|
2019-07-10 13:46:31 -04:00
|
|
|
bitcoin_wallet_CPPFLAGS = $(bitcoin_bin_cppflags)
|
|
|
|
bitcoin_wallet_CXXFLAGS = $(bitcoin_bin_cxxflags)
|
|
|
|
bitcoin_wallet_LDFLAGS = $(bitcoin_bin_ldflags)
|
2021-10-24 16:54:54 +03:00
|
|
|
bitcoin_wallet_LDADD = \
|
|
|
|
$(LIBBITCOIN_WALLET_TOOL) \
|
|
|
|
$(LIBBITCOIN_WALLET) \
|
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_UTIL) \
|
|
|
|
$(LIBUNIVALUE) \
|
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
|
|
|
$(LIBSECP256K1) \
|
|
|
|
$(BDB_LIBS) \
|
|
|
|
$(SQLITE_LIBS)
|
2016-09-16 16:45:36 +02:00
|
|
|
|
|
|
|
if TARGET_WINDOWS
|
|
|
|
bitcoin_wallet_SOURCES += bitcoin-wallet-res.rc
|
|
|
|
endif
|
|
|
|
#
|
|
|
|
|
2020-09-10 08:09:07 +10:00
|
|
|
# bitcoin-util binary #
|
|
|
|
bitcoin_util_SOURCES = bitcoin-util.cpp
|
|
|
|
bitcoin_util_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
bitcoin_util_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2021-02-02 10:57:06 +08:00
|
|
|
bitcoin_util_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
|
2020-09-10 08:09:07 +10:00
|
|
|
|
|
|
|
if TARGET_WINDOWS
|
|
|
|
bitcoin_util_SOURCES += bitcoin-util-res.rc
|
|
|
|
endif
|
|
|
|
|
|
|
|
bitcoin_util_LDADD = \
|
|
|
|
$(LIBBITCOIN_COMMON) \
|
|
|
|
$(LIBBITCOIN_UTIL) \
|
|
|
|
$(LIBUNIVALUE) \
|
|
|
|
$(LIBBITCOIN_CONSENSUS) \
|
|
|
|
$(LIBBITCOIN_CRYPTO) \
|
|
|
|
$(LIBSECP256K1)
|
|
|
|
#
|
|
|
|
|
2021-09-01 15:46:51 -04:00
|
|
|
# bitcoin-chainstate binary #
|
build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
--patience --color-moved=dimmed-zebra
Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.
See previous commit "build: Add example bitcoin-chainstate executable"
for more context.
We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility
When compiling for mingw-w64, specify -static in both:
- ..._la_CXXFLAGS so that libtool will avoid building two versions of
each object (one PIC, one non-PIC). We just need the one that is
suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.
If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.
Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.
However, on other targets, the shared library creation works fine.
-----
Note to users: You need to either specify:
--enable-experimental-util-chainstate
or,
--with-experimental-kernel-lib
To build the libbitcionkernel library. See the configure help for more
details.
build shared libbitcoinkernel where we can
2021-12-21 20:10:05 -05:00
|
|
|
bitcoin_chainstate_SOURCES = bitcoin-chainstate.cpp
|
|
|
|
bitcoin_chainstate_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
bitcoin_chainstate_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2022-04-27 20:03:58 +00:00
|
|
|
|
|
|
|
# $(LIBTOOL_APP_LDFLAGS) deliberately omitted here so that we can test linking
|
|
|
|
# bitcoin-chainstate against libbitcoinkernel as a shared or static library by
|
|
|
|
# setting --{en,dis}able-shared.
|
|
|
|
bitcoin_chainstate_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(PTHREAD_FLAGS)
|
build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
--patience --color-moved=dimmed-zebra
Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.
See previous commit "build: Add example bitcoin-chainstate executable"
for more context.
We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility
When compiling for mingw-w64, specify -static in both:
- ..._la_CXXFLAGS so that libtool will avoid building two versions of
each object (one PIC, one non-PIC). We just need the one that is
suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.
If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.
Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.
However, on other targets, the shared library creation works fine.
-----
Note to users: You need to either specify:
--enable-experimental-util-chainstate
or,
--with-experimental-kernel-lib
To build the libbitcionkernel library. See the configure help for more
details.
build shared libbitcoinkernel where we can
2021-12-21 20:10:05 -05:00
|
|
|
bitcoin_chainstate_LDADD = $(LIBBITCOINKERNEL)
|
|
|
|
#
|
|
|
|
|
|
|
|
# bitcoinkernel library #
|
|
|
|
if BUILD_BITCOIN_KERNEL_LIB
|
|
|
|
lib_LTLIBRARIES += $(LIBBITCOINKERNEL)
|
|
|
|
|
|
|
|
libbitcoinkernel_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) $(PTHREAD_FLAGS)
|
|
|
|
libbitcoinkernel_la_LIBADD = $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) $(LIBSECP256K1)
|
|
|
|
libbitcoinkernel_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
|
|
|
|
|
|
|
|
# libbitcoinkernel requires default symbol visibility, explicitly specify that
|
|
|
|
# here so that things still work even when user configures with
|
|
|
|
# --enable-reduce-exports
|
|
|
|
#
|
|
|
|
# Note this is a quick hack that will be removed as we incrementally define what
|
|
|
|
# to export from the library.
|
|
|
|
libbitcoinkernel_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -fvisibility=default
|
|
|
|
|
|
|
|
# TODO: For now, Specify -static in both CXXFLAGS and LDFLAGS when building for
|
|
|
|
# windows targets so libtool will only build a static version of this
|
|
|
|
# library. There are unresolved problems when building dll's for mingw-w64
|
|
|
|
# and attempting to statically embed libstdc++, libpthread, etc.
|
|
|
|
if TARGET_WINDOWS
|
|
|
|
libbitcoinkernel_la_LDFLAGS += -static
|
|
|
|
libbitcoinkernel_la_CXXFLAGS += -static
|
|
|
|
endif
|
|
|
|
|
2022-04-22 13:28:33 -04:00
|
|
|
# TODO: libbitcoinkernel is a work in progress consensus engine library, as more
|
|
|
|
# and more modules are decoupled from the consensus engine, this list will
|
2022-07-01 14:34:25 +07:00
|
|
|
# shrink to only those which are absolutely necessary.
|
build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
--patience --color-moved=dimmed-zebra
Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.
See previous commit "build: Add example bitcoin-chainstate executable"
for more context.
We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility
When compiling for mingw-w64, specify -static in both:
- ..._la_CXXFLAGS so that libtool will avoid building two versions of
each object (one PIC, one non-PIC). We just need the one that is
suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.
If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.
Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.
However, on other targets, the shared library creation works fine.
-----
Note to users: You need to either specify:
--enable-experimental-util-chainstate
or,
--with-experimental-kernel-lib
To build the libbitcionkernel library. See the configure help for more
details.
build shared libbitcoinkernel where we can
2021-12-21 20:10:05 -05:00
|
|
|
libbitcoinkernel_la_SOURCES = \
|
2022-02-10 21:38:32 -05:00
|
|
|
kernel/bitcoinkernel.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
arith_uint256.cpp \
|
|
|
|
chain.cpp \
|
|
|
|
chainparamsbase.cpp \
|
|
|
|
chainparams.cpp \
|
|
|
|
clientversion.cpp \
|
|
|
|
coins.cpp \
|
|
|
|
compressor.cpp \
|
|
|
|
consensus/merkle.cpp \
|
|
|
|
consensus/tx_check.cpp \
|
|
|
|
consensus/tx_verify.cpp \
|
|
|
|
core_read.cpp \
|
|
|
|
dbwrapper.cpp \
|
|
|
|
deploymentinfo.cpp \
|
|
|
|
deploymentstatus.cpp \
|
|
|
|
flatfile.cpp \
|
|
|
|
fs.cpp \
|
|
|
|
hash.cpp \
|
2022-05-27 16:47:05 -04:00
|
|
|
kernel/checks.cpp \
|
2022-02-16 15:31:02 -05:00
|
|
|
kernel/coinstats.cpp \
|
2022-05-25 14:31:54 -04:00
|
|
|
kernel/context.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
key.cpp \
|
|
|
|
logging.cpp \
|
|
|
|
node/blockstorage.cpp \
|
|
|
|
node/chainstate.cpp \
|
2022-06-14 10:38:51 +02:00
|
|
|
node/interface_ui.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
policy/feerate.cpp \
|
|
|
|
policy/fees.cpp \
|
|
|
|
policy/packages.cpp \
|
|
|
|
policy/policy.cpp \
|
|
|
|
policy/rbf.cpp \
|
|
|
|
policy/settings.cpp \
|
|
|
|
pow.cpp \
|
|
|
|
primitives/block.cpp \
|
|
|
|
primitives/transaction.cpp \
|
|
|
|
pubkey.cpp \
|
|
|
|
random.cpp \
|
|
|
|
randomenv.cpp \
|
|
|
|
scheduler.cpp \
|
|
|
|
script/interpreter.cpp \
|
|
|
|
script/script.cpp \
|
|
|
|
script/script_error.cpp \
|
|
|
|
script/sigcache.cpp \
|
|
|
|
script/standard.cpp \
|
|
|
|
shutdown.cpp \
|
|
|
|
signet.cpp \
|
|
|
|
support/cleanse.cpp \
|
|
|
|
support/lockedpool.cpp \
|
|
|
|
sync.cpp \
|
|
|
|
threadinterrupt.cpp \
|
|
|
|
txdb.cpp \
|
|
|
|
txmempool.cpp \
|
|
|
|
uint256.cpp \
|
|
|
|
util/bytevectorhash.cpp \
|
2022-03-26 12:41:28 +10:00
|
|
|
util/check.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
util/getuniquepath.cpp \
|
|
|
|
util/hasher.cpp \
|
|
|
|
util/moneystr.cpp \
|
|
|
|
util/rbf.cpp \
|
|
|
|
util/serfloat.cpp \
|
|
|
|
util/settings.cpp \
|
|
|
|
util/strencodings.cpp \
|
2022-05-05 08:28:29 +02:00
|
|
|
util/string.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
util/syscall_sandbox.cpp \
|
2022-04-20 16:17:19 +02:00
|
|
|
util/syserror.cpp \
|
2021-09-01 15:46:51 -04:00
|
|
|
util/system.cpp \
|
|
|
|
util/thread.cpp \
|
|
|
|
util/threadnames.cpp \
|
|
|
|
util/time.cpp \
|
|
|
|
util/tokenpipe.cpp \
|
|
|
|
validation.cpp \
|
|
|
|
validationinterface.cpp \
|
|
|
|
versionbits.cpp \
|
|
|
|
warnings.cpp
|
2022-02-10 16:08:07 -05:00
|
|
|
|
|
|
|
# Required for obj/build.h to be generated first.
|
|
|
|
# More details: https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html
|
build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
--patience --color-moved=dimmed-zebra
Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.
See previous commit "build: Add example bitcoin-chainstate executable"
for more context.
We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility
When compiling for mingw-w64, specify -static in both:
- ..._la_CXXFLAGS so that libtool will avoid building two versions of
each object (one PIC, one non-PIC). We just need the one that is
suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.
If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.
Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.
However, on other targets, the shared library creation works fine.
-----
Note to users: You need to either specify:
--enable-experimental-util-chainstate
or,
--with-experimental-kernel-lib
To build the libbitcionkernel library. See the configure help for more
details.
build shared libbitcoinkernel where we can
2021-12-21 20:10:05 -05:00
|
|
|
libbitcoinkernel_la-clientversion.l$(OBJEXT): obj/build.h
|
|
|
|
endif # BUILD_BITCOIN_KERNEL_LIB
|
2021-09-01 15:46:51 -04:00
|
|
|
#
|
|
|
|
|
2014-11-21 12:24:50 +13:00
|
|
|
# bitcoinconsensus library #
|
2014-10-14 18:22:55 -04:00
|
|
|
if BUILD_BITCOIN_LIBS
|
2022-02-08 17:06:21 -05:00
|
|
|
lib_LTLIBRARIES += $(LIBBITCOINCONSENSUS)
|
|
|
|
|
2014-10-14 18:22:55 -04:00
|
|
|
include_HEADERS = script/bitcoinconsensus.h
|
2021-12-22 01:16:00 -05:00
|
|
|
libbitcoinconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_la_SOURCES) $(libbitcoin_consensus_a_SOURCES)
|
2014-10-14 18:22:55 -04:00
|
|
|
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
|
2015-07-28 20:11:20 +02:00
|
|
|
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
|
|
|
|
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
|
2015-11-09 20:50:25 -05:00
|
|
|
libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
|
2014-11-21 12:24:50 +13:00
|
|
|
|
2014-11-06 22:43:19 -05:00
|
|
|
endif
|
2014-11-21 12:24:50 +13:00
|
|
|
#
|
2014-10-14 18:22:55 -04:00
|
|
|
|
2016-05-27 14:14:44 -04: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 18:05:09 -04:00
|
|
|
CLEANFILES = $(EXTRA_LIBRARIES)
|
|
|
|
|
2015-05-28 02:47:53 +02:00
|
|
|
CLEANFILES += *.gcda *.gcno
|
|
|
|
CLEANFILES += compat/*.gcda compat/*.gcno
|
|
|
|
CLEANFILES += consensus/*.gcda consensus/*.gcno
|
2020-08-14 14:38:28 +03:00
|
|
|
CLEANFILES += crc32c/src/*.gcda crc32c/src/*.gcno
|
2015-05-28 02:47:53 +02:00
|
|
|
CLEANFILES += crypto/*.gcda crypto/*.gcno
|
2020-08-14 14:38:28 +03:00
|
|
|
CLEANFILES += index/*.gcda index/*.gcno
|
|
|
|
CLEANFILES += interfaces/*.gcda interfaces/*.gcno
|
|
|
|
CLEANFILES += node/*.gcda node/*.gcno
|
2015-05-28 02:47:53 +02:00
|
|
|
CLEANFILES += policy/*.gcda policy/*.gcno
|
|
|
|
CLEANFILES += primitives/*.gcda primitives/*.gcno
|
2020-08-14 14:38:28 +03:00
|
|
|
CLEANFILES += rpc/*.gcda rpc/*.gcno
|
2015-05-28 02:47:53 +02:00
|
|
|
CLEANFILES += script/*.gcda script/*.gcno
|
|
|
|
CLEANFILES += support/*.gcda support/*.gcno
|
|
|
|
CLEANFILES += univalue/*.gcda univalue/*.gcno
|
2020-08-14 14:38:28 +03:00
|
|
|
CLEANFILES += util/*.gcda util/*.gcno
|
2015-05-28 02:47:53 +02:00
|
|
|
CLEANFILES += wallet/*.gcda wallet/*.gcno
|
|
|
|
CLEANFILES += wallet/test/*.gcda wallet/test/*.gcno
|
|
|
|
CLEANFILES += zmq/*.gcda zmq/*.gcno
|
2017-10-01 23:07:23 +02:00
|
|
|
CLEANFILES += obj/build.h
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2016-06-01 18:05:09 -04:00
|
|
|
EXTRA_DIST = $(CTAES_DIST)
|
2013-05-27 19:55:01 -04:00
|
|
|
|
2017-04-18 19:14:22 -04:00
|
|
|
|
|
|
|
config/bitcoin-config.h: config/stamp-h1
|
|
|
|
@$(MAKE) -C $(top_builddir) $(subdir)/$(@)
|
|
|
|
config/stamp-h1: $(top_srcdir)/$(subdir)/config/bitcoin-config.h.in $(top_builddir)/config.status
|
|
|
|
$(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@)
|
|
|
|
$(top_srcdir)/$(subdir)/config/bitcoin-config.h.in: $(am__configure_deps)
|
|
|
|
$(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/bitcoin-config.h.in
|
|
|
|
|
2013-05-27 19:55:01 -04:00
|
|
|
clean-local:
|
2014-11-05 20:56:45 -05:00
|
|
|
-$(MAKE) -C secp256k1 clean
|
2015-05-28 02:47:53 +02:00
|
|
|
-rm -f leveldb/*/*.gcda leveldb/*/*.gcno leveldb/helpers/memenv/*.gcda leveldb/helpers/memenv/*.gcno
|
2014-06-09 14:58:30 -04:00
|
|
|
-rm -f config.h
|
2016-06-01 18:06:40 -04:00
|
|
|
-rm -rf test/__pycache__
|
2014-05-28 13:38:41 -04:00
|
|
|
|
2014-06-04 17:13:03 -04:00
|
|
|
.rc.o:
|
2014-06-05 14:17:50 -04:00
|
|
|
@test -f $(WINDRES)
|
2015-12-09 10:53:12 +00:00
|
|
|
## FIXME: How to get the appropriate modulename_CPPFLAGS in here?
|
|
|
|
$(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@
|
2014-06-04 17:13:03 -04:00
|
|
|
|
2016-01-26 14:52:56 -05:00
|
|
|
check-symbols: $(bin_PROGRAMS)
|
2021-07-02 14:22:04 +08:00
|
|
|
@echo "Running symbol and dynamic library checks..."
|
2021-01-21 13:52:40 -05:00
|
|
|
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS)
|
2016-01-26 14:52:56 -05:00
|
|
|
|
|
|
|
check-security: $(bin_PROGRAMS)
|
|
|
|
if HARDEN
|
|
|
|
@echo "Checking binary security..."
|
2021-01-21 13:52:40 -05:00
|
|
|
$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS)
|
2016-01-26 14:52:56 -05:00
|
|
|
endif
|
|
|
|
|
2017-12-05 15:57:12 -05:00
|
|
|
libbitcoin_ipc_mpgen_input = \
|
2020-11-24 13:59:33 -05:00
|
|
|
ipc/capnp/echo.capnp \
|
2017-12-05 15:57:12 -05:00
|
|
|
ipc/capnp/init.capnp
|
|
|
|
EXTRA_DIST += $(libbitcoin_ipc_mpgen_input)
|
|
|
|
%.capnp:
|
|
|
|
|
2022-05-25 18:01:22 -04:00
|
|
|
# Explicitly list dependencies on generated headers as described in
|
|
|
|
# https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html#Recording-Dependencies-manually
|
|
|
|
ipc/capnp/libbitcoin_ipc_a-protocol.$(OBJEXT): $(libbitcoin_ipc_mpgen_input:=.h)
|
|
|
|
|
2017-12-05 15:57:12 -05:00
|
|
|
if BUILD_MULTIPROCESS
|
|
|
|
LIBBITCOIN_IPC=libbitcoin_ipc.a
|
|
|
|
libbitcoin_ipc_a_SOURCES = \
|
2017-12-05 15:57:12 -05:00
|
|
|
ipc/capnp/context.h \
|
2017-12-05 15:57:12 -05:00
|
|
|
ipc/capnp/init-types.h \
|
|
|
|
ipc/capnp/protocol.cpp \
|
|
|
|
ipc/capnp/protocol.h \
|
2017-12-05 15:57:12 -05:00
|
|
|
ipc/context.h \
|
2017-12-05 15:57:12 -05:00
|
|
|
ipc/exception.h \
|
|
|
|
ipc/interfaces.cpp \
|
|
|
|
ipc/process.cpp \
|
|
|
|
ipc/process.h \
|
|
|
|
ipc/protocol.h
|
|
|
|
libbitcoin_ipc_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
|
|
|
|
libbitcoin_ipc_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(LIBMULTIPROCESS_CFLAGS)
|
|
|
|
|
|
|
|
include $(MPGEN_PREFIX)/include/mpgen.mk
|
|
|
|
libbitcoin_ipc_mpgen_output = \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.c++) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.h) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.proxy-client.c++) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.proxy-server.c++) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.proxy-types.c++) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.proxy-types.h) \
|
|
|
|
$(libbitcoin_ipc_mpgen_input:=.proxy.h)
|
|
|
|
nodist_libbitcoin_ipc_a_SOURCES = $(libbitcoin_ipc_mpgen_output)
|
|
|
|
CLEANFILES += $(libbitcoin_ipc_mpgen_output)
|
|
|
|
endif
|
|
|
|
|
2021-07-20 18:28:19 +00:00
|
|
|
include Makefile.minisketch.include
|
|
|
|
|
2019-11-07 15:52:44 +01:00
|
|
|
include Makefile.crc32c.include
|
2016-02-17 14:35:35 -05:00
|
|
|
include Makefile.leveldb.include
|
2021-07-20 18:28:19 +00:00
|
|
|
|
2019-11-21 21:13:08 +01:00
|
|
|
include Makefile.test_util.include
|
2020-04-05 01:01:13 +02:00
|
|
|
include Makefile.test_fuzz.include
|
2019-11-21 21:13:08 +01:00
|
|
|
|
2014-05-28 13:38:41 -04:00
|
|
|
include Makefile.test.include
|
|
|
|
|
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 13:13:38 -04:00
|
|
|
if ENABLE_BENCH
|
|
|
|
include Makefile.bench.include
|
|
|
|
endif
|
|
|
|
|
2014-05-28 13:38:41 -04:00
|
|
|
if ENABLE_QT
|
|
|
|
include Makefile.qt.include
|
|
|
|
endif
|
|
|
|
|
|
|
|
if ENABLE_QT_TESTS
|
|
|
|
include Makefile.qttest.include
|
|
|
|
endif
|
2021-07-15 18:42:17 +00:00
|
|
|
|
|
|
|
include Makefile.univalue.include
|