aboutsummaryrefslogtreecommitdiff
path: root/depends/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'depends/Makefile')
-rw-r--r--depends/Makefile50
1 files changed, 49 insertions, 1 deletions
diff --git a/depends/Makefile b/depends/Makefile
index 52a9a14e56..306e7f93c9 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -184,6 +184,7 @@ meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hos
include funcs.mk
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
+final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in)
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
rm -rf $(@D)
@@ -249,6 +250,52 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
$< > $@
touch $@
+ifeq ($(host),$(build))
+ crosscompiling=FALSE
+else
+ crosscompiling=TRUE
+endif
+
+$(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
+ @mkdir -p $(@D)
+ sed -e 's|@depends_crosscompiling@|$(crosscompiling)|' \
+ -e 's|@host_system_name@|$($(host_os)_cmake_system_name)|' \
+ -e 's|@host_system_version@|$($(host_os)_cmake_system_version)|' \
+ -e 's|@host_arch@|$(host_arch)|' \
+ -e 's|@CC@|$(host_CC)|' \
+ -e 's|@CXX@|$(host_CXX)|' \
+ -e 's|@OSX_SDK@|$(OSX_SDK)|' \
+ -e 's|@AR@|$(host_AR)|' \
+ -e 's|@RANLIB@|$(host_RANLIB)|' \
+ -e 's|@STRIP@|$(host_STRIP)|' \
+ -e 's|@OBJCOPY@|$(host_OBJCOPY)|' \
+ -e 's|@OBJDUMP@|$(host_OBJDUMP)|' \
+ -e 's|@depends_prefix@|$(host_prefix)|' \
+ -e 's|@CFLAGS@|$(strip $(host_CFLAGS))|' \
+ -e 's|@CFLAGS_RELEASE@|$(strip $(host_release_CFLAGS))|' \
+ -e 's|@CFLAGS_DEBUG@|$(strip $(host_debug_CFLAGS))|' \
+ -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS))|' \
+ -e 's|@CXXFLAGS_RELEASE@|$(strip $(host_release_CXXFLAGS))|' \
+ -e 's|@CXXFLAGS_DEBUG@|$(strip $(host_debug_CXXFLAGS))|' \
+ -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS))|' \
+ -e 's|@CPPFLAGS_RELEASE@|$(strip $(host_release_CPPFLAGS))|' \
+ -e 's|@CPPFLAGS_DEBUG@|$(strip $(host_debug_CPPFLAGS))|' \
+ -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS))|' \
+ -e 's|@LDFLAGS_RELEASE@|$(strip $(host_release_LDFLAGS))|' \
+ -e 's|@LDFLAGS_DEBUG@|$(strip $(host_debug_LDFLAGS))|' \
+ -e 's|@qt_packages@|$(qt_packages_)|' \
+ -e 's|@qrencode_packages@|$(qrencode_packages_)|' \
+ -e 's|@zmq_packages@|$(zmq_packages_)|' \
+ -e 's|@wallet_packages@|$(wallet_packages_)|' \
+ -e 's|@bdb_packages@|$(bdb_packages_)|' \
+ -e 's|@sqlite_packages@|$(sqlite_packages_)|' \
+ -e 's|@upnp_packages@|$(upnp_packages_)|' \
+ -e 's|@natpmp_packages@|$(natpmp_packages_)|' \
+ -e 's|@usdt_packages@|$(usdt_packages_)|' \
+ -e 's|@no_harden@|$(NO_HARDEN)|' \
+ -e 's|@multiprocess@|$(MULTIPROCESS)|' \
+ $< > $@
+ touch $@
define check_or_remove_cached
mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \
@@ -270,6 +317,7 @@ check-sources:
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
$(host_prefix)/share/config.site: check-packages
+$(host_prefix)/toolchain.cmake: check-packages
check-packages: check-sources
@@ -279,7 +327,7 @@ clean-all: clean
clean:
@rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log
-install: check-packages $(host_prefix)/share/config.site
+install: check-packages $(host_prefix)/share/config.site $(host_prefix)/toolchain.cmake
download-one: check-sources $(all_sources)