blob: 39e78fa4185aa5c56d2c1db0c2f6f7f583d14ba2 [file] [log] [blame]
Carl Shapiro7b216702011-06-17 15:09:26 -07001#
2# Copyright (C) 2011 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
Dragos Sbirlea37c19bc2013-07-29 09:38:31 -070017ifndef ANDROID_COMMON_MK
18ANDROID_COMMON_MK = true
19
Ian Rogersafd9acc2014-06-17 08:21:54 -070020ART_TARGET_SUPPORTED_ARCH := arm arm64 mips x86 x86_64
21ART_HOST_SUPPORTED_ARCH := x86 x86_64
Colin Crossdc781a12014-02-04 16:22:03 -080022
Ian Rogersafd9acc2014-06-17 08:21:54 -070023ifeq (,$(filter $(TARGET_ARCH),$(ART_TARGET_SUPPORTED_ARCH)))
Colin Crossdc781a12014-02-04 16:22:03 -080024$(warning unsupported TARGET_ARCH=$(TARGET_ARCH))
25endif
Ian Rogersafd9acc2014-06-17 08:21:54 -070026ifeq (,$(filter $(HOST_ARCH),$(ART_HOST_SUPPORTED_ARCH)))
27$(warning unsupported HOST_ARCH=$(HOST_ARCH))
Brian Carlstromafdc5602014-06-10 15:42:52 -070028endif
Andreas Gampe922141a2014-03-12 10:59:26 -070029
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070030# Primary vs. secondary
312ND_TARGET_ARCH := $(TARGET_2ND_ARCH)
Ian Rogersafd9acc2014-06-17 08:21:54 -070032TARGET_INSTRUCTION_SET_FEATURES := $(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
332ND_TARGET_INSTRUCTION_SET_FEATURES := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070034ifdef TARGET_2ND_ARCH
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070035 ifneq ($(filter %64,$(TARGET_ARCH)),)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070036 ART_PHONY_TEST_TARGET_SUFFIX := 64
37 2ND_ART_PHONY_TEST_TARGET_SUFFIX := 32
Brian Carlstrom0e12bdc2014-05-14 17:44:28 -070038 ART_TARGET_ARCH_32 := $(TARGET_2ND_ARCH)
39 ART_TARGET_ARCH_64 := $(TARGET_ARCH)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070040 else
41 # TODO: ???
42 $(error Do not know what to do with this multi-target configuration!)
43 endif
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070044else
Nicolas Geoffray7372b762014-11-07 10:10:39 +000045 ifneq ($(filter %64,$(TARGET_ARCH)),)
46 ART_PHONY_TEST_TARGET_SUFFIX := 64
47 2ND_ART_PHONY_TEST_TARGET_SUFFIX :=
48 ART_TARGET_ARCH_32 :=
49 ART_TARGET_ARCH_64 := $(TARGET_ARCH)
50 else
51 ART_PHONY_TEST_TARGET_SUFFIX := 32
52 2ND_ART_PHONY_TEST_TARGET_SUFFIX :=
53 ART_TARGET_ARCH_32 := $(TARGET_ARCH)
54 ART_TARGET_ARCH_64 :=
55 endif
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070056endif
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -070057
Ian Rogers665de8a2014-06-24 21:34:09 -070058ART_HOST_SHLIB_EXTENSION := $(HOST_SHLIB_SUFFIX)
59ART_HOST_SHLIB_EXTENSION ?= .so
Ian Rogersafd9acc2014-06-17 08:21:54 -070060ifeq ($(HOST_PREFER_32_BIT),true)
61 ART_PHONY_TEST_HOST_SUFFIX := 32
62 2ND_ART_PHONY_TEST_HOST_SUFFIX :=
63 ART_HOST_ARCH_32 := x86
64 ART_HOST_ARCH_64 :=
65 ART_HOST_ARCH := x86
66 2ND_ART_HOST_ARCH :=
67 2ND_HOST_ARCH :=
Ian Rogers665de8a2014-06-24 21:34:09 -070068 ART_HOST_LIBRARY_PATH := $(HOST_LIBRARY_PATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -070069 ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES)
70 2ND_ART_HOST_OUT_SHARED_LIBRARIES :=
Elliott Hughes1d3f1142011-09-13 12:00:00 -070071else
Ian Rogersafd9acc2014-06-17 08:21:54 -070072 ART_PHONY_TEST_HOST_SUFFIX := 64
73 2ND_ART_PHONY_TEST_HOST_SUFFIX := 32
74 ART_HOST_ARCH_32 := x86
75 ART_HOST_ARCH_64 := x86_64
76 ART_HOST_ARCH := x86_64
77 2ND_ART_HOST_ARCH := x86
78 2ND_HOST_ARCH := x86
Ian Rogers665de8a2014-06-24 21:34:09 -070079 ART_HOST_LIBRARY_PATH := $(HOST_LIBRARY_PATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -070080 ART_HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT_SHARED_LIBRARIES)
81 2ND_ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES)
Elliott Hughes1d3f1142011-09-13 12:00:00 -070082endif
Andreas Gampe2fe07922014-04-21 07:50:39 -070083
Dragos Sbirlea37c19bc2013-07-29 09:38:31 -070084endif # ANDROID_COMMON_MK