Ian Rogers | afd9acc | 2014-06-17 08:21:54 -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 | |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 17 | ifndef ART_ANDROID_COMMON_PATH_MK |
| 18 | ART_ANDROID_COMMON_PATH_MK := true |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 19 | |
| 20 | include art/build/Android.common.mk |
| 21 | |
| 22 | # Directory used for dalvik-cache on device. |
| 23 | ART_TARGET_DALVIK_CACHE_DIR := /data/dalvik-cache |
| 24 | |
| 25 | # Directory used for gtests on device. |
Andreas Gampe | 1fe5e5c | 2014-07-11 21:14:35 -0700 | [diff] [blame] | 26 | # $(TARGET_OUT_DATA_NATIVE_TESTS) will evaluate to the nativetest directory in the target part on |
| 27 | # the host, so we can strip everything but the directory to find out whether it is "nativetest" or |
| 28 | # "nativetest64." |
| 29 | ART_TARGET_NATIVETEST_DIR := /data/$(notdir $(TARGET_OUT_DATA_NATIVE_TESTS))/art |
| 30 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 31 | ART_TARGET_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art |
| 32 | |
| 33 | # Directory used for oat tests on device. |
| 34 | ART_TARGET_TEST_DIR := /data/art-test |
| 35 | ART_TARGET_TEST_OUT := $(TARGET_OUT_DATA)/art-test |
| 36 | |
| 37 | # Directory used for temporary test files on the host. |
Ian Rogers | 6a6d3c2 | 2014-07-23 08:03:36 -0700 | [diff] [blame] | 38 | ifneq ($(TMPDIR),) |
| 39 | ART_HOST_TEST_DIR := $(TMPDIR)/test-art-$(shell echo $$PPID) |
| 40 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 41 | ART_HOST_TEST_DIR := /tmp/test-art-$(shell echo $$PPID) |
Ian Rogers | 6a6d3c2 | 2014-07-23 08:03:36 -0700 | [diff] [blame] | 42 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 43 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 44 | # core.oat location on the device. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 45 | TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$(DEX2OAT_TARGET_ARCH)/core.oat |
| 46 | ifdef TARGET_2ND_ARCH |
| 47 | 2ND_TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core.oat |
| 48 | endif |
| 49 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 50 | CORE_OAT_SUFFIX := .oat |
| 51 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 52 | # core.oat locations under the out directory. |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 53 | HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 54 | ifneq ($(HOST_PREFER_32_BIT),true) |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 55 | 2ND_HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 56 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 57 | HOST_CORE_OAT_OUTS := |
| 58 | TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 59 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 60 | 2ND_TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 61 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 62 | TARGET_CORE_OAT_OUTS := |
| 63 | |
| 64 | CORE_IMG_SUFFIX := .art |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 65 | |
Brian Carlstrom | ab00b7a | 2015-06-19 22:05:35 -0700 | [diff] [blame] | 66 | # core.art locations under the out directory. |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 67 | HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 68 | ifneq ($(HOST_PREFER_32_BIT),true) |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 69 | 2ND_HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 70 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 71 | HOST_CORE_IMG_OUTS := |
| 72 | TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 73 | ifdef TARGET_2ND_ARCH |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 74 | 2ND_TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 75 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 76 | TARGET_CORE_IMG_OUTS := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 77 | |
| 78 | # Oat location of core.art. |
| 79 | HOST_CORE_IMG_LOCATION := $(HOST_OUT_JAVA_LIBRARIES)/core.art |
| 80 | TARGET_CORE_IMG_LOCATION := $(ART_TARGET_TEST_OUT)/core.art |
| 81 | |
| 82 | # Jar files for core.art. |
Nicolas Geoffray | 958fa02 | 2015-05-14 14:05:34 +0000 | [diff] [blame] | 83 | TARGET_CORE_JARS := core-libart conscrypt okhttp bouncycastle |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 84 | HOST_CORE_JARS := $(addsuffix -hostdex,$(TARGET_CORE_JARS)) |
| 85 | |
| 86 | HOST_CORE_DEX_LOCATIONS := $(foreach jar,$(HOST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 87 | TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_JARS),/$(DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar) |
| 88 | |
| 89 | HOST_CORE_DEX_FILES := $(foreach jar,$(HOST_CORE_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar) |
| 90 | TARGET_CORE_DEX_FILES := $(foreach jar,$(TARGET_CORE_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar), ,COMMON)/javalib.jar) |
Sebastien Hertz | 19ac027 | 2015-02-24 17:39:50 +0100 | [diff] [blame] | 91 | |
| 92 | # Classpath for Jack compilation: we only need core-libart. |
Yohann Roussel | 3048698 | 2015-07-21 16:25:44 +0200 | [diff] [blame] | 93 | HOST_JACK_CLASSPATH_DEPENDENCIES := $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart-hostdex,t,COMMON)/classes.jack |
| 94 | HOST_JACK_CLASSPATH := $(foreach dep,$(HOST_JACK_CLASSPATH_DEPENDENCIES),$(abspath $(dep))) |
| 95 | TARGET_JACK_CLASSPATH_DEPENDENCIES := $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart, ,COMMON)/classes.jack |
| 96 | TARGET_JACK_CLASSPATH := $(foreach dep,$(TARGET_JACK_CLASSPATH_DEPENDENCIES),$(abspath $(dep))) |
Igor Murashkin | 3774335 | 2014-11-13 14:38:00 -0800 | [diff] [blame] | 97 | endif # ART_ANDROID_COMMON_PATH_MK |