1 # Select a combo based on the compiler being used.
4 # combo_target -- prefix for final variables (HOST_ or TARGET_)
7 # $(combo_target)OS -- standard name for this host (LINUX, DARWIN, etc.)
8 # $(combo_target)ARCH -- standard name for process architecture (powerpc, x86, etc.)
9 # $(combo_target)GLOBAL_CFLAGS -- C compiler flags to use for everything
10 # $(combo_target)RELEASE_CFLAGS -- additional C compiler flags for release builds
11 # $(combo_target)GLOBAL_ARFLAGS -- flags to use for static linking everything
12 # $(combo_target)SHLIB_SUFFIX -- suffix of shared libraries
14 # Build a target string like "linux-arm" or "darwin-x86".
15 combo_os_arch := $($(combo_target)OS)-$($(combo_target)ARCH)
23 $(combo_target)BINDER_MINI := 0
25 $(combo_target)HAVE_EXCEPTIONS := 0
26 $(combo_target)HAVE_UNIX_FILE_PATH := 1
27 $(combo_target)HAVE_WINDOWS_FILE_PATH := 0
28 $(combo_target)HAVE_RTTI := 1
29 $(combo_target)HAVE_CALL_STACKS := 1
30 $(combo_target)HAVE_64BIT_IO := 1
31 $(combo_target)HAVE_CLOCK_TIMERS := 1
32 $(combo_target)HAVE_PTHREAD_RWLOCK := 1
33 $(combo_target)HAVE_STRNLEN := 1
34 $(combo_target)HAVE_STRERROR_R_STRRET := 1
35 $(combo_target)HAVE_STRLCPY := 0
36 $(combo_target)HAVE_STRLCAT := 0
37 $(combo_target)HAVE_KERNEL_MODULES := 0
39 # These flags might (will) be overridden by the target makefiles
40 $(combo_target)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar
41 $(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
42 $(combo_target)GLOBAL_LDFLAGS :=
43 $(combo_target)GLOBAL_ARFLAGS := crs
45 $(combo_target)EXECUTABLE_SUFFIX :=
46 $(combo_target)SHLIB_SUFFIX := .so
47 $(combo_target)JNILIB_SUFFIX := $($(combo_target)SHLIB_SUFFIX)
48 $(combo_target)STATIC_LIB_SUFFIX := .a
50 $(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map
52 # We try to find a target or host specific file for the os/arch specified, and
53 # default to just looking for the os/arch one. This will allow us to define
54 # things separately for targets and hosts that have the same architecture
55 # but need different defines. e.g. target_linux-x86 and host_linux-x86
57 ifneq ($(TARGET_SIMULATOR),true)
58 # Convert the combo_target string to lowercase
59 combo_target_lc := $(shell echo $(combo_target) | tr '[A-Z]' '[a-z]')
61 # form combo makefile name like "<path>/target_linux-x86.make",
62 # "<path>/host_darwin-x86.make", etc.
63 combo_target_os_arch := $(BUILD_COMBOS)/$(combo_target_lc)$(combo_os_arch).mk
65 combo_target_os_arch :=
68 # Now include the combo for this specific target.
69 ifneq ($(wildcard $(combo_target_os_arch)),)
70 include $(combo_target_os_arch)
72 include $(BUILD_COMBOS)/$(combo_os_arch).mk
75 ifneq ($(USE_CCACHE),)
76 ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
77 $(combo_target)CC := $(ccache) $($(combo_target)CC)
78 $(combo_target)CXX := $(ccache) $($(combo_target)CXX)