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 17ifndef ART_ANDROID_COMMON_PATH_MK 18ART_ANDROID_COMMON_PATH_MK := true 19 20include art/build/Android.common.mk 21 22# Directory used for dalvik-cache on device. 23ART_TARGET_DALVIK_CACHE_DIR := /data/dalvik-cache 24 25# Directory used for gtests on device. 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." 29ART_TARGET_NATIVETEST_DIR := /data/$(notdir $(TARGET_OUT_DATA_NATIVE_TESTS))/art 30 31ART_TARGET_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art 32 33# Directory used for oat tests on device. 34ART_TARGET_TEST_DIR := /data/art-test 35ART_TARGET_TEST_OUT := $(TARGET_OUT_DATA)/art-test 36 37# Directory used for temporary test files on the host. 38ifneq ($(TMPDIR),) 39ART_HOST_TEST_DIR := $(TMPDIR)/test-art-$(shell echo $$PPID) 40else 41ART_HOST_TEST_DIR := /tmp/test-art-$(shell echo $$PPID) 42endif 43 44# core.oat location on the device. 45TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$(DEX2OAT_TARGET_ARCH)/core.oat 46ifdef TARGET_2ND_ARCH 472ND_TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core.oat 48endif 49 50CORE_OAT_SUFFIX := .oat 51 52# core.oat locations under the out directory. 53HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core 54ifneq ($(HOST_PREFER_32_BIT),true) 552ND_HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core 56endif 57HOST_CORE_OAT_OUTS := 58TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core 59ifdef TARGET_2ND_ARCH 602ND_TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core 61endif 62TARGET_CORE_OAT_OUTS := 63 64CORE_IMG_SUFFIX := .art 65 66# core.art locations under the out directory. 67HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core 68ifneq ($(HOST_PREFER_32_BIT),true) 692ND_HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core 70endif 71HOST_CORE_IMG_OUTS := 72TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core 73ifdef TARGET_2ND_ARCH 742ND_TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core 75endif 76TARGET_CORE_IMG_OUTS := 77 78# Oat location of core.art. 79HOST_CORE_IMG_LOCATION := $(HOST_OUT_JAVA_LIBRARIES)/core.art 80TARGET_CORE_IMG_LOCATION := $(ART_TARGET_TEST_OUT)/core.art 81 82# Jar files for core.art. 83TARGET_CORE_JARS := core-oj core-libart conscrypt okhttp bouncycastle apache-xml 84HOST_CORE_JARS := $(addsuffix -hostdex,$(TARGET_CORE_JARS)) 85 86HOST_CORE_DEX_LOCATIONS := $(foreach jar,$(HOST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) 87ifeq ($(ART_TEST_ANDROID_ROOT),) 88TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_JARS),/$(DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar) 89else 90TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_JARS),$(ART_TEST_ANDROID_ROOT)/framework/$(jar).jar) 91endif 92 93HOST_CORE_DEX_FILES := $(foreach jar,$(HOST_CORE_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar) 94TARGET_CORE_DEX_FILES := $(foreach jar,$(TARGET_CORE_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar), ,COMMON)/javalib.jar) 95 96# Classpath for Jack compilation: we only need core-libart. 97HOST_JACK_CLASSPATH_DEPENDENCIES := $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj-hostdex,t,COMMON)/classes.jack $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart-hostdex,t,COMMON)/classes.jack 98HOST_JACK_CLASSPATH := $(abspath $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj-hostdex,t,COMMON)/classes.jack):$(abspath $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart-hostdex,t,COMMON)/classes.jack) 99TARGET_JACK_CLASSPATH_DEPENDENCIES := $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj, ,COMMON)/classes.jack $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart, ,COMMON)/classes.jack 100TARGET_JACK_CLASSPATH := $(abspath $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj, ,COMMON)/classes.jack):$(abspath $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart, ,COMMON)/classes.jack) 101 102endif # ART_ANDROID_COMMON_PATH_MK 103