1 ACLOCAL_AMFLAGS = -I build-aux/m4
7 BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT)
8 BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
9 BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
10 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
12 OSX_APP=Bitcoin-Qt.app
13 OSX_DMG=Bitcoin-Qt.dmg
14 OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
15 OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
16 OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
17 OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
18 OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
20 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
22 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
23 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
24 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
25 $(top_srcdir)/doc/README_windows.txt
27 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
28 $(top_srcdir)/contrib/macdeploy/background.png \
29 $(top_srcdir)/contrib/macdeploy/DS_Store
31 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
32 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
33 baseline_filtered.info block_test_filtered.info \
34 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
37 -$(MAKE) -C $(top_distdir)/src/leveldb clean
38 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
39 -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
42 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
43 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
44 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
49 $(BITCOIN_WIN_INSTALLER): all-recursive
50 $(MKDIR_P) $(top_builddir)/release
51 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
52 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
53 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
54 @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
55 echo error: could not build $@
57 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
58 $(MAKE) -C src $(patsubst src/%,%,$@)
60 $(OSX_APP)/Contents/PkgInfo:
64 $(OSX_APP)/Contents/Resources/empty.lproj:
68 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
72 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
76 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
78 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
80 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
81 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
82 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt
85 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
86 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
89 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
90 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -verbose 2
91 $(MKDIR_P) dist/.background
92 $(INSTALL) contrib/macdeploy/background.png dist/.background
93 $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store
94 cd dist; $(LN_S) /Applications Applications
95 $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
99 appbundle: $(OSX_APP_BUILT)
103 deploy: $(BITCOIN_WIN_INSTALLER)
106 $(BITCOIN_QT_BIN): FORCE
107 $(MAKE) -C src qt/$(@F)
109 $(BITCOIND_BIN): FORCE
112 $(BITCOIN_CLI_BIN): FORCE
118 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
120 baseline_filtered.info: baseline.info
121 $(LCOV) -r $< "/usr/include/*" -o $@
123 leveldb_baseline.info: baseline_filtered.info
124 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
126 leveldb_baseline_filtered.info: leveldb_baseline.info
127 $(LCOV) -r $< "/usr/include/*" -o $@
129 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
130 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
132 test_bitcoin.info: baseline_filtered_combined.info
133 $(MAKE) -C src/ check
134 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
135 $(LCOV) -z -d $(abs_builddir)/src
136 $(LCOV) -z -d $(abs_builddir)/src/leveldb
138 test_bitcoin_filtered.info: test_bitcoin.info
139 $(LCOV) -r $< "/usr/include/*" -o $@
141 block_test.info: test_bitcoin_filtered.info
143 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
144 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
145 $(LCOV) -z -d $(abs_builddir)/src
146 $(LCOV) -z -d $(abs_builddir)/src/leveldb
148 block_test_filtered.info: block_test.info
149 $(LCOV) -r $< "/usr/include/*" -o $@
151 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
152 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
154 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
155 $(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
157 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
158 $(GENHTML) -s $< -o $(@D)
161 total.coverage/.dirstamp: total_coverage.info
162 $(GENHTML) -s $< -o $(@D)
165 cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
169 if USE_COMPARISON_TOOL
172 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
175 EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
177 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
179 .INTERMEDIATE: $(COVERAGE_INFO)
182 rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP)