]>
Commit | Line | Data |
---|---|---|
35b8af92 CF |
1 | ACLOCAL_AMFLAGS = -I src/m4 |
2 | SUBDIRS = src | |
3 | .PHONY: deploy | |
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) | |
9 | BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win32-setup$(EXEEXT) | |
10 | ||
11 | OSX_APP=Bitcoin-Qt.app | |
12 | OSX_DMG=Bitcoin-Qt.dmg | |
13 | OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus | |
14 | OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist | |
15 | OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns | |
16 | OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed | |
17 | ||
18 | WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ | |
19 | $(top_srcdir)/share/pixmaps/nsis-header.bmp \ | |
20 | $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ | |
21 | $(top_srcdir)/doc/README_windows.txt | |
22 | ||
23 | OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ | |
24 | $(top_srcdir)/contrib/macdeploy/background.png | |
25 | ||
26 | COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ | |
27 | leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ | |
28 | baseline_filtered.info block_test_filtered.info \ | |
29 | leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info | |
30 | ||
31 | dist-hook: | |
32 | -$(MAKE) -C $(top_distdir)/src/leveldb clean | |
33 | -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf - | |
34 | ||
35 | distcheck-hook: | |
36 | $(MKDIR_P) $(top_distdir)/_build/src/leveldb | |
37 | cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/ | |
38 | -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean | |
39 | ||
40 | distcleancheck: | |
41 | @: | |
42 | ||
43 | $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) | |
44 | $(MAKE) distdir | |
45 | $(MKDIR_P) $(top_builddir)/release | |
46 | $(INSTALL_STRIP_PROGRAM) $(top_builddir)/src/bitcoind$(EXEEXT) $(top_builddir)/release | |
47 | $(INSTALL_STRIP_PROGRAM) $(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) $(top_builddir)/release | |
48 | @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ | |
49 | echo error: could not build $@ | |
50 | ||
51 | $(BITCOIND_BIN): | |
52 | make -C $(top_srcdir)/src bitcoind$(EXEEXT) | |
53 | ||
54 | $(BITCOIN_QT_BIN): | |
55 | make -C $(top_srcdir)/src/qt bitcoin-qt$(EXEEXT) | |
56 | ||
57 | ||
58 | $(OSX_APP)/Contents/PkgInfo: | |
59 | $(MKDIR_P) $(@D) | |
60 | @echo "APPL????" > $@ | |
61 | ||
62 | $(OSX_APP)/Contents/Resources/empty.lproj: | |
63 | $(MKDIR_P) $(@D) | |
64 | @touch $@ | |
65 | ||
66 | $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) | |
67 | $(MKDIR_P) $(@D) | |
68 | $(INSTALL) $< $@ | |
69 | ||
70 | $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) | |
71 | $(MKDIR_P) $(@D) | |
72 | $(INSTALL) $< $@ | |
73 | ||
74 | $(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) | |
75 | $(MKDIR_P) $(@D) | |
76 | $(INSTALL_STRIP_PROGRAM) $< $@ | |
77 | ||
78 | OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ | |
79 | $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ | |
80 | $(OSX_APP)/Contents/MacOS/Bitcoin-Qt | |
81 | ||
82 | $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) | |
83 | $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 | |
35b8af92 CF |
84 | |
85 | ||
86 | if TARGET_DARWIN | |
31127f31 | 87 | appbundle: $(OSX_APP_BUILT) |
35b8af92 CF |
88 | deploy: $(OSX_DMG) |
89 | endif | |
90 | if TARGET_WINDOWS | |
91 | deploy: $(BITCOIN_WIN_INSTALLER) | |
92 | endif | |
93 | ||
94 | if USE_LCOV | |
95 | ||
96 | baseline.info: | |
97 | $(LCOV) -c -i -d $(abs_builddir)/src -o $@ | |
98 | ||
99 | baseline_filtered.info: baseline.info | |
100 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
101 | ||
102 | leveldb_baseline.info: baseline_filtered.info | |
103 | $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@ | |
104 | ||
105 | leveldb_baseline_filtered.info: leveldb_baseline.info | |
106 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
107 | ||
108 | baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info | |
109 | $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ | |
110 | ||
111 | test_bitcoin.info: baseline_filtered_combined.info | |
112 | $(MAKE) -C src/ check | |
113 | $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@ | |
114 | $(LCOV) -z -d $(abs_builddir)/src | |
115 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
116 | ||
117 | test_bitcoin_filtered.info: test_bitcoin.info | |
118 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
119 | ||
120 | block_test.info: test_bitcoin_filtered.info | |
95fa14da | 121 | $(MKDIR_P) qa/tmp |
f1f72e53 | 122 | -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 |
35b8af92 CF |
123 | $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@ |
124 | $(LCOV) -z -d $(abs_builddir)/src | |
125 | $(LCOV) -z -d $(abs_builddir)/src/leveldb | |
126 | ||
127 | block_test_filtered.info: block_test.info | |
128 | $(LCOV) -r $< "/usr/include/*" -o $@ | |
129 | ||
130 | test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info | |
131 | $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ | |
132 | ||
133 | total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info | |
134 | $(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 | |
135 | ||
136 | test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info | |
137 | $(GENHTML) -s $< -o $(@D) | |
138 | @touch $@ | |
139 | ||
140 | total.coverage/.dirstamp: total_coverage.info | |
141 | $(GENHTML) -s $< -o $(@D) | |
142 | @touch $@ | |
143 | ||
144 | cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp | |
145 | ||
146 | endif | |
147 | ||
148 | if USE_COMPARISON_TOOL | |
149 | check-local: | |
95fa14da | 150 | $(MKDIR_P) qa/tmp |
f1f72e53 | 151 | @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) |
35b8af92 CF |
152 | endif |
153 | ||
154 | EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING) | |
155 | ||
31127f31 | 156 | CLEANFILES = $(OSX_DMG) $(OSX_APP) $(BITCOIN_WIN_INSTALLER) |
35b8af92 | 157 | |
31127f31 | 158 | .INTERMEDIATE: $(COVERAGE_INFO) |
35b8af92 CF |
159 | |
160 | clean-local: | |
161 | rm -rf test_bitcoin.coverage/ total.coverage/ |