]> Git Repo - VerusCoin.git/blame - Makefile.am
Make SystemExit errors less redundant in output; verify clean git status on master.
[VerusCoin.git] / Makefile.am
CommitLineData
52a5f903 1ACLOCAL_AMFLAGS = -I build-aux/m4
35b8af92 2SUBDIRS = src
7a8eda9e 3if ENABLE_MAN
4SUBDIRS += doc/man
5endif
77a055d0 6.PHONY: deploy FORCE
35b8af92
CF
7
8GZIP_ENV="-9n"
9
eef747bb
LD
10if BUILD_BITCOIN_LIBS
11pkgconfigdir = $(libdir)/pkgconfig
08d6b02d 12pkgconfig_DATA = libzcashconsensus.pc
eef747bb
LD
13endif
14
8a183335 15BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
8a183335 16BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
2f87b38e 17BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
35b8af92 18
38ba3c66
DH
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
35b8af92 28
de21e8f1 29DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
6c980c7d 30
56734f4b
TH
31BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
32 $(top_srcdir)/contrib/devtools/security-check.py
33
35b8af92
CF
34WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
35 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
c06664fb 36 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
35b8af92 37
38ba3c66
DH
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
35b8af92
CF
43
44COVERAGE_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 \
873625bc
JG
47 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
48 zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
35b8af92
CF
49
50dist-hook:
51 -$(MAKE) -C $(top_distdir)/src/leveldb clean
55668266 52 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
71697f97 53 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
35b8af92
CF
54
55distcheck-hook:
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
59
60distcleancheck:
61 @:
62
6b271a39 63$(BITCOIN_WIN_INSTALLER): all-recursive
35b8af92 64 $(MKDIR_P) $(top_builddir)/release
c4a10dbb 65 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
c4a10dbb 66 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
00ea5464 67 @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
35b8af92 68 echo error: could not build $@
00ea5464 69 @echo built $@
35b8af92 70
77a055d0
CF
71$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
72 $(MAKE) -C src $(patsubst src/%,%,$@)
35b8af92 73
38ba3c66
DH
74##$(OSX_APP)/Contents/PkgInfo:
75## $(MKDIR_P) $(@D)
76## @echo "APPL????" > $@
77##
78##$(OSX_APP)/Contents/Resources/empty.lproj:
79## $(MKDIR_P) $(@D)
80## @touch $@
81##
82##$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
83## $(MKDIR_P) $(@D)
84## $(INSTALL_DATA) $< $@
85##
86##$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
87## $(MKDIR_P) $(@D)
88## $(INSTALL_DATA) $< $@
89##
90##$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
91## $(MKDIR_P) $(@D)
92## STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
93##
94##$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
95## $(MKDIR_P) $(@D)
96## $(INSTALL_DATA) $< $@
97##
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
101##
102##if BUILD_DARWIN
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
105##
106##deploydir: $(OSX_DMG)
107##else
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
110##
111##$(APP_DIST_DIR)/Applications:
112## @rm -f $@
113## @cd $(@D); $(LN_S) /Applications $(@F)
114##
115##$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
116##
117##$(OSX_DMG): $(APP_DIST_EXTRAS)
118## $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
119##
120##$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
121## $(MKDIR_P) $(@D)
122## $(INSTALL) $< $@
123##$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
124## $(INSTALL) $< $@
125##
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
128##
129##deploydir: $(APP_DIST_EXTRAS)
130##endif
131##
132##if TARGET_DARWIN
133##appbundle: $(OSX_APP_BUILT)
134##deploy: $(OSX_DMG)
135##endif
35b8af92 136
35b8af92
CF
137if TARGET_WINDOWS
138deploy: $(BITCOIN_WIN_INSTALLER)
139endif
140
d3434601
CF
141$(BITCOIND_BIN): FORCE
142 $(MAKE) -C src $(@F)
143
144$(BITCOIN_CLI_BIN): FORCE
145 $(MAKE) -C src $(@F)
146
35b8af92
CF
147if USE_LCOV
148
149baseline.info:
150 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
151
152baseline_filtered.info: baseline.info
c2059f9e
JG
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/*" \
9773b95f
JG
160 "$(abs_builddir)/src/wallet/gtest/*" \
161 "$(abs_builddir)/src/wallet/test/*" \
c2059f9e 162 -o $@
35b8af92
CF
163
164leveldb_baseline.info: baseline_filtered.info
165 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
166
167leveldb_baseline_filtered.info: leveldb_baseline.info
c2059f9e
JG
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/*" \
9773b95f
JG
175 "$(abs_builddir)/src/wallet/gtest/*" \
176 "$(abs_builddir)/src/wallet/test/*" \
c2059f9e 177 -o $@
35b8af92
CF
178
179baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
180 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
181
182test_bitcoin.info: baseline_filtered_combined.info
d16d5ef8 183 $(MAKE) -C src/ bitcoin_test_check
35b8af92
CF
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
187
188test_bitcoin_filtered.info: test_bitcoin.info
c2059f9e
JG
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/*" \
9773b95f
JG
196 "$(abs_builddir)/src/wallet/gtest/*" \
197 "$(abs_builddir)/src/wallet/test/*" \
c2059f9e 198 -o $@
35b8af92 199
d16d5ef8
NW
200zcash-gtest.info: baseline_filtered_combined.info
201 $(MAKE) -C src/ zcash-gtest_check
7fde87cd 202 $(LCOV) -c -d $(abs_builddir)/src -t zcash-gtest -o $@
d16d5ef8
NW
203 $(LCOV) -z -d $(abs_builddir)/src
204 $(LCOV) -z -d $(abs_builddir)/src/leveldb
205
206zcash-gtest_filtered.info: zcash-gtest.info
c2059f9e
JG
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/*" \
9773b95f
JG
214 "$(abs_builddir)/src/wallet/gtest/*" \
215 "$(abs_builddir)/src/wallet/test/*" \
c2059f9e 216 -o $@
d16d5ef8 217
35b8af92 218block_test.info: test_bitcoin_filtered.info
95fa14da 219 $(MKDIR_P) qa/tmp
f1f72e53 220 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
35b8af92
CF
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
224
225block_test_filtered.info: block_test.info
c2059f9e
JG
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/*" \
9773b95f
JG
233 "$(abs_builddir)/src/wallet/gtest/*" \
234 "$(abs_builddir)/src/wallet/test/*" \
c2059f9e 235 -o $@
35b8af92
CF
236
237test_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 $@
239
d16d5ef8
NW
240zcash-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 $@
242
243total_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
35b8af92
CF
245
246test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
247 $(GENHTML) -s $< -o $(@D)
248 @touch $@
249
d16d5ef8
NW
250zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
251 $(GENHTML) -s $< -o $(@D)
252 @touch $@
253
254cov-zcash: zcash-gtest.coverage/.dirstamp
255
35b8af92
CF
256total.coverage/.dirstamp: total_coverage.info
257 $(GENHTML) -s $< -o $(@D)
258 @touch $@
259
d16d5ef8 260cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
35b8af92
CF
261
262endif
263
264if USE_COMPARISON_TOOL
265check-local:
95fa14da 266 $(MKDIR_P) qa/tmp
a67eef17 267 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
35b8af92
CF
268endif
269
33efd816
JG
270dist_bin_SCRIPTS = zcutil/fetch-params.sh
271dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
a37567dd 272
3bccc064 273EXTRA_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 274
33efd816
JG
275install-exec-hook:
276 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
277
13d3adb6 278CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
35b8af92 279
31127f31 280.INTERMEDIATE: $(COVERAGE_INFO)
35b8af92 281
7a8eda9e 282DISTCHECK_CONFIGURE_FLAGS = --enable-man
283
35b8af92 284clean-local:
71442d31 285 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ $(OSX_APP)
This page took 0.108617 seconds and 4 git commands to generate.