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 24ifeq ($(combo_target),HOST_) 25 combo_os_arch := $(HOST_OS) 26else 27 # Build a target string like "linux-arm" or "darwin-x86". 28 combo_os_arch := $($(combo_target)OS)-$($(combo_target)$(combo_2nd_arch_prefix)ARCH) 29endif 30 31combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target) 32 33# Set reasonable defaults for the various variables 34ifeq ($(combo_target),HOST_CROSS_) 35$(KATI_obsolete_var \ 36 $(combo_var_prefix)GLOBAL_ARFLAGS \ 37 $(combo_var_prefix)STATIC_LIB_SUFFIX \ 38 $(combo_var_prefix)transform-shared-lib-to-toc \ 39 ,HOST_CROSS builds are not supported in Make) 40else 41 42$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD --format=gnu 43 44$(combo_var_prefix)STATIC_LIB_SUFFIX := .a 45 46# Now include the combo for this specific target. 47include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk 48 49endif 50