blob: e027911bc08cb6f5e833561b8d711da0ee42dfbd [file] [log] [blame]
Brian Carlstrom16192862011-09-12 17:50:06 -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
17DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oat$(HOST_EXECUTABLE_SUFFIX)
18DEX2OATD := $(HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX)
19# TODO: for now, override with debug version for better error reporting
20DEX2OAT := $(DEX2OATD)
21
Brian Carlstrom78128a62011-09-15 17:21:19 -070022OATDUMP := $(HOST_OUT_EXECUTABLES)/oatdump$(HOST_EXECUTABLE_SUFFIX)
23OATDUMPD := $(HOST_OUT_EXECUTABLES)/oatdumpd$(HOST_EXECUTABLE_SUFFIX)
24# TODO: for now, override with debug version for better error reporting
25OATDUMP := $(OATDUMPD)
26
Brian Carlstrom16192862011-09-12 17:50:06 -070027# start of oat reserved address space
28OAT_HOST_BASE_ADDRESS := 0x50000000
29OAT_TARGET_BASE_ADDRESS := 0x50000000
30
31HOST_BOOT_OAT := $(HOST_OUT_JAVA_LIBRARIES)/boot.oat
32TARGET_BOOT_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/boot.oat
33
34# TODO: just use libcore for now, not full bootclasspath.
35# eventually need to replace with full list based on DEXPREOPT_BOOT_JARS.
36HOST_BOOT_JARS := core-hostdex
37TARGET_BOOT_JARS := core
38
39HOST_BOOT_DEX := $(foreach jar,$(HOST_BOOT_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar)
40TARGET_BOOT_DEX := $(foreach jar,$(TARGET_BOOT_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar)
41
42# TODO: change DEX2OATD to order-only prerequisite when output is stable
43$(HOST_BOOT_OAT): $(HOST_BOOT_DEX) $(DEX2OAT)
44 @echo "host dex2oat: $@ ($<)"
45 $(hide) $(DEX2OAT) $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_HOST_BASE_ADDRESS)
46
47# TODO: change DEX2OATD to order-only prerequisite when output is stable
48$(TARGET_BOOT_OAT): $(TARGET_BOOT_DEX) $(DEX2OAT)
49 @echo "target dex2oat: $@ ($<)"
50 $(hide) $(DEX2OAT) $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --image=$@ --base=$(OAT_TARGET_BASE_ADDRESS) --strip-prefix=$(PRODUCT_OUT)