1 ACLOCAL_AMFLAGS = -I src/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 -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
41 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
42 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
43 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
48 $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
49 $(MKDIR_P) $(top_builddir)/release
50 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
51 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
52 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
53 @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
54 echo error: could not build $@
56 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
57 $(MAKE) -C src $(patsubst src/%,%,$@)
59 $(OSX_APP)/Contents/PkgInfo:
63 $(OSX_APP)/Contents/Resources/empty.lproj:
67 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
71 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
75 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
77 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
79 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
80 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
81 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt
84 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
85 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
88 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
89 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
90 $(MKDIR_P) dist/.background
91 $(INSTALL) contrib/macdeploy/background.png dist/.background
92 $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store
93 cd dist; $(LN_S) /Applications Applications
94 $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
98 appbundle: $(OSX_APP_BUILT)
102 deploy: $(BITCOIN_WIN_INSTALLER)
108 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
110 baseline_filtered.info: baseline.info
111 $(LCOV) -r $< "/usr/include/*" -o $@
113 leveldb_baseline.info: baseline_filtered.info
114 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
116 leveldb_baseline_filtered.info: leveldb_baseline.info
117 $(LCOV) -r $< "/usr/include/*" -o $@
119 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
120 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
122 test_bitcoin.info: baseline_filtered_combined.info
123 $(MAKE) -C src/ check
124 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
125 $(LCOV) -z -d $(abs_builddir)/src
126 $(LCOV) -z -d $(abs_builddir)/src/leveldb
128 test_bitcoin_filtered.info: test_bitcoin.info
129 $(LCOV) -r $< "/usr/include/*" -o $@
131 block_test.info: test_bitcoin_filtered.info
133 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
134 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
135 $(LCOV) -z -d $(abs_builddir)/src
136 $(LCOV) -z -d $(abs_builddir)/src/leveldb
138 block_test_filtered.info: block_test.info
139 $(LCOV) -r $< "/usr/include/*" -o $@
141 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
142 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
144 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
145 $(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
147 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
148 $(GENHTML) -s $< -o $(@D)
151 total.coverage/.dirstamp: total_coverage.info
152 $(GENHTML) -s $< -o $(@D)
155 cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
159 if USE_COMPARISON_TOOL
162 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)
165 EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
167 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
169 .INTERMEDIATE: $(COVERAGE_INFO)
172 rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP)