aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 556fd49c0b..0d45203c90 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,6 +49,13 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
noinst_LIBRARIES += libbitcoin_wallet.a
endif
+if BUILD_BITCOIN_LIBS
+lib_LTLIBRARIES = libbitcoinconsensus.la
+LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la
+else
+LIBBITCOIN_CONSENSUS=
+endif
+
bin_PROGRAMS =
TESTS =
@@ -295,7 +302,7 @@ endif
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
-bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
# bitcoin-cli binary #
bitcoin_cli_LDADD = \
@@ -324,12 +331,42 @@ bitcoin_tx_LDADD = \
bitcoin_tx_SOURCES = bitcoin-tx.cpp
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
#
-bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
endif
-bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+
+if BUILD_BITCOIN_LIBS
+include_HEADERS = script/bitcoinconsensus.h
+libbitcoinconsensus_la_SOURCES = \
+ core/transaction.cpp \
+ crypto/sha1.cpp \
+ crypto/sha2.cpp \
+ crypto/ripemd160.cpp \
+ eccryptoverify.cpp \
+ ecwrapper.cpp \
+ hash.cpp \
+ pubkey.cpp \
+ script/script.cpp \
+ script/interpreter.cpp \
+ script/bitcoinconsensus.cpp \
+ uint256.cpp \
+ utilstrencodings.cpp
+
+if GLIBC_BACK_COMPAT
+ libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
+ libbitcoinconsensus_la_SOURCES += compat/glibcxx_compat.cpp
+endif
+
+libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
+libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
+libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
+if USE_LIBSECP256K1
+libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la
+endif
+endif
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno