1# 2# Copyright (C) 2006 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17# Select a combo based on the compiler being used. 18# 19# Inputs: 20# combo_target -- prefix for final variables (HOST_ or TARGET_) 21# combo_2nd_arch_prefix -- it's defined if this is loaded for the 2nd arch. 22# 23 24# Build a target string like "linux-arm" or "darwin-x86". 25combo_os_arch := $($(combo_target)OS)-$($(combo_target)$(combo_2nd_arch_prefix)ARCH) 26 27combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target) 28 29# Set reasonable defaults for the various variables 30 31$(combo_var_prefix)CC := $(CC) 32$(combo_var_prefix)CXX := $(CXX) 33$(combo_var_prefix)AR := $(AR) 34$(combo_var_prefix)STRIP := $(STRIP) 35 36$(combo_var_prefix)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar 37$(combo_var_prefix)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing 38$(combo_var_prefix)GLOBAL_CPPFLAGS := 39$(combo_var_prefix)GLOBAL_LDFLAGS := 40$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD 41$(combo_var_prefix)GLOBAL_LD_DIRS := 42 43$(combo_var_prefix)EXECUTABLE_SUFFIX := 44$(combo_var_prefix)SHLIB_SUFFIX := .so 45$(combo_var_prefix)JNILIB_SUFFIX := $($(combo_var_prefix)SHLIB_SUFFIX) 46$(combo_var_prefix)STATIC_LIB_SUFFIX := .a 47 48# Now include the combo for this specific target. 49include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk 50