]> Git Repo - VerusCoin.git/blob - Makefile.am
Simplify Python installation, inform user if they need to manually configure
[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 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)
18
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
28
29 DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
30
31 BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
32            $(top_srcdir)/contrib/devtools/security-check.py
33
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
37
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
43
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
49
50 dist-hook:
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 -
54
55 distcheck-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
60 distcleancheck:
61         @:
62
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 $@
69         @echo built $@
70
71 $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
72         $(MAKE) -C src $(patsubst src/%,%,$@)
73
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
136
137 if TARGET_WINDOWS
138 deploy: $(BITCOIN_WIN_INSTALLER)
139 endif
140
141 $(BITCOIND_BIN): FORCE
142         $(MAKE) -C src $(@F)
143
144 $(BITCOIN_CLI_BIN): FORCE
145         $(MAKE) -C src $(@F)
146
147 if USE_LCOV
148
149 baseline.info:
150         $(LCOV) -c -i -d $(abs_builddir)/src -o $@
151
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/*" \
162                       -o $@
163
164 leveldb_baseline.info: baseline_filtered.info
165         $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
166
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/*" \
177                       -o $@
178
179 baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
180         $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
181
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
187
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/*" \
198                       -o $@
199
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
205
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/*" \
216                       -o $@
217
218 block_test.info: test_bitcoin_filtered.info
219         $(MKDIR_P) qa/tmp
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
224
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/*" \
235                       -o $@
236
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 $@
239
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 $@
242
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
245
246 test_bitcoin.coverage/.dirstamp:  test_bitcoin_coverage.info
247         $(GENHTML) -s $< -o $(@D)
248         @touch $@
249
250 zcash-gtest.coverage/.dirstamp:  zcash-gtest_coverage.info
251         $(GENHTML) -s $< -o $(@D)
252         @touch $@
253
254 cov-zcash: zcash-gtest.coverage/.dirstamp
255
256 total.coverage/.dirstamp: total_coverage.info
257         $(GENHTML) -s $< -o $(@D)
258         @touch $@
259
260 cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
261
262 endif
263
264 if USE_COMPARISON_TOOL
265 check-local:
266         $(MKDIR_P) qa/tmp
267         @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
268 endif
269
270 dist_bin_SCRIPTS = zcutil/fetch-params.sh
271 dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
272
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)
274
275 install-exec-hook:
276         mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
277
278 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
279
280 .INTERMEDIATE: $(COVERAGE_INFO)
281
282 DISTCHECK_CONFIGURE_FLAGS = --enable-man
283
284 clean-local:
285         rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ $(OSX_APP)
This page took 0.042203 seconds and 4 git commands to generate.