aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am145
1 files changed, 82 insertions, 63 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index bb627a5448..fa7a78f330 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,15 @@ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS)
AM_CXXFLAGS = $(HARDENED_CXXFLAGS)
AM_CPPFLAGS = $(HARDENED_CPPFLAGS)
+if EMBEDDED_UNIVALUE
+LIBUNIVALUE = univalue/libunivalue.la
+
+$(LIBUNIVALUE): $(wildcard univalue/lib/*) $(wildcard univalue/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
+else
+LIBUNIVALUE = $(UNIVALUE_LIBS)
+endif
+
if EMBEDDED_LEVELDB
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv
@@ -23,23 +32,20 @@ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
-BITCOIN_INCLUDES += -I$(srcdir)/univalue/include
+BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS)
LIBBITCOIN_SERVER=libbitcoin_server.a
LIBBITCOIN_WALLET=libbitcoin_wallet.a
LIBBITCOIN_COMMON=libbitcoin_common.a
+LIBBITCOIN_CONSENSUS=libbitcoin_consensus.a
LIBBITCOIN_CLI=libbitcoin_cli.a
LIBBITCOIN_UTIL=libbitcoin_util.a
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
LIBBITCOINQT=qt/libbitcoinqt.a
LIBSECP256K1=secp256k1/libsecp256k1.la
-LIBUNIVALUE=univalue/libunivalue.la
$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
-$(LIBUNIVALUE): $(wildcard univalue/lib/*) $(wildcard univalue/include/*)
- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
# 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:
@@ -47,6 +53,7 @@ EXTRA_LIBRARIES = \
crypto/libbitcoin_crypto.a \
libbitcoin_util.a \
libbitcoin_common.a \
+ libbitcoin_consensus.a \
libbitcoin_server.a \
libbitcoin_cli.a
if ENABLE_WALLET
@@ -59,9 +66,9 @@ endif
if BUILD_BITCOIN_LIBS
lib_LTLIBRARIES = libbitcoinconsensus.la
-LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la
+LIBBITCOINCONSENSUS=libbitcoinconsensus.la
else
-LIBBITCOIN_CONSENSUS=
+LIBBITCOINCONSENSUS=
endif
bin_PROGRAMS =
@@ -76,13 +83,11 @@ if BUILD_BITCOIN_UTILS
bin_PROGRAMS += bitcoin-cli bitcoin-tx
endif
-.PHONY: FORCE
+.PHONY: FORCE check-symbols check-security
# bitcoin core #
BITCOIN_CORE_H = \
addrman.h \
alert.h \
- amount.h \
- arith_uint256.h \
base58.h \
bloom.h \
chain.h \
@@ -100,12 +105,8 @@ BITCOIN_CORE_H = \
compat/sanity.h \
compressor.h \
consensus/consensus.h \
- consensus/merkle.h \
- consensus/params.h \
- consensus/validation.h \
core_io.h \
core_memusage.h \
- hash.h \
httprpc.h \
httpserver.h \
init.h \
@@ -117,31 +118,23 @@ BITCOIN_CORE_H = \
memusage.h \
merkleblock.h \
miner.h \
- mruset.h \
net.h \
netbase.h \
noui.h \
policy/fees.h \
policy/policy.h \
+ policy/rbf.h \
pow.h \
- prevector.h \
- primitives/block.h \
- primitives/transaction.h \
protocol.h \
- pubkey.h \
random.h \
reverselock.h \
- rpcclient.h \
- rpcprotocol.h \
- rpcserver.h \
+ rpc/client.h \
+ rpc/protocol.h \
+ rpc/server.h \
scheduler.h \
- script/interpreter.h \
- script/script.h \
- script/script_error.h \
script/sigcache.h \
script/sign.h \
script/standard.h \
- serialize.h \
streams.h \
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
@@ -150,21 +143,18 @@ BITCOIN_CORE_H = \
sync.h \
threadsafety.h \
timedata.h \
- tinyformat.h \
torcontrol.h \
txdb.h \
txmempool.h \
ui_interface.h \
- uint256.h \
undo.h \
util.h \
utilmoneystr.h \
- utilstrencodings.h \
utiltime.h \
validationinterface.h \
- version.h \
wallet/crypter.h \
wallet/db.h \
+ wallet/rpcwallet.h \
wallet/wallet.h \
wallet/wallet_ismine.h \
wallet/walletdb.h \
@@ -202,12 +192,12 @@ libbitcoin_server_a_SOURCES = \
policy/policy.cpp \
pow.cpp \
rest.cpp \
- rpcblockchain.cpp \
- rpcmining.cpp \
- rpcmisc.cpp \
- rpcnet.cpp \
- rpcrawtransaction.cpp \
- rpcserver.cpp \
+ rpc/blockchain.cpp \
+ rpc/mining.cpp \
+ rpc/misc.cpp \
+ rpc/net.cpp \
+ rpc/rawtransaction.cpp \
+ rpc/server.cpp \
script/sigcache.cpp \
timedata.cpp \
torcontrol.cpp \
@@ -240,6 +230,7 @@ libbitcoin_wallet_a_SOURCES = \
wallet/wallet.cpp \
wallet/wallet_ismine.cpp \
wallet/walletdb.cpp \
+ policy/rbf.cpp \
$(BITCOIN_CORE_H)
# crypto primitives library
@@ -260,31 +251,57 @@ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha512.cpp \
crypto/sha512.h
+# 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 = \
+ amount.h \
+ arith_uint256.cpp \
+ arith_uint256.h \
+ consensus/merkle.cpp \
+ consensus/merkle.h \
+ consensus/params.h \
+ consensus/validation.h \
+ hash.cpp \
+ hash.h \
+ prevector.h \
+ primitives/block.cpp \
+ primitives/block.h \
+ 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 \
+ tinyformat.h \
+ uint256.cpp \
+ uint256.h \
+ utilstrencodings.cpp \
+ utilstrencodings.h \
+ version.h
+
# common: shared between bitcoind, and bitcoin-qt and non-server tools
libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_common_a_SOURCES = \
amount.cpp \
- arith_uint256.cpp \
base58.cpp \
chainparams.cpp \
coins.cpp \
compressor.cpp \
- consensus/merkle.cpp \
core_read.cpp \
core_write.cpp \
- hash.cpp \
key.cpp \
keystore.cpp \
netbase.cpp \
- primitives/block.cpp \
- primitives/transaction.cpp \
protocol.cpp \
- pubkey.cpp \
scheduler.cpp \
- script/interpreter.cpp \
- script/script.cpp \
- script/script_error.cpp \
script/sign.cpp \
script/standard.cpp \
$(BITCOIN_CORE_H)
@@ -302,10 +319,9 @@ libbitcoin_util_a_SOURCES = \
compat/glibcxx_sanity.cpp \
compat/strnlen.cpp \
random.cpp \
- rpcprotocol.cpp \
+ rpc/protocol.cpp \
support/cleanse.cpp \
sync.cpp \
- uint256.cpp \
util.cpp \
utilmoneystr.cpp \
utilstrencodings.cpp \
@@ -320,7 +336,7 @@ endif
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_cli_a_SOURCES = \
- rpcclient.cpp \
+ rpc/client.cpp \
$(BITCOIN_CORE_H)
nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
@@ -341,6 +357,7 @@ bitcoind_LDADD = \
$(LIBBITCOIN_COMMON) \
$(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL) \
+ $(LIBBITCOIN_CONSENSUS) \
$(LIBBITCOIN_CRYPTO) \
$(LIBLEVELDB) \
$(LIBMEMENV) \
@@ -388,6 +405,7 @@ bitcoin_tx_LDADD = \
$(LIBUNIVALUE) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
+ $(LIBBITCOIN_CONSENSUS) \
$(LIBBITCOIN_CRYPTO) \
$(LIBSECP256K1)
@@ -397,20 +415,7 @@ bitcoin_tx_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
# bitcoinconsensus library #
if BUILD_BITCOIN_LIBS
include_HEADERS = script/bitcoinconsensus.h
-libbitcoinconsensus_la_SOURCES = \
- crypto/hmac_sha512.cpp \
- crypto/ripemd160.cpp \
- crypto/sha1.cpp \
- crypto/sha256.cpp \
- crypto/sha512.cpp \
- hash.cpp \
- primitives/transaction.cpp \
- pubkey.cpp \
- script/bitcoinconsensus.cpp \
- script/interpreter.cpp \
- script/script.cpp \
- uint256.cpp \
- utilstrencodings.cpp
+libbitcoinconsensus_la_SOURCES = $(crypto_libbitcoin_crypto_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
if GLIBC_BACK_COMPAT
libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
@@ -425,6 +430,7 @@ endif
#
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a
+CLEANFILES += $(EXTRA_LIBRARIES)
CLEANFILES += *.gcda *.gcno
CLEANFILES += compat/*.gcda compat/*.gcno
CLEANFILES += consensus/*.gcda consensus/*.gcno
@@ -451,12 +457,25 @@ clean-local:
.rc.o:
@test -f $(WINDRES)
- $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@
+ ## FIXME: How to get the appropriate modulename_CPPFLAGS in here?
+ $(AM_V_GEN) $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -DWINDRES_PREPROC -i $< -o $@
.mm.o:
$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(AM_CXXFLAGS) $(PIE_FLAGS) $(CXXFLAGS) -c -o $@ $<
+check-symbols: $(bin_PROGRAMS)
+if GLIBC_BACK_COMPAT
+ @echo "Checking glibc back compat..."
+ $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py < $(bin_PROGRAMS)
+endif
+
+check-security: $(bin_PROGRAMS)
+if HARDEN
+ @echo "Checking binary security..."
+ $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py < $(bin_PROGRAMS)
+endif
+
%.pb.cc %.pb.h: %.proto
@test -f $(PROTOC)
$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)