1 ACLOCAL_AMFLAGS = -I build-aux/m4
11 pkgconfigdir = $(libdir)/pkgconfig
12 pkgconfig_DATA = libzcashconsensus.pc
16 BITCOIND_BIN=$(top_builddir)/src/verusd$(EXEEXT)
17 BITCOIN_CLI_BIN=$(top_builddir)/src/verus$(EXEEXT)
18 #WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT)
19 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
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
40 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
41 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
42 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
45 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
46 $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
47 $(top_srcdir)/contrib/macdeploy/DS_Store \
48 $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
49 $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
53 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
54 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
55 baseline_filtered.info block_test_filtered.info \
56 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
57 # zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
59 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
60 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
61 baseline_filtered.info \
62 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
63 #zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
67 -$(MAKE) -C $(top_distdir)/src/leveldb clean
68 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
69 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
72 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
73 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
74 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
79 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
80 $(MAKE) -C src $(patsubst src/%,%,$@)
84 $(OSX_APP)/Contents/PkgInfo:
88 $(OSX_APP)/Contents/Resources/empty.lproj:
92 $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
96 $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
100 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
102 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
104 $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
106 $(INSTALL_DATA) $< $@
108 OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
109 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
110 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
115 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
116 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
117 deploydir: $(OSX_DMG)
119 APP_DIST_DIR=$(top_builddir)/dist
120 APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
124 $(APP_DIST_DIR)/Applications:
126 @cd $(@D); $(LN_S) /Applications $(@F)
128 $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
130 $(OSX_DMG): $(APP_DIST_EXTRAS)
131 $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
133 $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
136 $(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
139 $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
140 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
142 deploydir: $(APP_DIST_EXTRAS)
146 appbundle: $(OSX_APP_BUILT)
151 deploy: $(BITCOIN_WIN_INSTALLER)
154 $(BITCOIND_BIN): FORCE
157 $(BITCOIN_CLI_BIN): FORCE
160 #$(WALLET_UTILITY_BIN): FORCE
161 # $(MAKE) -C src $(@F)
166 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
169 baseline_filtered.info: baseline.info
170 $(LCOV) -r $< "/usr/include/*" \
171 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
172 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
173 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
174 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
175 "$(abs_builddir)/src/gtest/*" \
176 "$(abs_builddir)/src/test/*" \
177 "$(abs_builddir)/src/wallet/gtest/*" \
178 "$(abs_builddir)/src/wallet/test/*" \
181 baseline_filtered.info: baseline.info
182 $(LCOV) -r $< "/usr/include/*" \
183 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
184 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
185 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
186 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
187 "$(abs_builddir)/src/gtest/*" \
188 "$(abs_builddir)/src/test/*" \
189 "$(abs_builddir)/src/wallet/gtest/*" \
190 "$(abs_builddir)/src/wallet/test/*" \
194 leveldb_baseline.info: baseline_filtered.info
195 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
198 leveldb_baseline_filtered.info: leveldb_baseline.info
199 $(LCOV) -r $< "/usr/include/*" \
200 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
201 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
202 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
203 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
204 "$(abs_builddir)/src/gtest/*" \
205 "$(abs_builddir)/src/test/*" \
206 "$(abs_builddir)/src/wallet/gtest/*" \
207 "$(abs_builddir)/src/wallet/test/*" \
210 leveldb_baseline_filtered.info: leveldb_baseline.info
211 $(LCOV) -r $< "/usr/include/*" \
212 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
213 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
214 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
215 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
216 "$(abs_builddir)/src/gtest/*" \
217 "$(abs_builddir)/src/test/*" \
218 "$(abs_builddir)/src/wallet/gtest/*" \
219 "$(abs_builddir)/src/wallet/test/*" \
223 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
224 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
226 test_bitcoin.info: baseline_filtered_combined.info
227 $(MAKE) -C src/ bitcoin_test_check
228 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
229 $(LCOV) -z -d $(abs_builddir)/src
230 $(LCOV) -z -d $(abs_builddir)/src/leveldb
233 test_bitcoin_filtered.info: test_bitcoin.info
234 $(LCOV) -r $< "/usr/include/*" \
235 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
236 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
237 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
238 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
239 "$(abs_builddir)/src/gtest/*" \
240 "$(abs_builddir)/src/test/*" \
241 "$(abs_builddir)/src/wallet/gtest/*" \
242 "$(abs_builddir)/src/wallet/test/*" \
245 test_bitcoin_filtered.info: test_bitcoin.info
246 $(LCOV) -r $< "/usr/include/*" \
247 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
248 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
249 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
250 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
251 "$(abs_builddir)/src/gtest/*" \
252 "$(abs_builddir)/src/test/*" \
253 "$(abs_builddir)/src/wallet/gtest/*" \
254 "$(abs_builddir)/src/wallet/test/*" \
259 block_test.info: test_bitcoin_filtered.info
261 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
262 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
263 $(LCOV) -z -d $(abs_builddir)/src
264 $(LCOV) -z -d $(abs_builddir)/src/leveldb
267 block_test_filtered.info: block_test.info
268 $(LCOV) -r $< "/usr/include/*" \
269 "$(abs_builddir)/depends/$(BUILD)/include/*.h" \
270 "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
271 "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
272 "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
273 "$(abs_builddir)/src/gtest/*" \
274 "$(abs_builddir)/src/test/*" \
275 "$(abs_builddir)/src/wallet/gtest/*" \
276 "$(abs_builddir)/src/wallet/test/*" \
279 block_test_filtered.info: block_test.info
280 $(LCOV) -r $< "/usr/include/*" \
281 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
282 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
283 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
284 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
285 "$(abs_builddir)/src/gtest/*" \
286 "$(abs_builddir)/src/test/*" \
287 "$(abs_builddir)/src/wallet/gtest/*" \
288 "$(abs_builddir)/src/wallet/test/*" \
293 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
294 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
297 zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
298 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
302 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
303 $(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
305 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
306 $(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
310 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
311 $(GENHTML) -s $< -o $(@D)
315 zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
316 $(GENHTML) -s $< -o $(@D)
318 cov-zcash: zcash-gtest.coverage/.dirstamp
321 total.coverage/.dirstamp: total_coverage.info
322 $(GENHTML) -s $< -o $(@D)
326 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
328 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
333 dist_bin_SCRIPTS = zcutil/fetch-params.sh
334 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
336 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)
339 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
341 .INTERMEDIATE: $(COVERAGE_INFO)
343 DISTCHECK_CONFIGURE_FLAGS = --enable-man
346 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/