1 ACLOCAL_AMFLAGS = -I build-aux/m4
11 pkgconfigdir = $(libdir)/pkgconfig
12 pkgconfig_DATA = libzcashconsensus.pc
16 BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
17 BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
18 #WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT)
19 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
22 OSX_APP=Bitcoin-Qt.app
23 OSX_DMG=Bitcoin-Core.dmg
24 OSX_BACKGROUND_IMAGE=background.tiff
25 OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
26 OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
27 OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
28 OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
29 OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
30 OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
33 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
35 BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
36 $(top_srcdir)/contrib/devtools/security-check.py
39 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
40 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
41 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
44 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
45 $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
46 $(top_srcdir)/contrib/macdeploy/DS_Store \
47 $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
48 $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
52 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
53 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
54 baseline_filtered.info block_test_filtered.info \
55 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
56 # zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
58 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
59 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
60 baseline_filtered.info \
61 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
62 #zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
66 -$(MAKE) -C $(top_distdir)/src/leveldb clean
67 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
68 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
71 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
72 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
73 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
78 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
79 $(MAKE) -C src $(patsubst src/%,%,$@)
83 $(OSX_APP)/Contents/PkgInfo:
87 $(OSX_APP)/Contents/Resources/empty.lproj:
91 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
95 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
99 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
101 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
103 $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
105 $(INSTALL_DATA) $< $@
107 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
108 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
109 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
114 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
115 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
116 deploydir: $(OSX_DMG)
118 APP_DIST_DIR=$(top_builddir)/dist
119 APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
123 $(APP_DIST_DIR)/Applications:
125 @cd $(@D); $(LN_S) /Applications $(@F)
127 $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
129 $(OSX_DMG): $(APP_DIST_EXTRAS)
130 $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
132 $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
135 $(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
138 $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
139 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
141 deploydir: $(APP_DIST_EXTRAS)
145 appbundle: $(OSX_APP_BUILT)
150 deploy: $(BITCOIN_WIN_INSTALLER)
153 $(BITCOIND_BIN): FORCE
156 $(BITCOIN_CLI_BIN): FORCE
159 #$(WALLET_UTILITY_BIN): FORCE
160 # $(MAKE) -C src $(@F)
165 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
168 baseline_filtered.info: baseline.info
169 $(LCOV) -r $< "/usr/include/*" \
170 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
171 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
172 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
173 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
174 "$(abs_builddir)/src/gtest/*" \
175 "$(abs_builddir)/src/test/*" \
176 "$(abs_builddir)/src/wallet/gtest/*" \
177 "$(abs_builddir)/src/wallet/test/*" \
180 baseline_filtered.info: baseline.info
181 $(LCOV) -r $< "/usr/include/*" \
182 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
183 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
184 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
185 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
186 "$(abs_builddir)/src/gtest/*" \
187 "$(abs_builddir)/src/test/*" \
188 "$(abs_builddir)/src/wallet/gtest/*" \
189 "$(abs_builddir)/src/wallet/test/*" \
193 leveldb_baseline.info: baseline_filtered.info
194 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
197 leveldb_baseline_filtered.info: leveldb_baseline.info
198 $(LCOV) -r $< "/usr/include/*" \
199 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
200 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
201 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
202 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
203 "$(abs_builddir)/src/gtest/*" \
204 "$(abs_builddir)/src/test/*" \
205 "$(abs_builddir)/src/wallet/gtest/*" \
206 "$(abs_builddir)/src/wallet/test/*" \
209 leveldb_baseline_filtered.info: leveldb_baseline.info
210 $(LCOV) -r $< "/usr/include/*" \
211 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
212 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
213 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
214 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
215 "$(abs_builddir)/src/gtest/*" \
216 "$(abs_builddir)/src/test/*" \
217 "$(abs_builddir)/src/wallet/gtest/*" \
218 "$(abs_builddir)/src/wallet/test/*" \
222 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
223 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
225 test_bitcoin.info: baseline_filtered_combined.info
226 $(MAKE) -C src/ bitcoin_test_check
227 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
228 $(LCOV) -z -d $(abs_builddir)/src
229 $(LCOV) -z -d $(abs_builddir)/src/leveldb
232 test_bitcoin_filtered.info: test_bitcoin.info
233 $(LCOV) -r $< "/usr/include/*" \
234 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
235 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
236 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
237 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
238 "$(abs_builddir)/src/gtest/*" \
239 "$(abs_builddir)/src/test/*" \
240 "$(abs_builddir)/src/wallet/gtest/*" \
241 "$(abs_builddir)/src/wallet/test/*" \
244 test_bitcoin_filtered.info: test_bitcoin.info
245 $(LCOV) -r $< "/usr/include/*" \
246 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
247 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
248 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
249 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
250 "$(abs_builddir)/src/gtest/*" \
251 "$(abs_builddir)/src/test/*" \
252 "$(abs_builddir)/src/wallet/gtest/*" \
253 "$(abs_builddir)/src/wallet/test/*" \
258 block_test.info: test_bitcoin_filtered.info
260 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
261 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
262 $(LCOV) -z -d $(abs_builddir)/src
263 $(LCOV) -z -d $(abs_builddir)/src/leveldb
266 block_test_filtered.info: block_test.info
267 $(LCOV) -r $< "/usr/include/*" \
268 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
269 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
270 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
271 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
272 "$(abs_builddir)/src/gtest/*" \
273 "$(abs_builddir)/src/test/*" \
274 "$(abs_builddir)/src/wallet/gtest/*" \
275 "$(abs_builddir)/src/wallet/test/*" \
278 block_test_filtered.info: block_test.info
279 $(LCOV) -r $< "/usr/include/*" \
280 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
281 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
282 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
283 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
284 "$(abs_builddir)/src/gtest/*" \
285 "$(abs_builddir)/src/test/*" \
286 "$(abs_builddir)/src/wallet/gtest/*" \
287 "$(abs_builddir)/src/wallet/test/*" \
292 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
293 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
296 zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
297 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
301 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
302 $(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
304 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
305 $(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
309 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
310 $(GENHTML) -s $< -o $(@D)
314 zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
315 $(GENHTML) -s $< -o $(@D)
317 cov-zcash: zcash-gtest.coverage/.dirstamp
320 total.coverage/.dirstamp: total_coverage.info
321 $(GENHTML) -s $< -o $(@D)
325 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
327 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
332 dist_bin_SCRIPTS = zcutil/fetch-params.sh
333 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
335 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)
338 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
340 .INTERMEDIATE: $(COVERAGE_INFO)
342 DISTCHECK_CONFIGURE_FLAGS = --enable-man
345 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/