]>
Commit | Line | Data |
---|---|---|
35b8af92 CF |
1 | ACLOCAL_AMFLAGS = -I src/m4 |
2 | SUBDIRS = src | |
77a055d0 | 3 | .PHONY: deploy FORCE |
35b8af92 CF |
4 | |
5 | GZIP_ENV="-9n" | |
6 | ||
7 | BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT) | |
8 | BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) | |
39db27ca | 9 | BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT) |
2f87b38e | 10 | BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) |
35b8af92 CF |
11 | |
12 | OSX_APP=Bitcoin-Qt.app | |
13 | OSX_DMG=Bitcoin-Qt.dmg | |
14 | OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus | |
15 | OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist | |
16 | OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns | |
17 | OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed | |
01e5327c | 18 | OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW |
35b8af92 | 19 | |
de21e8f1 | 20 | DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) |
6c980c7d | 21 | |
35b8af92 CF |
22 | WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ |
23 | $(top_srcdir)/share/pixmaps/nsis-header.bmp \ | |
24 | $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ | |
25 | $(top_srcdir)/doc/README_windows.txt | |
26 | ||
27 | OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ | |
01e5327c CF |
28 | $(top_srcdir)/contrib/macdeploy/background.png \ |
29 | $(top_srcdir)/contrib/macdeploy/DS_Store | |
35b8af92 CF |
30 | |
31 | COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ | |
32 | leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ | |
33 | baseline_filtered.info block_test_filtered.info \ | |
34 | leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info | |
35 | ||
36 | dist-hook: | |
37 | -$(MAKE) -C $(top_distdir)/src/leveldb clean | |
55668266 | 38 | -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean |
35b8af92 CF |
39 | -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf - |
40 | ||
41 | distcheck-hook: | |
42 | $(MKDIR_P) $(top_distdir)/_build/src/leveldb | |
43 | cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/ | |
44 | -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean | |
45 | ||
46 | distcleancheck: | |
47 | @: | |
48 | ||
39db27ca | 49 | $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN) |
35b8af92 | 50 | $(MKDIR_P) $(top_builddir)/release |
c4a10dbb CF |
51 | STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release |
52 | STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release | |
53 | STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release | |
35b8af92 CF |
54 | @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ |
55 | echo error: could not build $@ | |
56 | ||
77a055d0 CF |
57 | $(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE |
58 | $(MAKE) -C src $(patsubst src/%,%,$@) | |
35b8af92 CF |
59 | |
60 | $(OSX_APP)/Contents/PkgInfo: | |
61 | $(MKDIR_P) $(@D) | |
62 | @echo "APPL????" > $@ | |
63 | ||
64 | $(OSX_APP)/Contents/Resources/empty.lproj: | |
65 | $(MKDIR_P) $(@D) | |
66 | @touch $@ | |
67 | ||
68 | $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) | |
69 | $(MKDIR_P) $(@D) | |
76cee181 | 70 | $(INSTALL_DATA) $< $@ |
35b8af92 CF |
71 | |
72 | $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) | |
73 | $(MKDIR_P) $(@D) | |
76cee181 | 74 | $(INSTALL_DATA) $< $@ |
35b8af92 CF |
75 | |
76 | $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) | |
77 | $(MKDIR_P) $(@D) | |
c4a10dbb | 78 | STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@ |
35b8af92 CF |
79 | |
80 | OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ | |
81 | $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ | |
82 | $(OSX_APP)/Contents/MacOS/Bitcoin-Qt | |
83 | ||
01e5327c | 84 | if BUILD_DARWIN |
35b8af92 | 85 | $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) |
206a7f9d | 86 | $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 |
35b8af92 | 87 | |
01e5327c CF |
88 | else |
89 | $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) | |
206a7f9d | 90 | INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -verbose 2 |
01e5327c CF |
91 | $(MKDIR_P) dist/.background |
92 | $(INSTALL) contrib/macdeploy/background.png dist/.background | |
93 | $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store | |
94 | cd dist; $(LN_S) /Applications Applications | |
95 | $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist | |
96 | endif | |
35b8af92 CF |
97 | |
98 | if TARGET_DARWIN | |
31127f31 | 99 | appbundle: $(OSX_APP_BUILT) |
35b8af92 CF |
100 | deploy: $(OSX_DMG) |
101 | endif | |
102 | if TARGET_WINDOWS | |
103 | deploy: $(BITCOIN_WIN_INSTALLER) | |
104 | endif | |
105 | ||
106 | if USE_LCOV | |
107 | ||
108 | baseline.info: | |
109 | $(LCOV) -c -i -d $(abs_builddir)/src -o $@ | |
110 | ||
111 | baseline_filtered.info: baseline.info | |
112 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
113 | ||
114 | leveldb_baseline.info: baseline_filtered.info | |
115 | $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@ | |
116 | ||
117 | leveldb_baseline_filtered.info: leveldb_baseline.info | |
118 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
119 | ||
120 | baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info | |
121 | $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ | |
122 | ||
123 | test_bitcoin.info: baseline_filtered_combined.info | |
124 | $(MAKE) -C src/ check | |
125 | $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@ | |
126 | $(LCOV) -z -d $(abs_builddir)/src | |
127 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
128 | ||
129 | test_bitcoin_filtered.info: test_bitcoin.info | |
130 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
131 | ||
132 | block_test.info: test_bitcoin_filtered.info | |
95fa14da | 133 | $(MKDIR_P) qa/tmp |
f1f72e53 | 134 | -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 |
35b8af92 CF |
135 | $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@ |
136 | $(LCOV) -z -d $(abs_builddir)/src | |
137 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
138 | ||
139 | block_test_filtered.info: block_test.info | |
140 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
141 | ||
142 | test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info | |
143 | $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ | |
144 | ||
145 | total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info | |
146 | $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt | |
147 | ||
148 | test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info | |
149 | $(GENHTML) -s $< -o $(@D) | |
150 | @touch $@ | |
151 | ||
152 | total.coverage/.dirstamp: total_coverage.info | |
153 | $(GENHTML) -s $< -o $(@D) | |
154 | @touch $@ | |
155 | ||
156 | cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp | |
157 | ||
158 | endif | |
159 | ||
160 | if USE_COMPARISON_TOOL | |
161 | check-local: | |
95fa14da | 162 | $(MKDIR_P) qa/tmp |
a67eef17 | 163 | @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1 |
35b8af92 CF |
164 | endif |
165 | ||
cb4bdd18 | 166 | EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) |
35b8af92 | 167 | |
13d3adb6 | 168 | CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) |
35b8af92 | 169 | |
31127f31 | 170 | .INTERMEDIATE: $(COVERAGE_INFO) |
35b8af92 CF |
171 | |
172 | clean-local: | |
13d3adb6 | 173 | rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP) |