mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
b0f692f81e
Github-Pull: #12474 Rebased-From: ac91ea64c2b1daec8fee0bfde443c18cf87595ae Tree-SHA512: 61020cab59532738bc876fc4591923a5b48fee7c5729419bc42654d714cd6cad685e6482e199a17bb57ea97edcd129a15561939d55fa40661d8f051329942bdb
31 lines
1.1 KiB
Makefile
31 lines
1.1 KiB
Makefile
ifneq ($(host),$(build))
|
|
host_toolchain:=$(host)-
|
|
endif
|
|
|
|
default_host_CC = $(host_toolchain)gcc
|
|
default_host_CXX = $(host_toolchain)g++
|
|
default_host_AR = $(host_toolchain)ar
|
|
default_host_RANLIB = $(host_toolchain)ranlib
|
|
default_host_STRIP = $(host_toolchain)strip
|
|
default_host_LIBTOOL = $(host_toolchain)libtool
|
|
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
|
|
default_host_OTOOL = $(host_toolchain)otool
|
|
default_host_NM = $(host_toolchain)nm
|
|
|
|
define add_host_tool_func
|
|
$(host_os)_$1?=$$(default_host_$1)
|
|
$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
|
|
$(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1)
|
|
host_$1=$$($(host_arch)_$(host_os)_$1)
|
|
endef
|
|
|
|
define add_host_flags_func
|
|
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
|
|
$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
|
|
host_$1 = $$($(host_arch)_$(host_os)_$1)
|
|
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
|
|
endef
|
|
|
|
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
|
|
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
|