]> Git Repo - VerusCoin.git/blame - Makefile.am
Consume incorrect chain transfers to prevent DOS attacks through them
[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
93c8c79b 15
058156b8
DD
16BITCOIND_BIN=$(top_builddir)/src/komodod$(EXEEXT)
17BITCOIN_CLI_BIN=$(top_builddir)/src/komodo-cli$(EXEEXT)
ff84ea53 18#WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT)
2f87b38e 19BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
35b8af92 20
9d365796 21if TARGET_DARWIN
058156b8
DD
22OSX_APP=Agama.app
23OSX_DMG=Agama.dmg
9d365796 24OSX_BACKGROUND_IMAGE=background.tiff
25OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
26OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
27OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
28OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
29OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
30OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
31endif
35b8af92 32
de21e8f1 33DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
6c980c7d 34
56734f4b 35BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
8b78a819 36 $(top_srcdir)/contrib/devtools/security-check.py
56734f4b 37
93c8c79b 38
e73b2055 39
35b8af92 40WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
8b78a819
T
41 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
42 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp
35b8af92 43
9d365796 44if TARGET_DARWIN
45OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
8b78a819
T
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
9d365796 50endif
9490705d 51
9d365796 52if TARGET_DARWIN
35b8af92 53COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
8b78a819
T
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
e891d64b 57# zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
9490705d
JB
58else
59COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
60 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
57ab896b 61 baseline_filtered.info \
9490705d 62 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
9d365796 63 #zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
9490705d 64endif
35b8af92
CF
65
66dist-hook:
67 -$(MAKE) -C $(top_distdir)/src/leveldb clean
55668266 68 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
71697f97 69 -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
35b8af92
CF
70
71distcheck-hook:
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
75
76distcleancheck:
77 @:
78
77a055d0
CF
79$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
80 $(MAKE) -C src $(patsubst src/%,%,$@)
35b8af92 81
9d365796 82if TARGET_DARWIN
83
84$(OSX_APP)/Contents/PkgInfo:
85 $(MKDIR_P) $(@D)
86 @echo "APPL????" > $@
87
88$(OSX_APP)/Contents/Resources/empty.lproj:
89 $(MKDIR_P) $(@D)
90 @touch $@
91
92$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
93 $(MKDIR_P) $(@D)
94 $(INSTALL_DATA) $< $@
95
96$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
97 $(MKDIR_P) $(@D)
98 $(INSTALL_DATA) $< $@
99
100$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
101 $(MKDIR_P) $(@D)
102 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
103
104$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
105 $(MKDIR_P) $(@D)
106 $(INSTALL_DATA) $< $@
107
108OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
8b78a819
T
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
111
9d365796 112endif
113
114if BUILD_DARWIN
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
117deploydir: $(OSX_DMG)
118else
119APP_DIST_DIR=$(top_builddir)/dist
120APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
121endif
122
123if TARGET_DARWIN
124$(APP_DIST_DIR)/Applications:
125 @rm -f $@
126 @cd $(@D); $(LN_S) /Applications $(@F)
127
128$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
129
130$(OSX_DMG): $(APP_DIST_EXTRAS)
131 $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
132
133$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
134 $(MKDIR_P) $(@D)
135 $(INSTALL) $< $@
136$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
137 $(INSTALL) $< $@
138
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
141
142deploydir: $(APP_DIST_EXTRAS)
143endif
144
145if TARGET_DARWIN
146appbundle: $(OSX_APP_BUILT)
147deploy: $(OSX_DMG)
148endif
2f327a3c 149
35b8af92
CF
150if TARGET_WINDOWS
151deploy: $(BITCOIN_WIN_INSTALLER)
152endif
153
d3434601
CF
154$(BITCOIND_BIN): FORCE
155 $(MAKE) -C src $(@F)
156
157$(BITCOIN_CLI_BIN): FORCE
158 $(MAKE) -C src $(@F)
159
ff84ea53 160#$(WALLET_UTILITY_BIN): FORCE
161# $(MAKE) -C src $(@F)
8b78a819 162
35b8af92
CF
163if USE_LCOV
164
165baseline.info:
166 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
167
9490705d 168if BUILD_DARWIN
35b8af92 169baseline_filtered.info: baseline.info
c2059f9e 170 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
179 -o $@
9490705d
JB
180else
181baseline_filtered.info: baseline.info
182 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
191 -o $@
9490705d 192endif
35b8af92
CF
193
194leveldb_baseline.info: baseline_filtered.info
195 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
196
9490705d
JB
197if BUILD_DARWIN
198leveldb_baseline_filtered.info: leveldb_baseline.info
199 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
208 -o $@
9490705d 209else
35b8af92 210leveldb_baseline_filtered.info: leveldb_baseline.info
c2059f9e 211 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
220 -o $@
9490705d 221endif
35b8af92
CF
222
223baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
224 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
225
226test_bitcoin.info: baseline_filtered_combined.info
d16d5ef8 227 $(MAKE) -C src/ bitcoin_test_check
35b8af92
CF
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
231
9490705d 232if BUILD_DARWIN
35b8af92 233test_bitcoin_filtered.info: test_bitcoin.info
c2059f9e 234 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
243 -o $@
9490705d
JB
244else
245test_bitcoin_filtered.info: test_bitcoin.info
246 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
255 -o $@
9490705d 256endif
d16d5ef8 257
93c8c79b 258
35b8af92 259block_test.info: test_bitcoin_filtered.info
95fa14da 260 $(MKDIR_P) qa/tmp
f1f72e53 261 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
35b8af92
CF
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
265
9490705d
JB
266if BUILD_DARWIN
267block_test_filtered.info: block_test.info
268 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
277 -o $@
9490705d 278else
35b8af92 279block_test_filtered.info: block_test.info
c2059f9e 280 $(LCOV) -r $< "/usr/include/*" \
8b78a819
T
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/*" \
289 -o $@
9490705d 290endif
35b8af92 291
93c8c79b 292
35b8af92 293test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
8b78a819 294 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
35b8af92 295
9490705d
JB
296if ! BUILD_DARWIN
297zcash-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 $@
299endif
300
301if BUILD_DARWIN
9d365796 302total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
8b78a819 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
9490705d
JB
304else
305total_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
307endif
308
35b8af92
CF
309
310test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
8b78a819
T
311 $(GENHTML) -s $< -o $(@D)
312 @touch $@
d16d5ef8 313
9d365796 314if TARGET_DARWIN
315zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
8b78a819
T
316 $(GENHTML) -s $< -o $(@D)
317 @touch $@
9d365796 318cov-zcash: zcash-gtest.coverage/.dirstamp
319endif
320
35b8af92 321total.coverage/.dirstamp: total_coverage.info
8b78a819
T
322 $(GENHTML) -s $< -o $(@D)
323 @touch $@
35b8af92 324
9490705d 325if BUILD_DARWIN
9d365796 326cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
9490705d
JB
327else
328cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
329endif
35b8af92
CF
330
331endif
332
33efd816
JG
333dist_bin_SCRIPTS = zcutil/fetch-params.sh
334dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
a37567dd 335
3bccc064 336EXTRA_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 337
33efd816
JG
338install-exec-hook:
339 mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
340
31127f31 341.INTERMEDIATE: $(COVERAGE_INFO)
35b8af92 342
7a8eda9e 343DISTCHECK_CONFIGURE_FLAGS = --enable-man
344
35b8af92 345clean-local:
b6a990de 346 rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/
This page took 0.178668 seconds and 4 git commands to generate.