blob: 916320b60b9577bcbeef34ed47d775419a89f0a7 [file] [log] [blame]
Jean-Baptiste Queru9b4a8122010-02-23 12:36:56 -08001#
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
The Android Open Source Project88b60792009-03-03 19:28:42 -080017# Select a combo based on the compiler being used.
18#
19# Inputs:
20# combo_target -- prefix for final variables (HOST_ or TARGET_)
21#
The Android Open Source Project88b60792009-03-03 19:28:42 -080022
23# Build a target string like "linux-arm" or "darwin-x86".
24combo_os_arch := $($(combo_target)OS)-$($(combo_target)ARCH)
25
Jean-Baptiste Queru9b4a8122010-02-23 12:36:56 -080026# Set reasonable defaults for the various variables
The Android Open Source Project88b60792009-03-03 19:28:42 -080027
Jean-Baptiste Queru9b4a8122010-02-23 12:36:56 -080028$(combo_target)CC := $(CC)
29$(combo_target)CXX := $(CXX)
30$(combo_target)AR := $(AR)
The Android Open Source Project88b60792009-03-03 19:28:42 -080031
32$(combo_target)BINDER_MINI := 0
33
34$(combo_target)HAVE_EXCEPTIONS := 0
35$(combo_target)HAVE_UNIX_FILE_PATH := 1
36$(combo_target)HAVE_WINDOWS_FILE_PATH := 0
37$(combo_target)HAVE_RTTI := 1
38$(combo_target)HAVE_CALL_STACKS := 1
39$(combo_target)HAVE_64BIT_IO := 1
40$(combo_target)HAVE_CLOCK_TIMERS := 1
41$(combo_target)HAVE_PTHREAD_RWLOCK := 1
42$(combo_target)HAVE_STRNLEN := 1
43$(combo_target)HAVE_STRERROR_R_STRRET := 1
44$(combo_target)HAVE_STRLCPY := 0
45$(combo_target)HAVE_STRLCAT := 0
46$(combo_target)HAVE_KERNEL_MODULES := 0
47
The Android Open Source Project88b60792009-03-03 19:28:42 -080048$(combo_target)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar
The Android Open Source Project88b60792009-03-03 19:28:42 -080049$(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
Erik Gillingc12c5182009-07-17 15:57:10 -070050$(combo_target)GLOBAL_LDFLAGS :=
Sriram Raman5bbd2292009-10-07 16:27:38 -070051$(combo_target)GLOBAL_ARFLAGS := crsP
The Android Open Source Project88b60792009-03-03 19:28:42 -080052
53$(combo_target)EXECUTABLE_SUFFIX :=
54$(combo_target)SHLIB_SUFFIX := .so
55$(combo_target)JNILIB_SUFFIX := $($(combo_target)SHLIB_SUFFIX)
56$(combo_target)STATIC_LIB_SUFFIX := .a
57
58$(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map
59
The Android Open Source Project88b60792009-03-03 19:28:42 -080060# Now include the combo for this specific target.
Jean-Baptiste Queru9b4a8122010-02-23 12:36:56 -080061include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
The Android Open Source Project88b60792009-03-03 19:28:42 -080062
63ifneq ($(USE_CCACHE),)
64 ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
65 $(combo_target)CC := $(ccache) $($(combo_target)CC)
66 $(combo_target)CXX := $(ccache) $($(combo_target)CXX)
67 ccache =
68endif