You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 6.4KB

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