diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 48 | ||||
-rw-r--r-- | src/Makefile.include | 74 | ||||
-rw-r--r-- | src/Makefile.qt.include | 21 | ||||
-rw-r--r-- | src/Makefile.test.include | 16 |
4 files changed, 76 insertions, 83 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e7d121b4d6..b3e713b9ad 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,27 @@ -include Makefile.include +AM_CPPFLAGS = $(INCLUDES) \ + -I$(top_builddir)/src/obj \ + $(BDB_CPPFLAGS) \ + $(BOOST_CPPFLAGS) $(BOOST_INCLUDES) +AM_CPPFLAGS += $(LEVELDB_CPPFLAGS) +AM_LDFLAGS = $(PTHREAD_CFLAGS) AM_CPPFLAGS += -I$(builddir) +if EMBEDDED_LEVELDB +LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include +LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv +LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a +LIBMEMENV += $(top_builddir)/src/leveldb/libmemenv.a + +# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race +$(LIBLEVELDB): $(LIBMEMENV) + +$(LIBLEVELDB) $(LIBMEMENV): + @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \ + CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \ + OPT="$(CXXFLAGS) $(CPPFLAGS)" +endif + noinst_LIBRARIES = \ libbitcoin_server.a \ libbitcoin_common.a \ @@ -179,14 +199,6 @@ if TARGET_WINDOWS bitcoin_cli_SOURCES += bitcoin-cli-res.rc endif -# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race -leveldb/libleveldb.a: leveldb/libmemenv.a - -leveldb/%.a: - @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \ - CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \ - OPT="$(CXXFLAGS) $(CPPFLAGS)" - CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno DISTCLEANFILES = obj/build.h @@ -197,6 +209,24 @@ clean-local: -$(MAKE) -C leveldb clean rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno +.rc.o: + @test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \ + echo error: could not build $@ + +.mm.o: + $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $< + +%.pb.cc %.pb.h: %.proto + test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) || \ + echo error: could not build $@ + +LIBBITCOIN_SERVER=libbitcoin_server.a +LIBBITCOIN_WALLET=libbitcoin_wallet.a +LIBBITCOIN_COMMON=libbitcoin_common.a +LIBBITCOIN_CLI=libbitcoin_cli.a +LIBBITCOINQT=qt/libbitcoinqt.a + if ENABLE_TESTS include Makefile.test.include endif diff --git a/src/Makefile.include b/src/Makefile.include deleted file mode 100644 index d3d3d6385a..0000000000 --- a/src/Makefile.include +++ /dev/null @@ -1,74 +0,0 @@ -if EMBEDDED_LEVELDB -LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include -LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv -LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a -LIBMEMENV += $(top_builddir)/src/leveldb/libmemenv.a -endif - -AM_CPPFLAGS = $(INCLUDES) \ - -I$(top_builddir)/src/obj \ - $(BDB_CPPFLAGS) \ - $(BOOST_CPPFLAGS) $(BOOST_INCLUDES) -AM_CPPFLAGS += $(LEVELDB_CPPFLAGS) -AM_LDFLAGS = $(PTHREAD_CFLAGS) - -LIBBITCOIN_SERVER=libbitcoin_server.a -LIBBITCOIN_WALLET=libbitcoin_wallet.a -LIBBITCOIN_COMMON=libbitcoin_common.a -LIBBITCOIN_CLI=libbitcoin_cli.a -LIBBITCOINQT=qt/libbitcoinqt.a - -if EMBEDDED_LEVELDB -$(LIBLEVELDB) $(LIBMEMENV): - $(MAKE) -C $(top_builddir)/src leveldb/$(@F) -$(LIBLEVELDB): $(LIBMEMENV) -endif - -.mm.o: - $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $< - -.rc.o: - @test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \ - echo error: could not build $@ - -ui_%.h: %.ui - @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D) - @test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@ - $(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,} - $(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,} - -%.moc: %.cpp - QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $< - $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,} - $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,} - -moc_%.cpp: %.h - QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $< - $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,} - $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,} - -%.qm: %.ts - @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D) - @test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \ - echo error: could not build $(abs_builddir)/$@ - -%.pb.cc %.pb.h: %.proto - test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) || \ - echo error: could not build $@ - -%.json.h: %.json - @$(MKDIR_P) $(@D) - @echo "namespace json_tests{" > $@ - @echo "static unsigned const char $(*F)[] = {" >> $@ - @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ - @echo "};};" >> $@ - @echo "Generated $@" - -%.raw.h: %.raw - @$(MKDIR_P) $(@D) - @echo "namespace alert_tests{" > $@ - @echo "static unsigned const char $(*F)[] = {" >> $@ - @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ - @echo "};};" >> $@ - @echo "Generated $@" diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index dcb3f37f50..0cef2d2e6f 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -385,3 +385,24 @@ bitcoin_qt_clean: FORCE rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT) bitcoin_qt : qt/bitcoin-qt$(EXEEXT) + +ui_%.h: %.ui + @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D) + @test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@ + $(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,} + $(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,} + +%.moc: %.cpp + QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $< + $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,} + $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,} + +moc_%.cpp: %.h + QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $< + $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,} + $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,} + +%.qm: %.ts + @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D) + @test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \ + echo error: could not build $(abs_builddir)/$@ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 4a70b0f9e9..14288ee218 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -85,3 +85,19 @@ bitcoin_test_check: $(TEST_BINARY) FORCE bitcoin_test_clean : FORCE rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY) + +%.json.h: %.json + @$(MKDIR_P) $(@D) + @echo "namespace json_tests{" > $@ + @echo "static unsigned const char $(*F)[] = {" >> $@ + @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ + @echo "};};" >> $@ + @echo "Generated $@" + +%.raw.h: %.raw + @$(MKDIR_P) $(@D) + @echo "namespace alert_tests{" > $@ + @echo "static unsigned const char $(*F)[] = {" >> $@ + @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ + @echo "};};" >> $@ + @echo "Generated $@" |