1#################################### 2# ART boot image installation 3# Input variable: 4# my_boot_image_name: the boot image to install 5# 6#################################### 7 8# Install primary arch vdex files into a shared location, and then symlink them to both the primary 9# and secondary arch directories. 10my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_ARCH)) 11my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v))) 12$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed)) 13 14my_built_vdex_dir := $(dir $(call word-colon,1,$(firstword $(my_vdex_copy_pairs)))) 15my_installed_vdex_dir := $(PRODUCT_OUT)$(dir $(call word-colon,2,$(firstword $(my_vdex_copy_pairs)))) 16 17$(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)% 18 @echo "Install: $@" 19 @rm -f $@ 20 $(copy-file-to-target) 21 mkdir -p $(dir $@)/$(TARGET_ARCH) 22 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH) 23ifdef TARGET_2ND_ARCH 24 mkdir -p $(dir $@)/$(TARGET_2ND_ARCH) 25 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_2ND_ARCH) 26endif 27 28my_dexpreopt_image_extra_deps := $(firstword $(my_installed)) 29 30my_2nd_arch_prefix := 31include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk 32 33ifdef TARGET_2ND_ARCH 34 my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) 35 include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk 36endif 37 38my_2nd_arch_prefix := 39 40 41my_vdex_copy_pairs := 42my_installed := 43my_built_vdex_dir := 44my_installed_vdex_dir := 45my_dexpreopt_image_extra_deps := 46