autotools: fix the Makefile.include to be safely included anywhere.
This way we can reuse rules rather than duplicating them.
This commit is contained in:
parent
c546dc05bb
commit
7a3df1cd94
5 changed files with 9 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
||||||
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src/leveldb/helpers \
|
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src/leveldb/helpers \
|
||||||
-I$(builddir) $(BOOST_INCLUDES)
|
-I$(builddir) $(BOOST_INCLUDES) $(BDB_CPPFLAGS)
|
||||||
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
noinst_LIBRARIES = libbitcoin.a
|
noinst_LIBRARIES = libbitcoin.a
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
.PHONY: FORCE
|
# Helper for rules and subdir Makefiles to find parent targets.
|
||||||
|
# Flags and other non-target variables should not be set here.
|
||||||
|
|
||||||
LIBBITCOIN=$(top_builddir)/src/libbitcoin.a
|
LIBBITCOIN=$(top_builddir)/src/libbitcoin.a
|
||||||
LIBLEVELDB=$(top_builddir)/src/leveldb/libleveldb.a
|
LIBLEVELDB=$(top_builddir)/src/leveldb/libleveldb.a
|
||||||
LIBMEMENV=$(top_builddir)/src/leveldb/libmemenv.a
|
LIBMEMENV=$(top_builddir)/src/leveldb/libmemenv.a
|
||||||
LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
|
LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
|
||||||
|
|
||||||
INCLUDES += $(BDB_CPPFLAGS)
|
|
||||||
LIBBITCOIN += $(BDB_LIBS)
|
|
||||||
|
|
||||||
$(LIBBITCOIN):
|
$(LIBBITCOIN):
|
||||||
$(MAKE) -C $(top_builddir)/src $(@F)
|
$(MAKE) -C $(top_builddir)/src $(@F)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
||||||
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \
|
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/leveldb/helpers -I$(top_builddir)/src/qt \
|
-I$(top_srcdir)/src/leveldb/helpers -I$(top_builddir)/src/qt \
|
||||||
-I$(top_builddir)/src/qt/forms $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \
|
-I$(top_builddir)/src/qt/forms $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \
|
||||||
$(QR_CFLAGS)
|
$(QR_CFLAGS) $(BDB_CPPFLAGS)
|
||||||
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||||
bin_PROGRAMS = bitcoin-qt
|
bin_PROGRAMS = bitcoin-qt
|
||||||
noinst_LIBRARIES = libbitcoinqt.a
|
noinst_LIBRARIES = libbitcoinqt.a
|
||||||
|
@ -145,7 +145,7 @@ bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
|
||||||
-I$(top_srcdir)/src/qt/forms
|
-I$(top_srcdir)/src/qt/forms
|
||||||
bitcoin_qt_SOURCES = bitcoin.cpp
|
bitcoin_qt_SOURCES = bitcoin.cpp
|
||||||
bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN) $(LIBLEVELDB) $(LIBMEMENV) \
|
bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||||
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS)
|
$(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
|
||||||
|
|
||||||
# forms/foo.h -> forms/ui_foo.h
|
# forms/foo.h -> forms/ui_foo.h
|
||||||
QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
|
QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
|
||||||
|
|
|
@ -4,7 +4,7 @@ AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
||||||
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \
|
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/leveldb/helpers -I$(top_srcdir)/src/qt \
|
-I$(top_srcdir)/src/leveldb/helpers -I$(top_srcdir)/src/qt \
|
||||||
-I$(top_builddir)/src/qt $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \
|
-I$(top_builddir)/src/qt $(BOOST_INCLUDES) $(PROTOBUF_CFLAGS) \
|
||||||
$(QR_CFLAGS)
|
$(QR_CFLAGS) $(BDB_CPPFLAGS)
|
||||||
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||||
bin_PROGRAMS = test_bitcoin-qt
|
bin_PROGRAMS = test_bitcoin-qt
|
||||||
TESTS = test_bitcoin-qt
|
TESTS = test_bitcoin-qt
|
||||||
|
@ -20,7 +20,7 @@ test_bitcoin_qt_SOURCES = test_main.cpp uritests.cpp paymentservertests.cpp $(TE
|
||||||
nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
|
||||||
test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN) $(LIBLEVELDB) \
|
test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN) $(LIBLEVELDB) \
|
||||||
$(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \
|
$(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \
|
||||||
$(QR_LIBS) $(PROTOBUF_LIBS)
|
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno
|
CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ include $(top_srcdir)/src/Makefile.include
|
||||||
|
|
||||||
AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
AM_CPPFLAGS = $(INCLUDES) -I$(top_builddir)/src/obj \
|
||||||
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src/leveldb/helpers \
|
-I$(top_srcdir)/src/leveldb/include -I$(top_srcdir)/src/leveldb/helpers \
|
||||||
-I$(top_srcdir)/src $(BOOST_INCLUDES)
|
-I$(top_srcdir)/src $(BOOST_INCLUDES) $(BDB_CPPFLAGS)
|
||||||
|
|
||||||
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ BUILT_SOURCES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
|
||||||
# test_bitcoin binary #
|
# test_bitcoin binary #
|
||||||
test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
|
test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
|
||||||
test_bitcoin_LDADD = $(LIBBITCOIN) $(LIBLEVELDB) $(LIBMEMENV) \
|
test_bitcoin_LDADD = $(LIBBITCOIN) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||||
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(BDB_LIBS)
|
||||||
test_bitcoin_SOURCES = accounting_tests.cpp alert_tests.cpp \
|
test_bitcoin_SOURCES = accounting_tests.cpp alert_tests.cpp \
|
||||||
allocator_tests.cpp base32_tests.cpp base58_tests.cpp base64_tests.cpp \
|
allocator_tests.cpp base32_tests.cpp base58_tests.cpp base64_tests.cpp \
|
||||||
bignum_tests.cpp bloom_tests.cpp canonical_tests.cpp checkblock_tests.cpp \
|
bignum_tests.cpp bloom_tests.cpp canonical_tests.cpp checkblock_tests.cpp \
|
||||||
|
|
Loading…
Reference in a new issue