build: quit abusing AM_CPPFLAGS
Now that the build is non-recursive, adding to AM_CPPFLAGS means adding to _all_ cppflags. Logical groups of includes have been added instead, and are used individually by various targets.
This commit is contained in:
parent
56c157d5e0
commit
f4d81129f0
4 changed files with 21 additions and 25 deletions
|
@ -1,11 +1,6 @@
|
|||
AM_CPPFLAGS = $(INCLUDES) \
|
||||
-I$(builddir)/obj \
|
||||
$(BDB_CPPFLAGS) \
|
||||
$(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
|
||||
AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
|
||||
AM_CPPFLAGS = $(INCLUDES)
|
||||
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += -I$(builddir)
|
||||
|
||||
if EMBEDDED_LEVELDB
|
||||
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
|
||||
|
@ -22,11 +17,14 @@ $(LIBLEVELDB) $(LIBMEMENV):
|
|||
OPT="$(CXXFLAGS) $(CPPFLAGS)"
|
||||
endif
|
||||
|
||||
BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
|
||||
|
||||
noinst_LIBRARIES = \
|
||||
libbitcoin_server.a \
|
||||
libbitcoin_common.a \
|
||||
libbitcoin_cli.a
|
||||
if ENABLE_WALLET
|
||||
BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
|
||||
noinst_LIBRARIES += libbitcoin_wallet.a
|
||||
endif
|
||||
|
||||
|
@ -106,6 +104,7 @@ obj/build.h: FORCE
|
|||
$(abs_top_srcdir)
|
||||
version.o: obj/build.h
|
||||
|
||||
libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
libbitcoin_server_a_SOURCES = \
|
||||
addrman.cpp \
|
||||
alert.cpp \
|
||||
|
@ -130,6 +129,7 @@ libbitcoin_server_a_SOURCES = \
|
|||
$(JSON_H) \
|
||||
$(BITCOIN_CORE_H)
|
||||
|
||||
libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
libbitcoin_wallet_a_SOURCES = \
|
||||
db.cpp \
|
||||
crypter.cpp \
|
||||
|
@ -139,6 +139,7 @@ libbitcoin_wallet_a_SOURCES = \
|
|||
walletdb.cpp \
|
||||
$(BITCOIN_CORE_H)
|
||||
|
||||
libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
libbitcoin_common_a_SOURCES = \
|
||||
base58.cpp \
|
||||
allocators.cpp \
|
||||
|
@ -184,8 +185,8 @@ if TARGET_WINDOWS
|
|||
bitcoind_SOURCES += bitcoind-res.rc
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS += $(BDB_CPPFLAGS)
|
||||
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
|
||||
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
|
||||
# bitcoin-cli binary #
|
||||
bitcoin_cli_LDADD = \
|
||||
|
@ -193,6 +194,7 @@ bitcoin_cli_LDADD = \
|
|||
libbitcoin_common.a \
|
||||
$(BOOST_LIBS)
|
||||
bitcoin_cli_SOURCES = bitcoin-cli.cpp
|
||||
bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
|
||||
#
|
||||
|
||||
if TARGET_WINDOWS
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
AM_CPPFLAGS += -I$(srcdir) \
|
||||
-I$(builddir)/qt \
|
||||
-I$(builddir)/qt/forms \
|
||||
$(PROTOBUF_CFLAGS) \
|
||||
$(QR_CFLAGS)
|
||||
bin_PROGRAMS += qt/bitcoin-qt
|
||||
noinst_LIBRARIES += qt/libbitcoinqt.a
|
||||
|
||||
|
@ -319,8 +314,12 @@ RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
|
|||
|
||||
BITCOIN_RC = qt/res/bitcoin-qt-res.rc
|
||||
|
||||
qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
|
||||
-I$(srcdir)/qt/forms $(QT_DBUS_INCLUDES)
|
||||
BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
|
||||
-I$(builddir)/qt/forms
|
||||
|
||||
qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
|
||||
|
||||
qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
|
||||
$(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
|
||||
|
||||
|
@ -341,8 +340,9 @@ $(QT_MOC): $(PROTOBUF_H)
|
|||
$(QT_MOC_CPP): $(PROTOBUF_H)
|
||||
|
||||
# bitcoin-qt binary #
|
||||
qt_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
|
||||
-I$(srcdir)/qt/forms
|
||||
qt_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
|
||||
|
||||
qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
|
||||
if TARGET_DARWIN
|
||||
qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
AM_CPPFLAGS += -I$(srcdir) \
|
||||
-I$(srcdir)/qt \
|
||||
-I$(builddir)/qt \
|
||||
$(PROTOBUF_CFLAGS) \
|
||||
$(QR_CFLAGS)
|
||||
bin_PROGRAMS += qt/test/test_bitcoin-qt
|
||||
TESTS += qt/test/test_bitcoin-qt
|
||||
|
||||
|
@ -17,7 +12,8 @@ TEST_QT_H = \
|
|||
qt/test/paymentrequestdata.h \
|
||||
qt/test/paymentservertests.h
|
||||
|
||||
qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
|
||||
qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
|
||||
$(QT_INCLUDES) $(QT_TEST_INCLUDES)
|
||||
|
||||
qt_test_test_bitcoin_qt_SOURCES = \
|
||||
qt/test/test_main.cpp \
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
AM_CPPFLAGS += -I$(builddir)/test/
|
||||
|
||||
TESTS += test/test_bitcoin
|
||||
bin_PROGRAMS += test/test_bitcoin
|
||||
TEST_SRCDIR = test
|
||||
|
@ -62,7 +60,7 @@ BITCOIN_TESTS += \
|
|||
endif
|
||||
|
||||
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
|
||||
test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
|
||||
test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
|
||||
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
|
||||
$(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
if ENABLE_WALLET
|
||||
|
|
Loading…
Reference in a new issue