1 ACLOCAL_AMFLAGS = -I build-aux/m4
8 pkgconfigdir = $(libdir)/pkgconfig
9 pkgconfig_DATA = libzcashconsensus.pc
12 BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
13 BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
14 BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
15 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
17 OSX_APP=Bitcoin-Qt.app
18 OSX_DMG=Bitcoin-Core.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_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
23 OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
24 OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
25 OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
27 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
29 BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
30 $(top_srcdir)/contrib/devtools/security-check.py
32 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
33 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
34 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
36 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
37 $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
38 $(top_srcdir)/contrib/macdeploy/DS_Store \
39 $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
40 $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
44 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
45 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
46 baseline_filtered.info block_test_filtered.info \
47 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
48 # zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
50 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
51 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
52 baseline_filtered.info block_test_filtered.info \
53 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
54 zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
58 -$(MAKE) -C $(top_distdir)/src/leveldb clean
59 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
60 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
63 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
64 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
65 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
70 $(BITCOIN_WIN_INSTALLER): all-recursive
71 $(MKDIR_P) $(top_builddir)/release
72 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
73 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
74 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
75 @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
76 echo error: could not build $@
79 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
80 $(MAKE) -C src $(patsubst src/%,%,$@)
82 $(OSX_APP)/Contents/PkgInfo:
86 $(OSX_APP)/Contents/Resources/empty.lproj:
90 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
94 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
98 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
100 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
102 $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
104 $(INSTALL_DATA) $< $@
106 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
107 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
108 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
111 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
112 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
114 deploydir: $(OSX_DMG)
116 APP_DIST_DIR=$(top_builddir)/dist
117 APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
119 $(APP_DIST_DIR)/Applications:
121 @cd $(@D); $(LN_S) /Applications $(@F)
123 $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
125 $(OSX_DMG): $(APP_DIST_EXTRAS)
126 $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
128 $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
131 $(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
134 $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
135 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
137 deploydir: $(APP_DIST_EXTRAS)
141 appbundle: $(OSX_APP_BUILT)
145 deploy: $(BITCOIN_WIN_INSTALLER)
148 $(BITCOIN_QT_BIN): FORCE
149 $(MAKE) -C src qt/$(@F)
151 $(BITCOIND_BIN): FORCE
154 $(BITCOIN_CLI_BIN): FORCE
160 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
163 baseline_filtered.info: baseline.info
164 $(LCOV) -r $< "/usr/include/*" \
165 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
166 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
167 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
168 "$(abs_builddir)/src/test/*" \
171 baseline_filtered.info: baseline.info
172 $(LCOV) -r $< "/usr/include/*" \
173 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
174 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
175 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
176 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
177 "$(abs_builddir)/src/gtest/*" \
178 "$(abs_builddir)/src/test/*" \
182 leveldb_baseline.info: baseline_filtered.info
183 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
186 leveldb_baseline_filtered.info: leveldb_baseline.info
187 $(LCOV) -r $< "/usr/include/*" \
188 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
189 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
190 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
191 "$(abs_builddir)/src/test/*" \
194 leveldb_baseline_filtered.info: leveldb_baseline.info
195 $(LCOV) -r $< "/usr/include/*" \
196 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
197 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
198 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
199 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
200 "$(abs_builddir)/src/gtest/*" \
201 "$(abs_builddir)/src/test/*" \
205 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
206 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
208 test_bitcoin.info: baseline_filtered_combined.info
209 $(MAKE) -C src/ bitcoin_test_check
210 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
211 $(LCOV) -z -d $(abs_builddir)/src
212 $(LCOV) -z -d $(abs_builddir)/src/leveldb
215 test_bitcoin_filtered.info: test_bitcoin.info
216 $(LCOV) -r $< "/usr/include/*" \
217 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
218 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
219 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
220 "$(abs_builddir)/src/test/*" \
223 test_bitcoin_filtered.info: test_bitcoin.info
224 $(LCOV) -r $< "/usr/include/*" \
225 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
226 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
227 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
228 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
229 "$(abs_builddir)/src/gtest/*" \
230 "$(abs_builddir)/src/test/*" \
234 block_test.info: test_bitcoin_filtered.info
236 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
237 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
238 $(LCOV) -z -d $(abs_builddir)/src
239 $(LCOV) -z -d $(abs_builddir)/src/leveldb
242 block_test_filtered.info: block_test.info
243 $(LCOV) -r $< "/usr/include/*" \
244 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
245 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
246 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
247 "$(abs_builddir)/src/test/*" \
250 block_test_filtered.info: block_test.info
251 $(LCOV) -r $< "/usr/include/*" \
252 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
253 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
254 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
255 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
256 "$(abs_builddir)/src/gtest/*" \
257 "$(abs_builddir)/src/test/*" \
261 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
262 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
265 zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
266 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
270 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
271 $(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
273 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
274 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
278 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
279 $(GENHTML) -s $< -o $(@D)
282 total.coverage/.dirstamp: total_coverage.info
283 $(GENHTML) -s $< -o $(@D)
287 cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
289 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
294 if USE_COMPARISON_TOOL
297 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
300 dist_bin_SCRIPTS = zcutil/fetch-params.sh
301 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
303 EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/zcash $(DIST_DOCS) $(BIN_CHECKS)
306 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
308 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
310 .INTERMEDIATE: $(COVERAGE_INFO)
313 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ $(OSX_APP)