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 | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 27 | # start of image reserved address space |
| 28 | IMG_HOST_BASE_ADDRESS := 0x60000000 |
| 29 | IMG_TARGET_BASE_ADDRESS := 0x60000000 |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 30 | |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 31 | ######################################################################## |
| 32 | # A smaller libcore only oat file |
| 33 | HOST_CORE_JARS := core-hostdex |
| 34 | TARGET_CORE_JARS := core |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 35 | |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 36 | HOST_CORE_DEX := $(foreach jar,$(HOST_CORE_JARS), $(HOST_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 37 | TARGET_CORE_DEX := $(foreach jar,$(TARGET_CORE_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 38 | |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 39 | HOST_CORE_OAT := $(HOST_OUT_JAVA_LIBRARIES)/core.oat |
| 40 | TARGET_CORE_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/core.oat |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 41 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 42 | HOST_CORE_IMG := $(HOST_OUT_JAVA_LIBRARIES)/core.art |
| 43 | TARGET_CORE_IMG := $(TARGET_OUT_JAVA_LIBRARIES)/core.art |
| 44 | |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 45 | # TODO: change DEX2OATD to order-only prerequisite when output is stable |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 46 | $(HOST_CORE_OAT): $(HOST_CORE_DEX) $(DEX2OAT) |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 47 | @echo "host dex2oat: $@ ($<)" |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 48 | $(hide) $(DEX2OAT) -Xms16m -Xmx16m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(HOST_CORE_IMG) --base=$(IMG_HOST_BASE_ADDRESS) |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 49 | |
| 50 | # TODO: change DEX2OATD to order-only prerequisite when output is stable |
| 51 | $(TARGET_CORE_OAT): $(TARGET_CORE_DEX) $(DEX2OAT) |
| 52 | @echo "target dex2oat: $@ ($<)" |
Brian Carlstrom | 58ae941 | 2011-10-04 00:56:06 -0700 | [diff] [blame] | 53 | $(hide) $(DEX2OAT) -Xms32m -Xmx32m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(TARGET_CORE_IMG) --base=$(IMG_TARGET_BASE_ADDRESS) --host-prefix=$(PRODUCT_OUT) |
Brian Carlstrom | 27ec961 | 2011-09-19 20:20:38 -0700 | [diff] [blame] | 54 | |
| 55 | ######################################################################## |
| 56 | # The full system boot classpath |
| 57 | TARGET_BOOT_JARS := $(subst :, ,$(DEXPREOPT_BOOT_JARS)) |
| 58 | TARGET_BOOT_DEX := $(foreach jar,$(TARGET_BOOT_JARS),$(TARGET_OUT_JAVA_LIBRARIES)/$(jar).jar) |
| 59 | TARGET_BOOT_OAT := $(TARGET_OUT_JAVA_LIBRARIES)/boot.oat |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 60 | TARGET_BOOT_IMG := $(TARGET_OUT_JAVA_LIBRARIES)/boot.art |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 61 | |
| 62 | # TODO: change DEX2OATD to order-only prerequisite when output is stable |
| 63 | $(TARGET_BOOT_OAT): $(TARGET_BOOT_DEX) $(DEX2OAT) |
| 64 | @echo "target dex2oat: $@ ($<)" |
Brian Carlstrom | 58ae941 | 2011-10-04 00:56:06 -0700 | [diff] [blame] | 65 | $(hide) $(DEX2OAT) -Xms256m -Xmx256m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(TARGET_BOOT_IMG) --base=$(IMG_TARGET_BASE_ADDRESS) --host-prefix=$(PRODUCT_OUT) |