diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-06-05 15:24:48 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2014-06-05 16:05:57 -0400 |
commit | f4d81129f0858685c33e79f74084f2931b8c21b4 (patch) | |
tree | 80beab8a412b27756c5058af238593e25b645997 | |
parent | 56c157d5e087e3976ae05cad2dc08a1fcd9a2400 (diff) |
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.
-rw-r--r-- | src/Makefile.am | 16 | ||||
-rw-r--r-- | src/Makefile.qt.include | 18 | ||||
-rw-r--r-- | src/Makefile.qttest.include | 8 | ||||
-rw-r--r-- | src/Makefile.test.include | 4 |
4 files changed, 21 insertions, 25 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index cb1c88883b..58a50adec6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index f434118abb..749b976c44 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -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) diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 09e61cf57c..e0b49d0240 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -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 \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 1e4bd4ca8c..988830260c 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -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 |