Ying Wang | db48da7 | 2014-09-13 11:26:39 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2014 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 | # Set up variables and dependency for one odex file |
| 18 | # Input variables: my_2nd_arch_prefix |
| 19 | # Output(modified) variables: built_odex, installed_odex, built_installed_odex |
| 20 | |
| 21 | my_built_odex := $(call get-odex-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE)) |
| 22 | ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION |
| 23 | my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION) |
| 24 | else |
| 25 | my_dex_preopt_image_location := $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION) |
| 26 | endif |
| 27 | my_dex_preopt_image_filename := $(call get-image-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location)) |
| 28 | $(my_built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix) |
| 29 | $(my_built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE)) |
| 30 | $(my_built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location) |
| 31 | $(my_built_odex) : $($(my_2nd_arch_prefix)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \ |
| 32 | $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \ |
| 33 | $(my_dex_preopt_image_filename) |
| 34 | |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 35 | my_installed_odex := $(call get-odex-installed-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE)) |
| 36 | |
David Brazdil | 29441f9 | 2016-09-12 16:43:28 +0100 | [diff] [blame^] | 37 | my_built_vdex := $(patsubst %.odex,%.vdex,$(my_built_odex)) |
| 38 | my_installed_vdex := $(patsubst %.odex,%.vdex,$(my_installed_odex)) |
| 39 | |
Alex Light | 4e358ab | 2016-06-16 14:47:10 -0700 | [diff] [blame] | 40 | $(eval $(call copy-one-file,$(my_built_odex),$(my_installed_odex))) |
David Brazdil | 29441f9 | 2016-09-12 16:43:28 +0100 | [diff] [blame^] | 41 | $(eval $(call copy-one-file,$(my_built_vdex),$(my_installed_vdex))) |
Ying Wang | db48da7 | 2014-09-13 11:26:39 -0700 | [diff] [blame] | 42 | |
| 43 | built_odex += $(my_built_odex) |
David Brazdil | 29441f9 | 2016-09-12 16:43:28 +0100 | [diff] [blame^] | 44 | built_vdex += $(my_built_vdex) |
David Brazdil | 7047016 | 2016-08-25 13:50:15 +0100 | [diff] [blame] | 45 | |
Ying Wang | db48da7 | 2014-09-13 11:26:39 -0700 | [diff] [blame] | 46 | installed_odex += $(my_installed_odex) |
David Brazdil | 29441f9 | 2016-09-12 16:43:28 +0100 | [diff] [blame^] | 47 | installed_vdex += $(my_installed_vdex) |
David Brazdil | 7047016 | 2016-08-25 13:50:15 +0100 | [diff] [blame] | 48 | |
Ying Wang | db48da7 | 2014-09-13 11:26:39 -0700 | [diff] [blame] | 49 | built_installed_odex += $(my_built_odex):$(my_installed_odex) |
David Brazdil | 7047016 | 2016-08-25 13:50:15 +0100 | [diff] [blame] | 50 | built_installed_vdex += $(my_built_vdex):$(my_installed_vdex) |