Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -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 | |
| 17 | DEX2OAT := $(HOST_OUT_EXECUTABLES)/dex2oat$(HOST_EXECUTABLE_SUFFIX) |
| 18 | DEX2OATD := $(HOST_OUT_EXECUTABLES)/dex2oatd$(HOST_EXECUTABLE_SUFFIX) |
| 19 | # TODO: for now, override with debug version for better error reporting |
| 20 | DEX2OAT := $(DEX2OATD) |
| 21 | |
Brian Carlstrom | 78128a6 | 2011-09-15 17:21:19 -0700 | [diff] [blame] | 22 | OATDUMP := $(HOST_OUT_EXECUTABLES)/oatdump$(HOST_EXECUTABLE_SUFFIX) |
| 23 | OATDUMPD := $(HOST_OUT_EXECUTABLES)/oatdumpd$(HOST_EXECUTABLE_SUFFIX) |
| 24 | # TODO: for now, override with debug version for better error reporting |
| 25 | OATDUMP := $(OATDUMPD) |
| 26 | |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 27 | # start of oat reserved address space |
| 28 | OAT_HOST_BASE_ADDRESS := 0x50000000 |
| 29 | OAT_TARGET_BASE_ADDRESS := 0x50000000 |
| 30 | |
| 31 | HOST_BOOT_OAT := $(HOST_OUT_JAVA_LIBRARIES)/boot.oat |
| 32 | TARGET_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. |
| 36 | HOST_BOOT_JARS := core-hostdex |
| 37 | TARGET_BOOT_JARS := core |
| 38 | |
| 39 | HOST_BOOT_DEX := $(foreach jar,$(HOST_BOOT_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 40 | TARGET_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) |