1 ACLOCAL_AMFLAGS = -I build-aux/m4
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = libbitcoinconsensus.pc
12 BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT)
13 BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
14 BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
15 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
17 OSX_APP=Bitcoin-Qt.app
18 OSX_DMG=Bitcoin-Qt.dmg
19 OSX_BACKGROUND_IMAGE=background.tiff
20 OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
21 OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
22 OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
23 OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
24 OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
26 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
28 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
29 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
30 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
31 $(top_srcdir)/doc/README_windows.txt
33 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
34 $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
35 $(top_srcdir)/contrib/macdeploy/DS_Store \
36 $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
37 $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
39 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
40 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
41 baseline_filtered.info block_test_filtered.info \
42 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
45 -$(MAKE) -C $(top_distdir)/src/leveldb clean
46 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
47 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
50 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
51 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
52 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
57 $(BITCOIN_WIN_INSTALLER): all-recursive
58 $(MKDIR_P) $(top_builddir)/release
59 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
60 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
61 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
62 @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
63 echo error: could not build $@
65 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
66 $(MAKE) -C src $(patsubst src/%,%,$@)
68 $(OSX_APP)/Contents/PkgInfo:
72 $(OSX_APP)/Contents/Resources/empty.lproj:
76 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
80 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
84 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
86 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
88 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
89 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
90 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt
93 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
94 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
98 APP_DIST_DIR=$(top_builddir)/dist
99 APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
101 $(APP_DIST_DIR)/Applications:
103 @cd $(@D); $(LN_S) /Applications $(@F)
105 $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
107 $(OSX_DMG): $(APP_DIST_EXTRAS)
108 $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
110 $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
113 $(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
116 $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
117 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
119 deploydir: $(APP_DIST_EXTRAS)
123 appbundle: $(OSX_APP_BUILT)
127 deploy: $(BITCOIN_WIN_INSTALLER)
130 $(BITCOIN_QT_BIN): FORCE
131 $(MAKE) -C src qt/$(@F)
133 $(BITCOIND_BIN): FORCE
136 $(BITCOIN_CLI_BIN): FORCE
142 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
144 baseline_filtered.info: baseline.info
145 $(LCOV) -r $< "/usr/include/*" -o $@
147 leveldb_baseline.info: baseline_filtered.info
148 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
150 leveldb_baseline_filtered.info: leveldb_baseline.info
151 $(LCOV) -r $< "/usr/include/*" -o $@
153 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
154 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
156 test_bitcoin.info: baseline_filtered_combined.info
157 $(MAKE) -C src/ check
158 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
159 $(LCOV) -z -d $(abs_builddir)/src
160 $(LCOV) -z -d $(abs_builddir)/src/leveldb
162 test_bitcoin_filtered.info: test_bitcoin.info
163 $(LCOV) -r $< "/usr/include/*" -o $@
165 block_test.info: test_bitcoin_filtered.info
167 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
168 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
169 $(LCOV) -z -d $(abs_builddir)/src
170 $(LCOV) -z -d $(abs_builddir)/src/leveldb
172 block_test_filtered.info: block_test.info
173 $(LCOV) -r $< "/usr/include/*" -o $@
175 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
176 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
178 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
179 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
181 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
182 $(GENHTML) -s $< -o $(@D)
185 total.coverage/.dirstamp: total_coverage.info
186 $(GENHTML) -s $< -o $(@D)
189 cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
193 if USE_COMPARISON_TOOL
196 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
199 EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
201 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
203 .INTERMEDIATE: $(COVERAGE_INFO)
206 rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP)