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.5KB

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