]> Git Repo - VerusCoin.git/blob - Makefile.am
Merge branch 'dev' of github.com:miketout/VerusCoin into dev
[VerusCoin.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I build-aux/m4
2 SUBDIRS = src
3 if ENABLE_MAN
4 SUBDIRS += doc/man
5 endif
6 .PHONY: deploy FORCE
7
8 GZIP_ENV="-9n"
9
10 if BUILD_BITCOIN_LIBS
11 pkgconfigdir = $(libdir)/pkgconfig
12 pkgconfig_DATA = libzcashconsensus.pc
13 endif
14
15
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)
20
21 if TARGET_DARWIN
22 OSX_APP=Agama.app
23 OSX_DMG=Agama.dmg
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
31 endif
32
33 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
34
35 BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
36         $(top_srcdir)/contrib/devtools/security-check.py
37
38
39
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
43
44 if TARGET_DARWIN
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
50 endif
51
52 if TARGET_DARWIN
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
58 else
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
64 endif
65
66 dist-hook:
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 -
70
71 distcheck-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
76 distcleancheck:
77         @:
78
79 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
80         $(MAKE) -C src $(patsubst src/%,%,$@)
81
82 if 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
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
111
112 endif
113
114 if 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
117 deploydir: $(OSX_DMG)
118 else
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
121 endif
122
123 if 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
142 deploydir: $(APP_DIST_EXTRAS)
143 endif
144
145 if TARGET_DARWIN
146 appbundle: $(OSX_APP_BUILT)
147 deploy: $(OSX_DMG)
148 endif
149
150 if TARGET_WINDOWS
151 deploy: $(BITCOIN_WIN_INSTALLER)
152 endif
153
154 $(BITCOIND_BIN): FORCE
155         $(MAKE) -C src $(@F)
156
157 $(BITCOIN_CLI_BIN): FORCE
158         $(MAKE) -C src $(@F)
159
160 #$(WALLET_UTILITY_BIN): FORCE
161 #       $(MAKE) -C src $(@F)
162
163 if USE_LCOV
164
165 baseline.info:
166         $(LCOV) -c -i -d $(abs_builddir)/src -o $@
167
168 if BUILD_DARWIN
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/*" \
179         -o $@
180 else
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/*" \
191         -o $@
192 endif
193
194 leveldb_baseline.info: baseline_filtered.info
195         $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
196
197 if BUILD_DARWIN
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/*" \
208         -o $@
209 else
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/*" \
220         -o $@
221 endif
222
223 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
224         $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
225
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
231
232 if BUILD_DARWIN
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/*" \
243         -o $@
244 else
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/*" \
255         -o $@
256 endif
257
258
259 block_test.info: test_bitcoin_filtered.info
260         $(MKDIR_P) qa/tmp
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
265
266 if BUILD_DARWIN
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/*" \
277         -o $@
278 else
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/*" \
289         -o $@
290 endif
291
292
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 $@
295
296 if ! BUILD_DARWIN
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 $@
299 endif
300
301 if BUILD_DARWIN
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
304 else
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
307 endif
308
309
310 test_bitcoin.coverage/.dirstamp:  test_bitcoin_coverage.info
311         $(GENHTML) -s $< -o $(@D)
312         @touch $@
313
314 if TARGET_DARWIN
315 zcash-gtest.coverage/.dirstamp:  zcash-gtest_coverage.info
316         $(GENHTML) -s $< -o $(@D)
317         @touch $@
318 cov-zcash: zcash-gtest.coverage/.dirstamp
319 endif
320
321 total.coverage/.dirstamp: total_coverage.info
322         $(GENHTML) -s $< -o $(@D)
323         @touch $@
324
325 if BUILD_DARWIN
326 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
327 else
328 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
329 endif
330
331 endif
332
333 dist_bin_SCRIPTS = zcutil/fetch-params.sh
334 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
335
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)
337
338 install-exec-hook:
339         mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
340
341 .INTERMEDIATE: $(COVERAGE_INFO)
342
343 DISTCHECK_CONFIGURE_FLAGS = --enable-man
344
345 clean-local:
346         rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/
This page took 0.043636 seconds and 4 git commands to generate.