blob: 3247e54ab2fe1325b6500f59c7c5cff4f5c2aa5e [file] [log] [blame]
Ian Rogersafd9acc2014-06-17 08:21:54 -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
Igor Murashkin37743352014-11-13 14:38:00 -080017ifndef ART_ANDROID_COMMON_PATH_MK
18ART_ANDROID_COMMON_PATH_MK := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070019
20include art/build/Android.common.mk
Colin Cross31963602016-08-30 16:18:42 -070021include art/build/Android.common_build.mk
Ian Rogersafd9acc2014-06-17 08:21:54 -070022
23# Directory used for dalvik-cache on device.
24ART_TARGET_DALVIK_CACHE_DIR := /data/dalvik-cache
25
26# Directory used for gtests on device.
Andreas Gampe1fe5e5c2014-07-11 21:14:35 -070027# $(TARGET_OUT_DATA_NATIVE_TESTS) will evaluate to the nativetest directory in the target part on
28# the host, so we can strip everything but the directory to find out whether it is "nativetest" or
29# "nativetest64."
30ART_TARGET_NATIVETEST_DIR := /data/$(notdir $(TARGET_OUT_DATA_NATIVE_TESTS))/art
31
Ian Rogersafd9acc2014-06-17 08:21:54 -070032ART_TARGET_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art
33
34# Directory used for oat tests on device.
35ART_TARGET_TEST_DIR := /data/art-test
36ART_TARGET_TEST_OUT := $(TARGET_OUT_DATA)/art-test
37
Brian Carlstromab00b7a2015-06-19 22:05:35 -070038# core.oat location on the device.
Ian Rogersafd9acc2014-06-17 08:21:54 -070039TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$(DEX2OAT_TARGET_ARCH)/core.oat
40ifdef TARGET_2ND_ARCH
412ND_TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core.oat
42endif
43
Andreas Gampe63fc30e2014-10-24 21:58:16 -070044CORE_OAT_SUFFIX := .oat
45
Brian Carlstromab00b7a2015-06-19 22:05:35 -070046# core.oat locations under the out directory.
Andreas Gampe63fc30e2014-10-24 21:58:16 -070047HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070048ifneq ($(HOST_PREFER_32_BIT),true)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700492ND_HOST_CORE_OAT_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070050endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070051HOST_CORE_OAT_OUTS :=
52TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070053ifdef TARGET_2ND_ARCH
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700542ND_TARGET_CORE_OAT_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070055endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070056TARGET_CORE_OAT_OUTS :=
57
58CORE_IMG_SUFFIX := .art
Ian Rogersafd9acc2014-06-17 08:21:54 -070059
Brian Carlstromab00b7a2015-06-19 22:05:35 -070060# core.art locations under the out directory.
Andreas Gampe63fc30e2014-10-24 21:58:16 -070061HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(ART_HOST_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070062ifneq ($(HOST_PREFER_32_BIT),true)
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700632ND_HOST_CORE_IMG_OUT_BASE := $(HOST_OUT_JAVA_LIBRARIES)/$(2ND_ART_HOST_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070064endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070065HOST_CORE_IMG_OUTS :=
66TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$(DEX2OAT_TARGET_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070067ifdef TARGET_2ND_ARCH
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700682ND_TARGET_CORE_IMG_OUT_BASE := $(ART_TARGET_TEST_OUT)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)/core
Ian Rogersafd9acc2014-06-17 08:21:54 -070069endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -070070TARGET_CORE_IMG_OUTS :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070071
72# Oat location of core.art.
73HOST_CORE_IMG_LOCATION := $(HOST_OUT_JAVA_LIBRARIES)/core.art
74TARGET_CORE_IMG_LOCATION := $(ART_TARGET_TEST_OUT)/core.art
75
76# Jar files for core.art.
Ian Rogersafd9acc2014-06-17 08:21:54 -070077HOST_CORE_DEX_LOCATIONS := $(foreach jar,$(HOST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar)
Nicolas Geoffrayd8959612015-12-27 15:46:35 +000078ifeq ($(ART_TEST_ANDROID_ROOT),)
Ian Rogersafd9acc2014-06-17 08:21:54 -070079TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_JARS),/$(DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar)
Nicolas Geoffrayd8959612015-12-27 15:46:35 +000080else
81TARGET_CORE_DEX_LOCATIONS := $(foreach jar,$(TARGET_CORE_JARS),$(ART_TEST_ANDROID_ROOT)/framework/$(jar).jar)
82endif
Ian Rogersafd9acc2014-06-17 08:21:54 -070083
84HOST_CORE_DEX_FILES := $(foreach jar,$(HOST_CORE_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar)
85TARGET_CORE_DEX_FILES := $(foreach jar,$(TARGET_CORE_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar), ,COMMON)/javalib.jar)
Sebastien Hertz19ac0272015-02-24 17:39:50 +010086
Richard Uhlerc5a00042016-07-01 13:10:56 -070087ART_HOST_DEX_DEPENDENCIES := $(foreach jar,$(HOST_CORE_JARS),$(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar)
88ART_TARGET_DEX_DEPENDENCIES := $(foreach jar,$(TARGET_CORE_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar)
89
Alex Light49948e92016-08-11 15:35:28 -070090ART_CORE_SHARED_LIBRARIES := libjavacore libopenjdk libopenjdkjvm libopenjdkjvmti
Alex Light7b497ee2017-05-25 09:54:15 -070091ART_CORE_SHARED_DEBUG_LIBRARIES := libopenjdkd libopenjdkjvmd libopenjdkjvmtid
Richard Uhlerc5a00042016-07-01 13:10:56 -070092ART_HOST_SHARED_LIBRARY_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION))
Alex Light7b497ee2017-05-25 09:54:15 -070093ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(ART_HOST_OUT_SHARED_LIBRARIES)/$(lib)$(ART_HOST_SHLIB_EXTENSION))
Richard Uhlerc5a00042016-07-01 13:10:56 -070094ifdef HOST_2ND_ARCH
95ART_HOST_SHARED_LIBRARY_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(2ND_HOST_OUT_SHARED_LIBRARIES)/$(lib).so)
Alex Light7b497ee2017-05-25 09:54:15 -070096ART_HOST_SHARED_LIBRARY_DEBUG_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(2ND_HOST_OUT_SHARED_LIBRARIES)/$(lib).so)
Richard Uhlerc5a00042016-07-01 13:10:56 -070097endif
98
99ART_TARGET_SHARED_LIBRARY_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(TARGET_OUT_SHARED_LIBRARIES)/$(lib).so)
Alex Light7b497ee2017-05-25 09:54:15 -0700100ART_TARGET_SHARED_LIBRARY_DEBUG_DEPENDENCIES := $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(TARGET_OUT_SHARED_LIBRARIES)/$(lib).so)
Richard Uhlerc5a00042016-07-01 13:10:56 -0700101ifdef TARGET_2ND_ARCH
102ART_TARGET_SHARED_LIBRARY_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_LIBRARIES), $(2ND_TARGET_OUT_SHARED_LIBRARIES)/$(lib).so)
Alex Light7b497ee2017-05-25 09:54:15 -0700103ART_TARGET_SHARED_LIBRARY_DEBUG_DEPENDENCIES += $(foreach lib,$(ART_CORE_SHARED_DEBUG_LIBRARIES), $(2ND_TARGET_OUT_SHARED_LIBRARIES)/$(lib).so)
Richard Uhlerc5a00042016-07-01 13:10:56 -0700104endif
105
Colin Cross02a73352016-09-13 16:47:02 -0700106ART_CORE_DEBUGGABLE_EXECUTABLES := \
Colin Cross31963602016-08-30 16:18:42 -0700107 dex2oat \
Calin Juravle36eb3132017-01-13 16:32:38 -0800108 dexoptanalyzer \
Colin Cross31963602016-08-30 16:18:42 -0700109 imgdiag \
110 oatdump \
111 patchoat \
112 profman \
113
Colin Cross02a73352016-09-13 16:47:02 -0700114ART_CORE_EXECUTABLES := \
115 dalvikvm \
116 dexlist \
117
Colin Cross31963602016-08-30 16:18:42 -0700118# Depend on the -target or -host phony targets generated by the build system
119# for each module
Colin Cross02a73352016-09-13 16:47:02 -0700120ART_TARGET_EXECUTABLES :=
Colin Cross31963602016-08-30 16:18:42 -0700121ifneq ($(ART_BUILD_TARGET_NDEBUG),false)
Colin Cross02a73352016-09-13 16:47:02 -0700122ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES) $(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)-target)
Colin Cross31963602016-08-30 16:18:42 -0700123endif
124ifneq ($(ART_BUILD_TARGET_DEBUG),false)
Colin Cross02a73352016-09-13 16:47:02 -0700125ART_TARGET_EXECUTABLES += $(foreach name,$(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)d-target)
Colin Cross31963602016-08-30 16:18:42 -0700126endif
127
Colin Cross02a73352016-09-13 16:47:02 -0700128ART_HOST_EXECUTABLES :=
Colin Cross31963602016-08-30 16:18:42 -0700129ifneq ($(ART_BUILD_HOST_NDEBUG),false)
Colin Cross02a73352016-09-13 16:47:02 -0700130ART_HOST_EXECUTABLES += $(foreach name,$(ART_CORE_EXECUTABLES) $(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)-host)
Colin Cross31963602016-08-30 16:18:42 -0700131endif
132ifneq ($(ART_BUILD_HOST_DEBUG),false)
Colin Cross02a73352016-09-13 16:47:02 -0700133ART_HOST_EXECUTABLES += $(foreach name,$(ART_CORE_DEBUGGABLE_EXECUTABLES),$(name)d-host)
Colin Cross31963602016-08-30 16:18:42 -0700134endif
135
Igor Murashkin37743352014-11-13 14:38:00 -0800136endif # ART_ANDROID_COMMON_PATH_MK