]>
Commit | Line | Data |
---|---|---|
6db54c98 DH |
1 | # Copyright (c) 2016-2019 The Zcash developers |
2 | # Copyright (c) 2013-2019 The Bitcoin Core developers | |
3 | # Copyright (c) 2013-2019 Bitcoin Developers | |
4 | # Distributed under the MIT software license, see the accompanying | |
bc909a7a | 5 | # file COPYING or https://www.opensource.org/licenses/mit-license.php . |
6db54c98 | 6 | |
52a5f903 | 7 | ACLOCAL_AMFLAGS = -I build-aux/m4 |
35b8af92 | 8 | SUBDIRS = src |
7a8eda9e | 9 | if ENABLE_MAN |
10 | SUBDIRS += doc/man | |
11 | endif | |
77a055d0 | 12 | .PHONY: deploy FORCE |
35b8af92 CF |
13 | |
14 | GZIP_ENV="-9n" | |
15 | ||
eef747bb LD |
16 | if BUILD_BITCOIN_LIBS |
17 | pkgconfigdir = $(libdir)/pkgconfig | |
08d6b02d | 18 | pkgconfig_DATA = libzcashconsensus.pc |
eef747bb LD |
19 | endif |
20 | ||
93c8c79b | 21 | |
5915430d AD |
22 | BITCOIND_BIN=$(top_builddir)/src/verusd$(EXEEXT) |
23 | BITCOIN_CLI_BIN=$(top_builddir)/src/verus$(EXEEXT) | |
ff84ea53 | 24 | #WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT) |
2f87b38e | 25 | BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) |
35b8af92 | 26 | |
35b8af92 | 27 | |
de21e8f1 | 28 | DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) |
6c980c7d | 29 | |
56734f4b | 30 | BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ |
8b78a819 | 31 | $(top_srcdir)/contrib/devtools/security-check.py |
56734f4b | 32 | |
93c8c79b | 33 | |
e73b2055 | 34 | |
35b8af92 | 35 | WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ |
8b78a819 T |
36 | $(top_srcdir)/share/pixmaps/nsis-header.bmp \ |
37 | $(top_srcdir)/share/pixmaps/nsis-wizard.bmp | |
35b8af92 | 38 | |
9490705d | 39 | |
9d365796 | 40 | if TARGET_DARWIN |
35b8af92 | 41 | COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ |
8b78a819 T |
42 | leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ |
43 | baseline_filtered.info block_test_filtered.info \ | |
44 | leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info | |
e891d64b | 45 | # zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info |
9490705d JB |
46 | else |
47 | COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ | |
48 | leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ | |
57ab896b | 49 | baseline_filtered.info \ |
9490705d | 50 | leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \ |
9d365796 | 51 | #zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info |
9490705d | 52 | endif |
35b8af92 CF |
53 | |
54 | dist-hook: | |
55 | -$(MAKE) -C $(top_distdir)/src/leveldb clean | |
55668266 | 56 | -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean |
71697f97 | 57 | -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - |
35b8af92 CF |
58 | |
59 | distcheck-hook: | |
60 | $(MKDIR_P) $(top_distdir)/_build/src/leveldb | |
61 | cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/ | |
62 | -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean | |
63 | ||
64 | distcleancheck: | |
65 | @: | |
66 | ||
77a055d0 CF |
67 | $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE |
68 | $(MAKE) -C src $(patsubst src/%,%,$@) | |
35b8af92 | 69 | |
2f327a3c | 70 | |
35b8af92 CF |
71 | if TARGET_WINDOWS |
72 | deploy: $(BITCOIN_WIN_INSTALLER) | |
73 | endif | |
74 | ||
d3434601 CF |
75 | $(BITCOIND_BIN): FORCE |
76 | $(MAKE) -C src $(@F) | |
77 | ||
78 | $(BITCOIN_CLI_BIN): FORCE | |
79 | $(MAKE) -C src $(@F) | |
80 | ||
ff84ea53 | 81 | #$(WALLET_UTILITY_BIN): FORCE |
82 | # $(MAKE) -C src $(@F) | |
8b78a819 | 83 | |
35b8af92 CF |
84 | if USE_LCOV |
85 | ||
86 | baseline.info: | |
87 | $(LCOV) -c -i -d $(abs_builddir)/src -o $@ | |
88 | ||
9490705d | 89 | if BUILD_DARWIN |
35b8af92 | 90 | baseline_filtered.info: baseline.info |
c2059f9e | 91 | $(LCOV) -r $< "/usr/include/*" \ |
8b78a819 T |
92 | "$(abs_builddir)/depends/$(BUILD)/include/*.h" \ |
93 | "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \ | |
94 | "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \ | |
95 | "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \ | |
96 | "$(abs_builddir)/src/gtest/*" \ | |
97 | "$(abs_builddir)/src/test/*" \ | |
98 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
99 | "$(abs_builddir)/src/wallet/test/*" \ | |
100 | -o $@ | |
9490705d JB |
101 | else |
102 | baseline_filtered.info: baseline.info | |
103 | $(LCOV) -r $< "/usr/include/*" \ | |
8b78a819 T |
104 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \ |
105 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \ | |
106 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \ | |
107 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \ | |
108 | "$(abs_builddir)/src/gtest/*" \ | |
109 | "$(abs_builddir)/src/test/*" \ | |
110 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
111 | "$(abs_builddir)/src/wallet/test/*" \ | |
112 | -o $@ | |
9490705d | 113 | endif |
35b8af92 CF |
114 | |
115 | leveldb_baseline.info: baseline_filtered.info | |
116 | $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@ | |
117 | ||
9490705d JB |
118 | if BUILD_DARWIN |
119 | leveldb_baseline_filtered.info: leveldb_baseline.info | |
120 | $(LCOV) -r $< "/usr/include/*" \ | |
8b78a819 T |
121 | "$(abs_builddir)/depends/$(BUILD)/include/*.h" \ |
122 | "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \ | |
123 | "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \ | |
124 | "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \ | |
125 | "$(abs_builddir)/src/gtest/*" \ | |
126 | "$(abs_builddir)/src/test/*" \ | |
127 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
128 | "$(abs_builddir)/src/wallet/test/*" \ | |
129 | -o $@ | |
9490705d | 130 | else |
35b8af92 | 131 | leveldb_baseline_filtered.info: leveldb_baseline.info |
c2059f9e | 132 | $(LCOV) -r $< "/usr/include/*" \ |
8b78a819 T |
133 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \ |
134 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \ | |
135 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \ | |
136 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \ | |
137 | "$(abs_builddir)/src/gtest/*" \ | |
138 | "$(abs_builddir)/src/test/*" \ | |
139 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
140 | "$(abs_builddir)/src/wallet/test/*" \ | |
141 | -o $@ | |
9490705d | 142 | endif |
35b8af92 CF |
143 | |
144 | baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info | |
145 | $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ | |
146 | ||
147 | test_bitcoin.info: baseline_filtered_combined.info | |
d16d5ef8 | 148 | $(MAKE) -C src/ bitcoin_test_check |
35b8af92 CF |
149 | $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@ |
150 | $(LCOV) -z -d $(abs_builddir)/src | |
151 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
152 | ||
9490705d | 153 | if BUILD_DARWIN |
35b8af92 | 154 | test_bitcoin_filtered.info: test_bitcoin.info |
c2059f9e | 155 | $(LCOV) -r $< "/usr/include/*" \ |
8b78a819 T |
156 | "$(abs_builddir)/depends/$(BUILD)/include/*.h" \ |
157 | "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \ | |
158 | "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \ | |
159 | "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \ | |
160 | "$(abs_builddir)/src/gtest/*" \ | |
161 | "$(abs_builddir)/src/test/*" \ | |
162 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
163 | "$(abs_builddir)/src/wallet/test/*" \ | |
164 | -o $@ | |
9490705d JB |
165 | else |
166 | test_bitcoin_filtered.info: test_bitcoin.info | |
167 | $(LCOV) -r $< "/usr/include/*" \ | |
8b78a819 T |
168 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \ |
169 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \ | |
170 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \ | |
171 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \ | |
172 | "$(abs_builddir)/src/gtest/*" \ | |
173 | "$(abs_builddir)/src/test/*" \ | |
174 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
175 | "$(abs_builddir)/src/wallet/test/*" \ | |
176 | -o $@ | |
9490705d | 177 | endif |
d16d5ef8 | 178 | |
93c8c79b | 179 | |
35b8af92 | 180 | block_test.info: test_bitcoin_filtered.info |
95fa14da | 181 | $(MKDIR_P) qa/tmp |
f1f72e53 | 182 | -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 |
35b8af92 CF |
183 | $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@ |
184 | $(LCOV) -z -d $(abs_builddir)/src | |
185 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
186 | ||
9490705d JB |
187 | if BUILD_DARWIN |
188 | block_test_filtered.info: block_test.info | |
189 | $(LCOV) -r $< "/usr/include/*" \ | |
8b78a819 T |
190 | "$(abs_builddir)/depends/$(BUILD)/include/*.h" \ |
191 | "$(abs_builddir)/depends/$(BUILD)/include/boost/*" \ | |
192 | "$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \ | |
193 | "$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \ | |
194 | "$(abs_builddir)/src/gtest/*" \ | |
195 | "$(abs_builddir)/src/test/*" \ | |
196 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
197 | "$(abs_builddir)/src/wallet/test/*" \ | |
198 | -o $@ | |
9490705d | 199 | else |
35b8af92 | 200 | block_test_filtered.info: block_test.info |
c2059f9e | 201 | $(LCOV) -r $< "/usr/include/*" \ |
8b78a819 T |
202 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \ |
203 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \ | |
204 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \ | |
205 | "$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \ | |
206 | "$(abs_builddir)/src/gtest/*" \ | |
207 | "$(abs_builddir)/src/test/*" \ | |
208 | "$(abs_builddir)/src/wallet/gtest/*" \ | |
209 | "$(abs_builddir)/src/wallet/test/*" \ | |
210 | -o $@ | |
9490705d | 211 | endif |
35b8af92 | 212 | |
93c8c79b | 213 | |
35b8af92 | 214 | test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info |
8b78a819 | 215 | $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ |
35b8af92 | 216 | |
9490705d JB |
217 | if ! BUILD_DARWIN |
218 | zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info | |
219 | $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@ | |
220 | endif | |
221 | ||
222 | if BUILD_DARWIN | |
9d365796 | 223 | total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info |
8b78a819 | 224 | $(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 |
9490705d JB |
225 | else |
226 | total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info | |
227 | $(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 | |
228 | endif | |
229 | ||
35b8af92 CF |
230 | |
231 | test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info | |
8b78a819 T |
232 | $(GENHTML) -s $< -o $(@D) |
233 | @touch $@ | |
d16d5ef8 | 234 | |
9d365796 | 235 | if TARGET_DARWIN |
236 | zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info | |
8b78a819 T |
237 | $(GENHTML) -s $< -o $(@D) |
238 | @touch $@ | |
9d365796 | 239 | cov-zcash: zcash-gtest.coverage/.dirstamp |
240 | endif | |
241 | ||
35b8af92 | 242 | total.coverage/.dirstamp: total_coverage.info |
8b78a819 T |
243 | $(GENHTML) -s $< -o $(@D) |
244 | @touch $@ | |
35b8af92 | 245 | |
9490705d | 246 | if BUILD_DARWIN |
9d365796 | 247 | cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp |
9490705d JB |
248 | else |
249 | cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp | |
250 | endif | |
35b8af92 CF |
251 | |
252 | endif | |
253 | ||
33efd816 JG |
254 | dist_bin_SCRIPTS = zcutil/fetch-params.sh |
255 | dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh | |
a37567dd | 256 | |
3bccc064 | 257 | 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) |
35b8af92 | 258 | |
33efd816 JG |
259 | install-exec-hook: |
260 | mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params | |
261 | ||
31127f31 | 262 | .INTERMEDIATE: $(COVERAGE_INFO) |
35b8af92 | 263 | |
7a8eda9e | 264 | DISTCHECK_CONFIGURE_FLAGS = --enable-man |
265 | ||
35b8af92 | 266 | clean-local: |
b6a990de | 267 | rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ |