Carl Shapiro | 7b21670 | 2011-06-17 15:09:26 -0700 | [diff] [blame] | 1 | # |
| 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 Sbirlea | 37c19bc | 2013-07-29 09:38:31 -0700 | [diff] [blame] | 17 | ifndef ANDROID_COMMON_MK |
| 18 | ANDROID_COMMON_MK = true |
| 19 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 20 | ART_TARGET_SUPPORTED_ARCH := arm arm64 mips x86 x86_64 |
| 21 | ART_HOST_SUPPORTED_ARCH := x86 x86_64 |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 22 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 23 | ifeq (,$(filter $(TARGET_ARCH),$(ART_TARGET_SUPPORTED_ARCH))) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 24 | $(warning unsupported TARGET_ARCH=$(TARGET_ARCH)) |
| 25 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 26 | ifeq (,$(filter $(HOST_ARCH),$(ART_HOST_SUPPORTED_ARCH))) |
| 27 | $(warning unsupported HOST_ARCH=$(HOST_ARCH)) |
Brian Carlstrom | afdc560 | 2014-06-10 15:42:52 -0700 | [diff] [blame] | 28 | endif |
Andreas Gampe | 922141a | 2014-03-12 10:59:26 -0700 | [diff] [blame] | 29 | |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 30 | # Primary vs. secondary |
| 31 | 2ND_TARGET_ARCH := $(TARGET_2ND_ARCH) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 32 | TARGET_INSTRUCTION_SET_FEATURES := $(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) |
| 33 | 2ND_TARGET_INSTRUCTION_SET_FEATURES := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 34 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 35 | ifneq ($(filter %64,$(TARGET_ARCH)),) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 36 | ART_PHONY_TEST_TARGET_SUFFIX := 64 |
| 37 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := 32 |
Brian Carlstrom | 0e12bdc | 2014-05-14 17:44:28 -0700 | [diff] [blame] | 38 | ART_TARGET_ARCH_32 := $(TARGET_2ND_ARCH) |
| 39 | ART_TARGET_ARCH_64 := $(TARGET_ARCH) |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 40 | else |
| 41 | # TODO: ??? |
| 42 | $(error Do not know what to do with this multi-target configuration!) |
| 43 | endif |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 44 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 45 | ART_PHONY_TEST_TARGET_SUFFIX := 32 |
| 46 | 2ND_ART_PHONY_TEST_TARGET_SUFFIX := |
Brian Carlstrom | 0e12bdc | 2014-05-14 17:44:28 -0700 | [diff] [blame] | 47 | ART_TARGET_ARCH_32 := $(TARGET_ARCH) |
| 48 | ART_TARGET_ARCH_64 := |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 49 | endif |
Brian Carlstrom | 47a0d5a | 2011-10-12 21:20:05 -0700 | [diff] [blame] | 50 | |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 51 | ART_HOST_SHLIB_EXTENSION := $(HOST_SHLIB_SUFFIX) |
| 52 | ART_HOST_SHLIB_EXTENSION ?= .so |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 53 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 54 | ART_PHONY_TEST_HOST_SUFFIX := 32 |
| 55 | 2ND_ART_PHONY_TEST_HOST_SUFFIX := |
| 56 | ART_HOST_ARCH_32 := x86 |
| 57 | ART_HOST_ARCH_64 := |
| 58 | ART_HOST_ARCH := x86 |
| 59 | 2ND_ART_HOST_ARCH := |
| 60 | 2ND_HOST_ARCH := |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 61 | ART_HOST_LIBRARY_PATH := $(HOST_LIBRARY_PATH) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 62 | ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES) |
| 63 | 2ND_ART_HOST_OUT_SHARED_LIBRARIES := |
Elliott Hughes | 1d3f114 | 2011-09-13 12:00:00 -0700 | [diff] [blame] | 64 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 65 | ART_PHONY_TEST_HOST_SUFFIX := 64 |
| 66 | 2ND_ART_PHONY_TEST_HOST_SUFFIX := 32 |
| 67 | ART_HOST_ARCH_32 := x86 |
| 68 | ART_HOST_ARCH_64 := x86_64 |
| 69 | ART_HOST_ARCH := x86_64 |
| 70 | 2ND_ART_HOST_ARCH := x86 |
| 71 | 2ND_HOST_ARCH := x86 |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 72 | ART_HOST_LIBRARY_PATH := $(HOST_LIBRARY_PATH) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 73 | ART_HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT_SHARED_LIBRARIES) |
| 74 | 2ND_ART_HOST_OUT_SHARED_LIBRARIES := $(2ND_HOST_OUT_SHARED_LIBRARIES) |
Elliott Hughes | 1d3f114 | 2011-09-13 12:00:00 -0700 | [diff] [blame] | 75 | endif |
Andreas Gampe | 2fe0792 | 2014-04-21 07:50:39 -0700 | [diff] [blame] | 76 | |
Dragos Sbirlea | 37c19bc | 2013-07-29 09:38:31 -0700 | [diff] [blame] | 77 | endif # ANDROID_COMMON_MK |