Changeset View
Changeset View
Standalone View
Standalone View
depends/hosts/default.mk
default_host_CC = $(host_toolchain)gcc | default_host_CC = $(host_toolchain)gcc | ||||
default_host_CXX = $(host_toolchain)g++ | default_host_CXX = $(host_toolchain)g++ | ||||
default_host_AR = $(host_toolchain)ar | default_host_AR = $(host_toolchain)ar | ||||
default_host_RANLIB = $(host_toolchain)ranlib | default_host_RANLIB = $(host_toolchain)ranlib | ||||
default_host_STRIP = $(host_toolchain)strip | default_host_STRIP = $(host_toolchain)strip | ||||
default_host_LIBTOOL = $(host_toolchain)libtool | default_host_LIBTOOL = $(host_toolchain)libtool | ||||
default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool | default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool | ||||
default_host_OTOOL = $(host_toolchain)otool | default_host_OTOOL = $(host_toolchain)otool | ||||
default_host_NM = $(host_toolchain)nm | default_host_NM = $(host_toolchain)nm | ||||
default_host_OBJCOPY = $(host_toolchain)objcopy | |||||
default_host_WINDRES = $(host_toolchain)windres | default_host_WINDRES = $(host_toolchain)windres | ||||
define add_host_tool_func | define add_host_tool_func | ||||
ifneq ($(filter $(origin $1),undefined default),) | ifneq ($(filter $(origin $1),undefined default),) | ||||
# Do not consider the well-known var $1 if it is undefined or is taking a value | # Do not consider the well-known var $1 if it is undefined or is taking a value | ||||
# that is predefined by "make" (e.g. the make variable "CC" has a predefined | # that is predefined by "make" (e.g. the make variable "CC" has a predefined | ||||
# value of "cc") | # value of "cc") | ||||
$(host_os)_$1?=$$(default_host_$1) | $(host_os)_$1?=$$(default_host_$1) | ||||
Show All 9 Lines | |||||
define add_host_flags_func | define add_host_flags_func | ||||
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1) | $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) | ||||
$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) | $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) | ||||
host_$1 = $$($(host_arch)_$(host_os)_$1) | host_$1 = $$($(host_arch)_$(host_os)_$1) | ||||
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) | host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) | ||||
endef | endef | ||||
$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL WINDRES,$(eval $(call add_host_tool_func,$(tool)))) | $(foreach tool,CC CXX AR RANLIB STRIP LIBTOOL NM OBJCOPY OTOOL INSTALL_NAME_TOOL WINDRES,$(eval $(call add_host_tool_func,$(tool)))) | ||||
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) | $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) |