blob: 85f2f3b2d00c0fb34e0a1efed495fbb6ff6f5830 [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
Colin Cross47e384c2019-02-11 14:25:13 -08008# Install primary arch vdex files into a shared location, and then symlink them to both the primary
9# and secondary arch directories.
Nicolas Geoffray269bc742019-02-22 15:33:23 +000010my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_ARCH))
Colin Cross47e384c2019-02-11 14:25:13 -080011my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v)))
12$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
Mathieu Chartiera61acf62017-06-28 18:23:37 -070013
Colin Cross47e384c2019-02-11 14:25:13 -080014my_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))))
bowen_lai4570fdb2017-08-16 16:28:05 +080016
Colin Cross47e384c2019-02-11 14:25:13 -080017$(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)%
bowen_lai4570fdb2017-08-16 16:28:05 +080018 @echo "Install: $@"
bowen_lai4570fdb2017-08-16 16:28:05 +080019 @rm -f $@
Colin Cross47e384c2019-02-11 14:25:13 -080020 $(copy-file-to-target)
21 mkdir -p $(dir $@)/$(TARGET_ARCH)
22 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH)
23ifdef TARGET_2ND_ARCH
24 ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
25 mkdir -p $(dir $@)/$(TARGET_2ND_ARCH)
26 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_2ND_ARCH)
27 endif
28endif
29
30my_dexpreopt_image_extra_deps := $(firstword $(my_installed))
bowen_lai4570fdb2017-08-16 16:28:05 +080031
32my_2nd_arch_prefix :=
Colin Cross47e384c2019-02-11 14:25:13 -080033include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
34
35ifdef TARGET_2ND_ARCH
36 ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
37 my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
38 include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
39 endif
40endif
41
42my_2nd_arch_prefix :=
43
44
45my_vdex_copy_pairs :=
46my_installed :=
47my_built_vdex_dir :=
48my_installed_vdex_dir :=
49my_dexpreopt_image_extra_deps :=