1 ACLOCAL_AMFLAGS = -I build-aux/m4
11 pkgconfigdir = $(libdir)/pkgconfig
12 pkgconfig_DATA = libzcashconsensus.pc
15 BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
16 BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
17 BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
19 ##OSX_APP=Bitcoin-Qt.app
20 ##OSX_DMG=Bitcoin-Core.dmg
21 ##OSX_BACKGROUND_IMAGE=background.tiff
22 ##OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
23 ##OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
24 ##OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
25 ##OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
26 ##OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
27 ##OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
29 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
31 BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
32 $(top_srcdir)/contrib/devtools/security-check.py
34 WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
35 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
36 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
38 ##OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
39 ## $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
40 ## $(top_srcdir)/contrib/macdeploy/DS_Store \
41 ## $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
42 ## $(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
51 -$(MAKE) -C $(top_distdir)/src/leveldb clean
52 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
53 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
56 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
57 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
58 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
63 $(BITCOIN_WIN_INSTALLER): all-recursive
64 $(MKDIR_P) $(top_builddir)/release
65 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
66 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
67 @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
68 echo error: could not build $@
71 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
72 $(MAKE) -C src $(patsubst src/%,%,$@)
74 ##$(OSX_APP)/Contents/PkgInfo:
76 ## @echo "APPL????" > $@
78 ##$(OSX_APP)/Contents/Resources/empty.lproj:
82 ##$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
84 ## $(INSTALL_DATA) $< $@
86 ##$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
88 ## $(INSTALL_DATA) $< $@
90 ##$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
92 ## STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
94 ##$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
96 ## $(INSTALL_DATA) $< $@
98 ##OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
99 ## $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
100 ## $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
103 ##$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
104 ## $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
106 ##deploydir: $(OSX_DMG)
108 ##APP_DIST_DIR=$(top_builddir)/dist
109 ##APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
111 ##$(APP_DIST_DIR)/Applications:
113 ## @cd $(@D); $(LN_S) /Applications $(@F)
115 ##$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
117 ##$(OSX_DMG): $(APP_DIST_EXTRAS)
118 ## $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
120 ##$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
123 ##$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
126 ##$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
127 ## INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
129 ##deploydir: $(APP_DIST_EXTRAS)
133 ##appbundle: $(OSX_APP_BUILT)
138 deploy: $(BITCOIN_WIN_INSTALLER)
141 $(BITCOIND_BIN): FORCE
144 $(BITCOIN_CLI_BIN): FORCE
150 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
152 baseline_filtered.info: baseline.info
153 $(LCOV) -r $< "/usr/include/*" \
154 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
155 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
156 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
157 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
158 "$(abs_builddir)/src/gtest/*" \
159 "$(abs_builddir)/src/test/*" \
160 "$(abs_builddir)/src/wallet/gtest/*" \
161 "$(abs_builddir)/src/wallet/test/*" \
164 leveldb_baseline.info: baseline_filtered.info
165 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
167 leveldb_baseline_filtered.info: leveldb_baseline.info
168 $(LCOV) -r $< "/usr/include/*" \
169 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
170 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
171 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
172 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
173 "$(abs_builddir)/src/gtest/*" \
174 "$(abs_builddir)/src/test/*" \
175 "$(abs_builddir)/src/wallet/gtest/*" \
176 "$(abs_builddir)/src/wallet/test/*" \
179 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
180 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
182 test_bitcoin.info: baseline_filtered_combined.info
183 $(MAKE) -C src/ bitcoin_test_check
184 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
185 $(LCOV) -z -d $(abs_builddir)/src
186 $(LCOV) -z -d $(abs_builddir)/src/leveldb
188 test_bitcoin_filtered.info: test_bitcoin.info
189 $(LCOV) -r $< "/usr/include/*" \
190 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
191 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
192 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
193 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
194 "$(abs_builddir)/src/gtest/*" \
195 "$(abs_builddir)/src/test/*" \
196 "$(abs_builddir)/src/wallet/gtest/*" \
197 "$(abs_builddir)/src/wallet/test/*" \
200 zcash-gtest.info: baseline_filtered_combined.info
201 $(MAKE) -C src/ zcash-gtest_check
202 $(LCOV) -c -d $(abs_builddir)/src -t zcash-gtest -o $@
203 $(LCOV) -z -d $(abs_builddir)/src
204 $(LCOV) -z -d $(abs_builddir)/src/leveldb
206 zcash-gtest_filtered.info: zcash-gtest.info
207 $(LCOV) -r $< "/usr/include/*" \
208 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
209 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
210 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
211 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
212 "$(abs_builddir)/src/gtest/*" \
213 "$(abs_builddir)/src/test/*" \
214 "$(abs_builddir)/src/wallet/gtest/*" \
215 "$(abs_builddir)/src/wallet/test/*" \
218 block_test.info: test_bitcoin_filtered.info
220 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
221 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
222 $(LCOV) -z -d $(abs_builddir)/src
223 $(LCOV) -z -d $(abs_builddir)/src/leveldb
225 block_test_filtered.info: block_test.info
226 $(LCOV) -r $< "/usr/include/*" \
227 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
228 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
229 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
230 "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
231 "$(abs_builddir)/src/gtest/*" \
232 "$(abs_builddir)/src/test/*" \
233 "$(abs_builddir)/src/wallet/gtest/*" \
234 "$(abs_builddir)/src/wallet/test/*" \
237 test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
238 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
240 zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info
241 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@
243 total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
244 $(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
246 test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
247 $(GENHTML) -s $< -o $(@D)
250 zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
251 $(GENHTML) -s $< -o $(@D)
254 cov-zcash: zcash-gtest.coverage/.dirstamp
256 total.coverage/.dirstamp: total_coverage.info
257 $(GENHTML) -s $< -o $(@D)
260 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
264 if USE_COMPARISON_TOOL
267 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
270 dist_bin_SCRIPTS = zcutil/fetch-params.sh
271 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
273 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)
276 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
278 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
280 .INTERMEDIATE: $(COVERAGE_INFO)
282 DISTCHECK_CONFIGURE_FLAGS = --enable-man
285 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ $(OSX_APP)