From 1dec09b341f61836147d87656aea7f7be02aab6d Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 23 Jul 2014 01:31:30 -0400 Subject: depends: add shared dependency builder See the README's in depends for documentation --- depends/hosts/default.mk | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 depends/hosts/default.mk (limited to 'depends/hosts/default.mk') diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk new file mode 100644 index 0000000000..b9fe5d858a --- /dev/null +++ b/depends/hosts/default.mk @@ -0,0 +1,23 @@ +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_$1=$$($(host_arch)_$(host_os)_$1) +endef + +define add_host_flags_func +$(host_arch)_$(host_os)_$1 += $($(host_os)_$1) +host_$1 = $$($(host_arch)_$(host_os)_$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 LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) -- cgit v1.2.3