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 8.6KB

  1. # Copyright (c) 2013-2016 The Bitcoin Core developers
  2. # Copyright (c) 2014-2018 The Dash Core developers
  3. # Distributed under the MIT software license, see the accompanying
  4. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
  5. ACLOCAL_AMFLAGS = -I build-aux/m4
  6. SUBDIRS = src
  7. if ENABLE_MAN
  8. SUBDIRS += doc/man
  9. endif
  10. .PHONY: deploy FORCE
  11. GZIP_ENV="-9n"
  12. export PYTHONPATH
  13. if BUILD_BITCOIN_LIBS
  14. pkgconfigdir = $(libdir)/pkgconfig
  15. pkgconfig_DATA = libruxcryptoconsensus.pc
  16. endif
  17. BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
  18. BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
  19. BITCOIN_CLI_BIN=$(top_builddir)/src/$(BITCOIN_CLI_NAME)$(EXEEXT)
  20. BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
  21. empty :=
  22. space := $(empty) $(empty)
  23. OSX_APP=RuxCrypto-Qt.app
  24. OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME))
  25. OSX_DMG = $(OSX_VOLNAME).dmg
  26. OSX_BACKGROUND_SVG=background.svg
  27. OSX_BACKGROUND_IMAGE=background.tiff
  28. OSX_BACKGROUND_IMAGE_DPIS=36 72
  29. OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
  30. OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
  31. OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
  32. OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
  33. OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
  34. OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
  35. DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
  36. DIST_CONTRIB = $(top_srcdir)/contrib/ruxcrypto-cli.bash-completion \
  37. $(top_srcdir)/contrib/ruxcrypto-tx.bash-completion \
  38. $(top_srcdir)/contrib/ruxcryptod.bash-completion \
  39. $(top_srcdir)/contrib/init
  40. BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
  41. $(top_srcdir)/contrib/devtools/security-check.py
  42. WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
  43. $(top_srcdir)/share/pixmaps/nsis-header.bmp \
  44. $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
  45. $(top_srcdir)/doc/README_windows.txt
  46. OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
  47. $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_SVG) \
  48. $(OSX_DSSTORE_GEN) \
  49. $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
  50. $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
  51. COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
  52. leveldb_baseline.info test_ruxcrypto_filtered.info total_coverage.info \
  53. baseline_filtered.info rpc_test.info rpc_test_filtered.info \
  54. leveldb_baseline_filtered.info test_ruxcrypto_coverage.info test_ruxcrypto.info
  55. dist-hook:
  56. -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
  57. $(BITCOIN_WIN_INSTALLER): all-recursive
  58. $(MKDIR_P) $(top_builddir)/release
  59. STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
  60. STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
  61. STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
  62. @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
  63. echo error: could not build $@
  64. @echo built $@
  65. $(OSX_APP)/Contents/PkgInfo:
  66. $(MKDIR_P) $(@D)
  67. @echo "APPL????" > $@
  68. $(OSX_APP)/Contents/Resources/empty.lproj:
  69. $(MKDIR_P) $(@D)
  70. @touch $@
  71. $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
  72. $(MKDIR_P) $(@D)
  73. $(INSTALL_DATA) $< $@
  74. $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
  75. $(MKDIR_P) $(@D)
  76. $(INSTALL_DATA) $< $@
  77. $(OSX_APP)/Contents/MacOS/RuxCrypto-Qt: $(BITCOIN_QT_BIN)
  78. $(MKDIR_P) $(@D)
  79. STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
  80. $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:
  81. $(MKDIR_P) $(@D)
  82. echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@
  83. OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
  84. $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
  85. $(OSX_APP)/Contents/MacOS/RuxCrypto-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
  86. osx_volname:
  87. echo $(OSX_VOLNAME) >$@
  88. if BUILD_DARWIN
  89. $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
  90. $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
  91. $(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
  92. sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
  93. $(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
  94. sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@
  95. $(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png
  96. tiffutil -cathidpicheck $^ -out $@
  97. deploydir: $(OSX_DMG)
  98. else
  99. APP_DIST_DIR=$(top_builddir)/dist
  100. APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
  101. $(APP_DIST_DIR)/Applications:
  102. @rm -f $@
  103. @cd $(@D); $(LN_S) /Applications $(@F)
  104. $(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/RuxCrypto-Qt
  105. $(OSX_DMG): $(APP_DIST_EXTRAS)
  106. $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
  107. dpi%.$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_SVG)
  108. sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d $* -p $* | $(IMAGEMAGICK_CONVERT) - $@
  109. OSX_BACKGROUND_IMAGE_DPIFILES := $(foreach dpi,$(OSX_BACKGROUND_IMAGE_DPIS),dpi$(dpi).$(OSX_BACKGROUND_IMAGE))
  110. $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIFILES)
  111. $(MKDIR_P) $(@D)
  112. $(TIFFCP) -c none $(OSX_BACKGROUND_IMAGE_DPIFILES) $@
  113. $(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
  114. $(PYTHON) $< "$@" "$(OSX_VOLNAME)"
  115. $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/RuxCrypto-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
  116. INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
  117. deploydir: $(APP_DIST_EXTRAS)
  118. endif
  119. if TARGET_DARWIN
  120. appbundle: $(OSX_APP_BUILT)
  121. deploy: $(OSX_DMG)
  122. endif
  123. if TARGET_WINDOWS
  124. deploy: $(BITCOIN_WIN_INSTALLER)
  125. endif
  126. $(BITCOIN_QT_BIN): FORCE
  127. $(MAKE) -C src qt/$(@F)
  128. $(BITCOIND_BIN): FORCE
  129. $(MAKE) -C src $(@F)
  130. $(BITCOIN_CLI_BIN): FORCE
  131. $(MAKE) -C src $(@F)
  132. if USE_LCOV
  133. baseline.info:
  134. $(LCOV) -c -i -d $(abs_builddir)/src -o $@
  135. baseline_filtered.info: baseline.info
  136. $(LCOV) -r $< "/usr/include/*" -o $@
  137. leveldb_baseline.info: baseline_filtered.info
  138. $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
  139. leveldb_baseline_filtered.info: leveldb_baseline.info
  140. $(LCOV) -r $< "/usr/include/*" -o $@
  141. baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
  142. $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
  143. test_ruxcrypto.info: baseline_filtered_combined.info
  144. $(MAKE) -C src/ check
  145. $(LCOV) -c -d $(abs_builddir)/src -t test_ruxcrypto -o $@
  146. $(LCOV) -z -d $(abs_builddir)/src
  147. $(LCOV) -z -d $(abs_builddir)/src/leveldb
  148. test_ruxcrypto_filtered.info: test_ruxcrypto.info
  149. $(LCOV) -r $< "/usr/include/*" -o $@
  150. rpc_test.info: test_ruxcrypto_filtered.info
  151. -@TIMEOUT=15 python qa/pull-tester/rpc-tests.py $(EXTENDED_RPC_TESTS)
  152. $(LCOV) -c -d $(abs_builddir)/src --t rpc-tests -o $@
  153. $(LCOV) -z -d $(abs_builddir)/src
  154. $(LCOV) -z -d $(abs_builddir)/src/leveldb
  155. rpc_test_filtered.info: rpc_test.info
  156. $(LCOV) -r $< "/usr/include/*" -o $@
  157. test_ruxcrypto_coverage.info: baseline_filtered_combined.info test_ruxcrypto_filtered.info
  158. $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_ruxcrypto_filtered.info -o $@
  159. total_coverage.info: baseline_filtered_combined.info test_ruxcrypto_filtered.info rpc_test_filtered.info
  160. $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_ruxcrypto_filtered.info -a rpc_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
  161. test_ruxcrypto.coverage/.dirstamp: test_ruxcrypto_coverage.info
  162. $(GENHTML) -s $< -o $(@D)
  163. @touch $@
  164. total.coverage/.dirstamp: total_coverage.info
  165. $(GENHTML) -s $< -o $(@D)
  166. @touch $@
  167. cov: test_ruxcrypto.coverage/.dirstamp total.coverage/.dirstamp
  168. endif
  169. dist_noinst_SCRIPTS = autogen.sh
  170. EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
  171. CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
  172. .INTERMEDIATE: $(COVERAGE_INFO)
  173. DISTCHECK_CONFIGURE_FLAGS = --enable-man
  174. clean-local:
  175. rm -rf coverage_percent.txt test_ruxcrypto.coverage/ total.coverage/ qa/tmp/ cache/ $(OSX_APP)
  176. rm -rf qa/pull-tester/__pycache__