aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-11-05 07:58:37 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2014-11-18 18:06:46 +0100
commit07a99017033b23f840f602d768efa87e0e914e90 (patch)
treef207fdc1584b0836247f545ea67ecb0a8e8711fd /src
parent2245a95ce8b35db19526f0ed6cba1e9850108340 (diff)
Always build and link libsecp256k1
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am30
-rw-r--r--src/Makefile.qt.include5
-rw-r--r--src/Makefile.qttest.include5
-rw-r--r--src/Makefile.test.include6
4 files changed, 12 insertions, 34 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3da833d733..517bded369 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,5 @@
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
-if USE_LIBSECP256K1
-secp256k1/libsecp256k1.la: $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
- @$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-endif
if EMBEDDED_LEVELDB
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -23,9 +19,7 @@ endif
BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
-if USE_LIBSECP256K1
BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
-endif
LIBBITCOIN_SERVER=libbitcoin_server.a
LIBBITCOIN_WALLET=libbitcoin_wallet.a
@@ -35,6 +29,10 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
LIBBITCOINQT=qt/libbitcoinqt.a
+LIBSECP256K1=secp256k1/libsecp256k1.la
+
+$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+ @$(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:
@@ -281,11 +279,8 @@ bitcoind_LDADD = \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) \
$(LIBLEVELDB) \
- $(LIBMEMENV)
-
-if USE_LIBSECP256K1
- bitcoind_LDADD += secp256k1/libsecp256k1.la
-endif
+ $(LIBMEMENV) \
+ $(LIBSECP256K1)
if ENABLE_WALLET
bitcoind_LDADD += libbitcoin_wallet.a
@@ -312,9 +307,6 @@ bitcoin_cli_LDADD = \
bitcoin_cli_SOURCES = \
bitcoin-cli.cpp
-if USE_LIBSECP256K1
- bitcoin_cli_LDADD += secp256k1/libsecp256k1.la
-endif
bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
#
@@ -323,13 +315,9 @@ bitcoin_tx_LDADD = \
$(LIBBITCOIN_UNIVALUE) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
- $(LIBBITCOIN_CRYPTO)
-
-if USE_LIBSECP256K1
- bitcoin_tx_LDADD += secp256k1/libsecp256k1.la
-endif
-
- bitcoin_tx_LDADD += $(BOOST_LIBS) \
+ $(LIBBITCOIN_CRYPTO) \
+ $(LIBSECP256K1) \
+ $(BOOST_LIBS) \
$(CRYPTO_LIBS)
bitcoin_tx_SOURCES = bitcoin-tx.cpp
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index ac6d60df03..fac214bdca 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -360,10 +360,7 @@ if ENABLE_WALLET
qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
endif
qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
- $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-if USE_LIBSECP256K1
- qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
-endif
+ $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 064b531b93..622411ca68 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -32,10 +32,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
endif
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
$(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
- $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-if USE_LIBSECP256K1
- qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
-endif
+ $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 6a8d9e58a4..da5c746cc2 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -80,15 +80,11 @@ endif
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
- $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
if ENABLE_WALLET
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
endif
-if USE_LIBSECP256K1
- test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la
-endif
-
test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)