aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-07-10 13:46:31 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-04-05 21:48:21 -0400
commite6e44eedd56ecaf59f3fabf8e07ab7dee0ddb1b6 (patch)
treec75b388704bfbd7336a2840dd8f421c9785830fc /src/Makefile.am
parent516ebe8a62de1906f8be9c4a144ea5753678eb4f (diff)
Multiprocess build changes
autotools and automake changes to support multiprocess execution. This adds a new --enable-multiprocess flag, and build configuration code to detect libraries needed for multiprocess support. The --enable-multiprocess flag builds new bitcoin-node and bitcoin-gui executables, which are updated in https://github.com/bitcoin/bitcoin/pull/10102 to communicate across processes. But for now they are functionally equivalent to existing bitcoind and bitcoin-qt executables.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am57
1 files changed, 29 insertions, 28 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ae95902f67..acac00d24a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,6 +85,10 @@ if BUILD_BITCOIND
bin_PROGRAMS += bitcoind
endif
+if BUILD_BITCOIN_NODE
+ bin_PROGRAMS += bitcoin-node
+endif
+
if BUILD_BITCOIN_CLI
bin_PROGRAMS += bitcoin-cli
endif
@@ -543,22 +547,22 @@ libbitcoin_cli_a_SOURCES = \
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
#
-# bitcoind binary #
-bitcoind_SOURCES = bitcoind.cpp
-bitcoind_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
-bitcoind_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+# bitcoind & bitcoin-node binaries #
+bitcoin_common_sources = bitcoind.cpp
+bitcoin_common_cppflags = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
+bitcoin_common_cxxflags = $(AM_CXXFLAGS) $(PIE_FLAGS)
+bitcoin_common_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
-bitcoind_SOURCES += bitcoind-res.rc
+bitcoin_common_sources += bitcoind-res.rc
endif
-bitcoind_LDADD = \
+bitcoin_common_ldadd = \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_WALLET) \
$(LIBBITCOIN_COMMON) \
- $(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL) \
+ $(LIBUNIVALUE) \
$(LIBBITCOIN_ZMQ) \
$(LIBBITCOIN_CONSENSUS) \
$(LIBBITCOIN_CRYPTO) \
@@ -567,7 +571,19 @@ bitcoind_LDADD = \
$(LIBMEMENV) \
$(LIBSECP256K1)
-bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
+bitcoin_common_ldadd += $(BOOST_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS)
+
+bitcoind_SOURCES = $(bitcoin_common_sources)
+bitcoind_CPPFLAGS = $(bitcoin_common_cppflags)
+bitcoind_CXXFLAGS = $(bitcoin_common_cxxflags)
+bitcoind_LDFLAGS = $(bitcoin_common_ldflags)
+bitcoind_LDADD = $(bitcoin_common_ldadd)
+
+bitcoin_node_SOURCES = $(bitcoin_common_sources)
+bitcoin_node_CPPFLAGS = $(bitcoin_common_cppflags)
+bitcoin_node_CXXFLAGS = $(bitcoin_common_cxxflags)
+bitcoin_node_LDFLAGS = $(bitcoin_common_ldflags)
+bitcoin_node_LDADD = $(bitcoin_common_ldadd)
# bitcoin-cli binary #
bitcoin_cli_SOURCES = bitcoin-cli.cpp
@@ -611,29 +627,14 @@ bitcoin_tx_LDADD += $(BOOST_LIBS)
# bitcoin-wallet binary #
bitcoin_wallet_SOURCES = bitcoin-wallet.cpp
-bitcoin_wallet_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
-bitcoin_wallet_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-bitcoin_wallet_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+bitcoin_wallet_CPPFLAGS = $(bitcoin_common_cppflags)
+bitcoin_wallet_CXXFLAGS = $(bitcoin_common_cxxflags)
+bitcoin_wallet_LDFLAGS = $(bitcoin_common_ldflags)
+bitcoin_wallet_LDADD = $(LIBBITCOIN_WALLET_TOOL) $(bitcoin_common_ldadd)
if TARGET_WINDOWS
bitcoin_wallet_SOURCES += bitcoin-wallet-res.rc
endif
-
-bitcoin_wallet_LDADD = \
- $(LIBBITCOIN_WALLET_TOOL) \
- $(LIBBITCOIN_WALLET) \
- $(LIBBITCOIN_COMMON) \
- $(LIBBITCOIN_CONSENSUS) \
- $(LIBBITCOIN_UTIL) \
- $(LIBBITCOIN_CRYPTO) \
- $(LIBBITCOIN_ZMQ) \
- $(LIBLEVELDB) \
- $(LIBLEVELDB_SSE42) \
- $(LIBMEMENV) \
- $(LIBSECP256K1) \
- $(LIBUNIVALUE)
-
-bitcoin_wallet_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(MINIUPNPC_LIBS) $(ZMQ_LIBS)
#
# bitcoinconsensus library #