blob: edd82df587bed5fa7c5a076370b92032478330c0 [file] [log] [blame]
Brian Carlstromced4bff2013-11-14 23:44:56 -08001####################################
Nicolas Geoffray269bc742019-02-22 15:33:23 +00002# ART boot image installation
3# Input variable:
4# my_boot_image_name: the boot image to install
Brian Carlstromced4bff2013-11-14 23:44:56 -08005#
6####################################
7
Mathieu Chartiera61acf62017-06-28 18:23:37 -07008# We want to install the profile even if we are not using preopt since it is required to generate
9# the image on the device.
Colin Cross47e384c2019-02-11 14:25:13 -080010my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT))
11ALL_DEFAULT_INSTALLED_MODULES += $(my_installed)
Mathieu Chartiera61acf62017-06-28 18:23:37 -070012
Colin Cross47e384c2019-02-11 14:25:13 -080013# Install primary arch vdex files into a shared location, and then symlink them to both the primary
14# and secondary arch directories.
Nicolas Geoffray269bc742019-02-22 15:33:23 +000015my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_ARCH))
Colin Cross47e384c2019-02-11 14:25:13 -080016my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v)))
17$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
Mathieu Chartiera61acf62017-06-28 18:23:37 -070018
Colin Cross47e384c2019-02-11 14:25:13 -080019my_built_vdex_dir := $(dir $(call word-colon,1,$(firstword $(my_vdex_copy_pairs))))
20my_installed_vdex_dir := $(PRODUCT_OUT)$(dir $(call word-colon,2,$(firstword $(my_vdex_copy_pairs))))
bowen_lai4570fdb2017-08-16 16:28:05 +080021
Colin Cross47e384c2019-02-11 14:25:13 -080022$(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)%
bowen_lai4570fdb2017-08-16 16:28:05 +080023 @echo "Install: $@"
bowen_lai4570fdb2017-08-16 16:28:05 +080024 @rm -f $@
Colin Cross47e384c2019-02-11 14:25:13 -080025 $(copy-file-to-target)
26 mkdir -p $(dir $@)/$(TARGET_ARCH)
27 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH)
28ifdef TARGET_2ND_ARCH
29 ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
30 mkdir -p $(dir $@)/$(TARGET_2ND_ARCH)
31 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_2ND_ARCH)
32 endif
33endif
34
35my_dexpreopt_image_extra_deps := $(firstword $(my_installed))
bowen_lai4570fdb2017-08-16 16:28:05 +080036
37my_2nd_arch_prefix :=
Colin Cross47e384c2019-02-11 14:25:13 -080038include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
39
40ifdef TARGET_2ND_ARCH
41 ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
42 my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
43 include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
44 endif
45endif
46
47my_2nd_arch_prefix :=
48
49
50my_vdex_copy_pairs :=
51my_installed :=
52my_built_vdex_dir :=
53my_installed_vdex_dir :=
54my_dexpreopt_image_extra_deps :=