Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 1 | ########################################################### |
| 2 | ## Standard rules for copying files that are prebuilt |
| 3 | ## |
| 4 | ## Additional inputs from base_rules.make: |
| 5 | ## None. |
| 6 | ## |
| 7 | ########################################################### |
| 8 | |
Chih-Hung Hsieh | 32427d6 | 2018-04-12 10:55:54 -0700 | [diff] [blame] | 9 | include $(BUILD_SYSTEM)/use_lld_setup.mk |
| 10 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 11 | ifneq ($(LOCAL_PREBUILT_LIBS),) |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 12 | $(call pretty-error,dont use LOCAL_PREBUILT_LIBS anymore) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 13 | endif |
| 14 | ifneq ($(LOCAL_PREBUILT_EXECUTABLES),) |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 15 | $(call pretty-error,dont use LOCAL_PREBUILT_EXECUTABLES anymore) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 16 | endif |
| 17 | ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),) |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 18 | $(call pretty-error,dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 19 | endif |
| 20 | |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 21 | my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32) |
| 22 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 23 | ifdef LOCAL_PREBUILT_MODULE_FILE |
Ying Wang | c0adfb7 | 2014-02-27 14:10:53 -0800 | [diff] [blame] | 24 | my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE) |
Dan Willemsen | 926ee44 | 2018-02-27 23:27:30 +0000 | [diff] [blame] | 25 | else ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) |
| 26 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) |
| 27 | LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := |
| 28 | else ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix) |
| 29 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix)) |
| 30 | LOCAL_SRC_FILES_$(my_32_64_bit_suffix) := |
| 31 | else ifdef LOCAL_SRC_FILES |
| 32 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES) |
| 33 | LOCAL_SRC_FILES := |
| 34 | else ifdef LOCAL_REPLACE_PREBUILT_APK_INSTALLED |
| 35 | # This is handled specially below |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 36 | else |
Dan Willemsen | 926ee44 | 2018-02-27 23:27:30 +0000 | [diff] [blame] | 37 | $(call pretty-error,No source files specified) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 38 | endif |
| 39 | |
Colin Cross | 01e1b8f | 2016-10-27 22:10:55 +0000 | [diff] [blame] | 40 | LOCAL_CHECKED_MODULE := $(my_prebuilt_src_file) |
| 41 | |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 42 | my_strip_module := $(firstword \ |
| 43 | $(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \ |
| 44 | $(LOCAL_STRIP_MODULE)) |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 45 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 46 | ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)) |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 47 | ifeq ($(LOCAL_IS_HOST_MODULE)$(my_strip_module),) |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 48 | # Strip but not try to add debuglink |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 49 | my_strip_module := no_debuglink |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 50 | endif |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 51 | endif |
| 52 | |
| 53 | ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),) |
| 54 | prebuilt_module_is_a_library := true |
| 55 | else |
| 56 | prebuilt_module_is_a_library := |
| 57 | endif |
| 58 | |
| 59 | # Don't install static libraries by default. |
| 60 | ifndef LOCAL_UNINSTALLABLE_MODULE |
| 61 | ifeq (STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)) |
| 62 | LOCAL_UNINSTALLABLE_MODULE := true |
| 63 | endif |
| 64 | endif |
| 65 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 66 | ifeq (JAVA_LIBRARIES,$(LOCAL_IS_HOST_MODULE)$(LOCAL_MODULE_CLASS)$(filter true,$(LOCAL_UNINSTALLABLE_MODULE))) |
| 67 | prebuilt_module_is_dex_javalib := true |
| 68 | else |
| 69 | prebuilt_module_is_dex_javalib := |
| 70 | endif |
| 71 | |
Dario Freni | 924af7d | 2018-08-17 00:56:14 +0100 | [diff] [blame] | 72 | # Run veridex on product, product_services and vendor modules. |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 73 | # We skip it for unbundled app builds where we cannot build veridex. |
| 74 | module_run_appcompat := |
Jeongik Cha | 83c5032 | 2019-01-18 15:09:09 +0900 | [diff] [blame] | 75 | ifeq (true,$(non_system_module)) |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 76 | ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) # ! unbundled app build |
Adrian Roos | 21028b7 | 2019-01-15 18:30:51 +0100 | [diff] [blame] | 77 | ifneq ($(UNSAFE_DISABLE_HIDDENAPI_FLAGS),true) |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 78 | module_run_appcompat := true |
| 79 | endif |
| 80 | endif |
Adrian Roos | 21028b7 | 2019-01-15 18:30:51 +0100 | [diff] [blame] | 81 | endif |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 82 | |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 83 | ifdef LOCAL_COMPRESSED_MODULE |
| 84 | ifneq (true,$(LOCAL_COMPRESSED_MODULE)) |
| 85 | $(call pretty-error, Unknown value for LOCAL_COMPRESSED_MODULE $(LOCAL_COMPRESSED_MODULE)) |
Ying Wang | af9757e | 2014-07-17 21:24:42 -0700 | [diff] [blame] | 86 | endif |
Dan Willemsen | dc1ddfc | 2016-08-05 17:23:33 -0700 | [diff] [blame] | 87 | endif |
Ying Wang | af9757e | 2014-07-17 21:24:42 -0700 | [diff] [blame] | 88 | |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 89 | ifeq ($(LOCAL_MODULE_CLASS),APPS) |
| 90 | ifdef LOCAL_COMPRESSED_MODULE |
| 91 | LOCAL_BUILT_MODULE_STEM := package.apk.gz |
| 92 | else |
| 93 | LOCAL_BUILT_MODULE_STEM := package.apk |
| 94 | endif # LOCAL_COMPRESSED_MODULE |
| 95 | |
| 96 | ifndef LOCAL_INSTALLED_MODULE_STEM |
| 97 | ifdef LOCAL_COMPRESSED_MODULE |
Narayan Kamath | 6a4bd69 | 2017-08-14 10:53:50 +0100 | [diff] [blame] | 98 | PACKAGES.$(LOCAL_MODULE).COMPRESSED := gz |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 99 | LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk.gz |
| 100 | else |
| 101 | LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk |
| 102 | endif # LOCAL_COMPRESSED_MODULE |
| 103 | endif # LOCAL_INSTALLED_MODULE_STEM |
| 104 | |
| 105 | else # $(LOCAL_MODULE_CLASS) != APPS) |
| 106 | ifdef LOCAL_COMPRESSED_MODULE |
| 107 | $(error $(LOCAL_MODULE) : LOCAL_COMPRESSED_MODULE can only be defined for module class APPS) |
| 108 | endif # LOCAL_COMPRESSED_MODULE |
| 109 | endif |
| 110 | |
Colin Cross | 979f9f9 | 2018-06-25 12:33:35 -0700 | [diff] [blame] | 111 | ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module)),) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 112 | ifdef LOCAL_IS_HOST_MODULE |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 113 | $(call pretty-error,Cannot strip/pack host module) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 114 | endif |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 115 | ifeq ($(filter SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 116 | $(call pretty-error,Can strip/pack only shared libraries or executables) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 117 | endif |
| 118 | ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) |
Colin Cross | 8466769 | 2018-06-25 13:20:04 -0700 | [diff] [blame] | 119 | $(call pretty-error,Cannot strip/pack scripts) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 120 | endif |
Colin Cross | 979f9f9 | 2018-06-25 12:33:35 -0700 | [diff] [blame] | 121 | # Set the arch-specific variables to set up the strip rules |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 122 | LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_strip_module) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 123 | include $(BUILD_SYSTEM)/dynamic_binary.mk |
| 124 | built_module := $(linked_module) |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 125 | |
Colin Cross | 979f9f9 | 2018-06-25 12:33:35 -0700 | [diff] [blame] | 126 | else # my_strip_module not true |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 127 | include $(BUILD_SYSTEM)/base_rules.mk |
| 128 | built_module := $(LOCAL_BUILT_MODULE) |
| 129 | |
| 130 | ifdef prebuilt_module_is_a_library |
| 131 | export_includes := $(intermediates)/export_includes |
Dan Willemsen | 05909fa | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 132 | export_cflags := $(foreach d,$(LOCAL_EXPORT_C_INCLUDE_DIRS),-I $(d)) |
Dan Willemsen | 05909fa | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 133 | $(export_includes): PRIVATE_EXPORT_CFLAGS := $(export_cflags) |
Dan Willemsen | ba6a164 | 2016-09-29 12:08:29 -0700 | [diff] [blame] | 134 | $(export_includes): $(LOCAL_EXPORT_C_INCLUDE_DEPS) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 135 | @echo Export includes file: $< -- $@ |
| 136 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
Dan Willemsen | 05909fa | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 137 | ifdef export_cflags |
| 138 | $(hide) echo "$(PRIVATE_EXPORT_CFLAGS)" >$@ |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 139 | else |
| 140 | $(hide) touch $@ |
| 141 | endif |
Dan Willemsen | 05909fa | 2017-03-19 13:22:45 -0700 | [diff] [blame] | 142 | export_cflags := |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 143 | |
Dan Albert | 975e303 | 2017-12-19 11:26:05 -0800 | [diff] [blame] | 144 | include $(BUILD_SYSTEM)/allowed_ndk_types.mk |
| 145 | |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 146 | ifdef LOCAL_SDK_VERSION |
Dan Albert | 4297c39 | 2017-12-19 11:27:39 -0800 | [diff] [blame] | 147 | my_link_type := native:ndk:$(my_ndk_stl_family):$(my_ndk_stl_link_type) |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 148 | else ifdef LOCAL_USE_VNDK |
Jiyong Park | a3fb158 | 2017-08-16 18:28:12 +0900 | [diff] [blame] | 149 | _name := $(patsubst %.vendor,%,$(LOCAL_MODULE)) |
| 150 | ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),) |
| 151 | ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),) |
| 152 | my_link_type := native:vndk |
| 153 | else |
| 154 | my_link_type := native:vndk_private |
| 155 | endif |
| 156 | else |
| 157 | my_link_type := native:vendor |
| 158 | endif |
Jiyong Park | 5dc3475 | 2018-08-28 12:32:45 +0900 | [diff] [blame] | 159 | else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(LOCAL_MODULE_PATH)),) |
| 160 | my_link_type := native:recovery |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 161 | else |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 162 | my_link_type := native:platform |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 163 | endif |
Dan Willemsen | b097fbe | 2016-06-07 14:25:14 -0700 | [diff] [blame] | 164 | |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 165 | # TODO: check dependencies of prebuilt files |
| 166 | my_link_deps := |
| 167 | |
| 168 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) |
| 169 | my_common := |
| 170 | include $(BUILD_SYSTEM)/link_type.mk |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 171 | endif # prebuilt_module_is_a_library |
| 172 | |
Logan Chien | 0e53d88 | 2018-11-06 17:32:40 +0800 | [diff] [blame] | 173 | # Check prebuilt ELF binaries. |
| 174 | include $(BUILD_SYSTEM)/check_elf_file.mk |
| 175 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 176 | # The real dependency will be added after all Android.mks are loaded and the install paths |
| 177 | # of the shared libraries are determined. |
| 178 | ifdef LOCAL_INSTALLED_MODULE |
| 179 | ifdef LOCAL_SHARED_LIBRARIES |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 180 | my_shared_libraries := $(LOCAL_SHARED_LIBRARIES) |
| 181 | # Extra shared libraries introduced by LOCAL_CXX_STL. |
| 182 | include $(BUILD_SYSTEM)/cxx_stl_setup.mk |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 183 | ifdef LOCAL_USE_VNDK |
Colin Cross | 8fb525d | 2018-09-06 16:25:22 -0700 | [diff] [blame] | 184 | my_shared_libraries := $(foreach l,$(my_shared_libraries),\ |
| 185 | $(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l))) |
Dan Willemsen | 9d2b328 | 2017-04-07 20:58:43 -0700 | [diff] [blame] | 186 | endif |
Ying Wang | 58f462f | 2014-02-25 18:26:29 -0800 | [diff] [blame] | 187 | $(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \ |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 188 | $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 189 | endif |
| 190 | endif |
| 191 | |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 192 | # We need to enclose the above export_includes and my_built_shared_libraries in |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 193 | # "my_strip_module not true" because otherwise the rules are defined in dynamic_binary.mk. |
| 194 | endif # my_strip_module not true |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 195 | |
Dan Willemsen | 9f95665 | 2016-10-21 15:04:12 -0700 | [diff] [blame] | 196 | ifeq ($(NATIVE_COVERAGE),true) |
Dan Willemsen | 0f90908 | 2017-02-10 00:07:17 -0800 | [diff] [blame] | 197 | ifneq (,$(strip $(LOCAL_PREBUILT_COVERAGE_ARCHIVE))) |
| 198 | $(eval $(call copy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(intermediates)/$(LOCAL_MODULE).gcnodir)) |
| 199 | ifneq ($(LOCAL_UNINSTALLABLE_MODULE),true) |
| 200 | ifdef LOCAL_IS_HOST_MODULE |
| 201 | my_coverage_path := $($(my_prefix)OUT_COVERAGE)/$(patsubst $($(my_prefix)OUT)/%,%,$(my_module_path)) |
| 202 | else |
| 203 | my_coverage_path := $(TARGET_OUT_COVERAGE)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path)) |
| 204 | endif |
Dan Willemsen | ba9badf | 2017-11-20 12:45:48 -0800 | [diff] [blame] | 205 | my_coverage_path := $(my_coverage_path)/$(patsubst %.so,%,$(my_installed_module_stem)).gcnodir |
Dan Willemsen | 0f90908 | 2017-02-10 00:07:17 -0800 | [diff] [blame] | 206 | $(eval $(call copy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(my_coverage_path))) |
| 207 | $(LOCAL_BUILT_MODULE): $(my_coverage_path) |
| 208 | endif |
| 209 | else |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 210 | # Coverage information is needed when static lib is a dependency of another |
| 211 | # coverage-enabled module. |
| 212 | ifeq (STATIC_LIBRARIES, $(LOCAL_MODULE_CLASS)) |
| 213 | GCNO_ARCHIVE := $(LOCAL_MODULE).gcnodir |
| 214 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_OBJECTS := |
| 215 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_WHOLE_STATIC_LIBRARIES := |
Dan Willemsen | 9f95665 | 2016-10-21 15:04:12 -0700 | [diff] [blame] | 216 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_PREFIX := $(my_prefix) |
| 217 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_2ND_ARCH_VAR_PREFIX := $(LOCAL_2ND_ARCH_VAR_PREFIX) |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 218 | $(intermediates)/$(GCNO_ARCHIVE) : |
| 219 | $(transform-o-to-static-lib) |
| 220 | endif |
Dan Willemsen | 9f95665 | 2016-10-21 15:04:12 -0700 | [diff] [blame] | 221 | endif |
Dan Willemsen | 0f90908 | 2017-02-10 00:07:17 -0800 | [diff] [blame] | 222 | endif |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame] | 223 | |
Ying Wang | f0534c2 | 2014-04-15 11:12:21 -0700 | [diff] [blame] | 224 | ifeq ($(LOCAL_MODULE_CLASS),APPS) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 225 | PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) |
| 226 | |
Dan Willemsen | 048f56d | 2016-06-18 20:43:51 -0700 | [diff] [blame] | 227 | my_extract_apk := $(strip $(LOCAL_EXTRACT_APK)) |
| 228 | |
Ying Wang | 43f7a32 | 2014-11-17 16:56:04 -0800 | [diff] [blame] | 229 | # Select dpi-specific source |
| 230 | ifdef LOCAL_DPI_VARIANTS |
Ying Wang | 6068658 | 2014-12-10 12:40:09 -0800 | [diff] [blame] | 231 | my_dpi := $(firstword $(filter $(LOCAL_DPI_VARIANTS),$(PRODUCT_AAPT_PREF_CONFIG) $(PRODUCT_AAPT_PREBUILT_DPI))) |
Ying Wang | 43f7a32 | 2014-11-17 16:56:04 -0800 | [diff] [blame] | 232 | ifdef my_dpi |
| 233 | ifdef LOCAL_DPI_FILE_STEM |
| 234 | my_prebuilt_dpi_file_stem := $(LOCAL_DPI_FILE_STEM) |
| 235 | else |
| 236 | my_prebuilt_dpi_file_stem := $(LOCAL_MODULE)_%.apk |
| 237 | endif |
| 238 | my_prebuilt_src_file := $(dir $(my_prebuilt_src_file))$(subst %,$(my_dpi),$(my_prebuilt_dpi_file_stem)) |
Dan Willemsen | 048f56d | 2016-06-18 20:43:51 -0700 | [diff] [blame] | 239 | |
| 240 | ifneq ($(strip $(LOCAL_EXTRACT_DPI_APK)),) |
| 241 | my_extract_apk := $(subst %,$(my_dpi),$(LOCAL_EXTRACT_DPI_APK)) |
| 242 | endif # LOCAL_EXTRACT_DPI_APK |
Ying Wang | 43f7a32 | 2014-11-17 16:56:04 -0800 | [diff] [blame] | 243 | endif # my_dpi |
| 244 | endif # LOCAL_DPI_VARIANTS |
| 245 | |
Dan Willemsen | 048f56d | 2016-06-18 20:43:51 -0700 | [diff] [blame] | 246 | ifdef my_extract_apk |
| 247 | my_extracted_apk := $(intermediates)/extracted.apk |
| 248 | |
| 249 | $(my_extracted_apk): PRIVATE_EXTRACT := $(my_extract_apk) |
| 250 | $(my_extracted_apk): $(my_prebuilt_src_file) |
| 251 | @echo Extract APK: $@ |
| 252 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
| 253 | $(hide) unzip -p $< $(PRIVATE_EXTRACT) >$@ |
| 254 | |
| 255 | my_prebuilt_src_file := $(my_extracted_apk) |
| 256 | my_extracted_apk := |
| 257 | my_extract_apk := |
Mathieu Chartier | 55eabd5 | 2017-09-15 13:40:48 -0700 | [diff] [blame] | 258 | ifeq ($(PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK),true) |
| 259 | # If the product property is set, always preopt for extracted modules to prevent executing out of |
| 260 | # the APK. |
| 261 | my_preopt_for_extracted_apk := true |
| 262 | endif |
Dan Willemsen | 048f56d | 2016-06-18 20:43:51 -0700 | [diff] [blame] | 263 | endif |
| 264 | |
Narayan Kamath | bbcdc07 | 2017-08-22 15:47:08 +0100 | [diff] [blame] | 265 | dex_preopt_profile_src_file := $(my_prebuilt_src_file) |
| 266 | |
Ying Wang | 96bcad4 | 2014-04-17 13:38:04 -0700 | [diff] [blame] | 267 | rs_compatibility_jni_libs := |
| 268 | include $(BUILD_SYSTEM)/install_jni_libs.mk |
| 269 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 270 | ifeq ($(LOCAL_CERTIFICATE),EXTERNAL) |
| 271 | # The magic string "EXTERNAL" means this package will be signed with |
| 272 | # the default dev key throughout the build process, but we expect |
| 273 | # the final package to be signed with a different key. |
| 274 | # |
| 275 | # This can be used for packages where we don't have access to the |
| 276 | # keys, but want the package to be predexopt'ed. |
| 277 | LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE) |
| 278 | PACKAGES.$(LOCAL_MODULE).EXTERNAL_KEY := 1 |
| 279 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 280 | $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 281 | $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 282 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 283 | endif |
| 284 | ifeq ($(LOCAL_CERTIFICATE),) |
Ying Wang | f0534c2 | 2014-04-15 11:12:21 -0700 | [diff] [blame] | 285 | # It is now a build error to add a prebuilt .apk without |
| 286 | # specifying a key for it. |
| 287 | $(error No LOCAL_CERTIFICATE specified for prebuilt "$(my_prebuilt_src_file)") |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 288 | else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 289 | # The magic string "PRESIGNED" means this package is already checked |
| 290 | # signed with its release key. |
| 291 | # |
| 292 | # By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be |
| 293 | # mentioned in apkcerts.txt (with certificate set to "PRESIGNED") |
| 294 | # but the dexpreopt process will not try to re-sign the app. |
| 295 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED |
| 296 | PACKAGES := $(PACKAGES) $(LOCAL_MODULE) |
| 297 | else |
| 298 | # If this is not an absolute certificate, assign it to a generic one. |
| 299 | ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) |
| 300 | LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) |
| 301 | endif |
| 302 | |
| 303 | PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 304 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 305 | PACKAGES := $(PACKAGES) $(LOCAL_MODULE) |
| 306 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 307 | $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 308 | $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 309 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 310 | endif |
| 311 | |
Jeongik Cha | b2c4bb7 | 2018-12-17 14:45:15 +0900 | [diff] [blame] | 312 | include $(BUILD_SYSTEM)/app_certificate_validate.mk |
| 313 | |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 314 | # Disable dex-preopt of prebuilts to save space, if requested. |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 315 | ifndef LOCAL_DEX_PREOPT |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 316 | ifeq ($(DONT_DEXPREOPT_PREBUILTS),true) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 317 | LOCAL_DEX_PREOPT := false |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 318 | endif |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 319 | endif |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 320 | |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 321 | # If the module is a compressed module, we don't pre-opt it because its final |
| 322 | # installation location will be the data partition. |
| 323 | ifdef LOCAL_COMPRESSED_MODULE |
| 324 | LOCAL_DEX_PREOPT := false |
| 325 | endif |
| 326 | |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 327 | my_dex_jar := $(my_prebuilt_src_file) |
| 328 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 329 | ####################################### |
| 330 | # defines built_odex along with rule to install odex |
| 331 | include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk |
| 332 | ####################################### |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 333 | ifneq ($(LOCAL_REPLACE_PREBUILT_APK_INSTALLED),) |
| 334 | # There is a replacement for the prebuilt .apk we can install without any processing. |
| 335 | $(built_module) : $(LOCAL_REPLACE_PREBUILT_APK_INSTALLED) |
| 336 | $(transform-prebuilt-to-target) |
Ying Wang | b7d33c0 | 2016-03-15 16:28:57 -0700 | [diff] [blame] | 337 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 338 | else # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED |
| 339 | # Sign and align non-presigned .apks. |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 340 | # The embedded prebuilt jni to uncompress. |
Ying Wang | 226eb92 | 2015-06-01 19:19:57 -0700 | [diff] [blame] | 341 | ifeq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 342 | # For PRESIGNED apks we must uncompress every .so file: |
| 343 | # even if the .so file isn't for the current TARGET_ARCH, |
| 344 | # we can't strip the file. |
Colin Cross | 0e8a2ee | 2018-10-09 10:17:55 -0700 | [diff] [blame] | 345 | embedded_prebuilt_jni_libs := |
Ying Wang | 226eb92 | 2015-06-01 19:19:57 -0700 | [diff] [blame] | 346 | endif |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 347 | ifndef embedded_prebuilt_jni_libs |
| 348 | # No LOCAL_PREBUILT_JNI_LIBS, uncompress all. |
Colin Cross | 0e8a2ee | 2018-10-09 10:17:55 -0700 | [diff] [blame] | 349 | embedded_prebuilt_jni_libs := |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 350 | endif |
| 351 | $(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs) |
| 352 | |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 353 | ifdef LOCAL_COMPRESSED_MODULE |
| 354 | $(built_module) : $(MINIGZIP) |
| 355 | endif |
| 356 | |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 357 | ifeq ($(module_run_appcompat),true) |
Dan Willemsen | b73ccb7 | 2018-09-17 14:36:37 -0700 | [diff] [blame] | 358 | $(built_module) : $(appcompat-files) |
Dario Freni | 716e9b6 | 2018-07-31 15:29:13 +0100 | [diff] [blame] | 359 | $(LOCAL_BUILT_MODULE): PRIVATE_INSTALLED_MODULE := $(LOCAL_INSTALLED_MODULE) |
Dario Freni | 1ecc925 | 2018-07-13 16:44:28 +0100 | [diff] [blame] | 360 | endif |
| 361 | |
Colin Cross | 53c8f97 | 2018-09-28 16:19:42 -0700 | [diff] [blame] | 362 | ifneq ($(BUILD_PLATFORM_ZIP),) |
| 363 | $(built_module) : .KATI_IMPLICIT_OUTPUTS := $(dir $(LOCAL_BUILT_MODULE))package.dex.apk |
| 364 | endif |
Dan Willemsen | 07b7357 | 2019-01-07 13:58:37 -0800 | [diff] [blame] | 365 | ifneq ($(LOCAL_CERTIFICATE),PRESIGNED) |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 366 | ifdef LOCAL_DEX_PREOPT |
| 367 | $(built_module) : PRIVATE_STRIP_SCRIPT := $(intermediates)/strip.sh |
| 368 | $(built_module) : $(intermediates)/strip.sh |
Colin Cross | ded0aec | 2019-01-17 16:22:04 -0800 | [diff] [blame] | 369 | $(built_module) : | $(DEXPREOPT_STRIP_DEPS) |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 370 | $(built_module) : .KATI_DEPFILE := $(built_module).d |
| 371 | endif |
Dan Willemsen | 07b7357 | 2019-01-07 13:58:37 -0800 | [diff] [blame] | 372 | endif |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 373 | $(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(ZIP2ZIP) $(SIGNAPK_JAR) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 374 | $(transform-prebuilt-to-target) |
Colin Cross | 0e8a2ee | 2018-10-09 10:17:55 -0700 | [diff] [blame] | 375 | $(uncompress-prebuilt-embedded-jni-libs) |
Nicolas Geoffray | 3972a47 | 2018-01-09 11:46:30 +0000 | [diff] [blame] | 376 | ifeq (true, $(LOCAL_UNCOMPRESS_DEX)) |
Nicolas Geoffray | b06c30b | 2017-09-19 11:51:45 +0000 | [diff] [blame] | 377 | $(uncompress-dexs) |
Nicolas Geoffray | 3972a47 | 2018-01-09 11:46:30 +0000 | [diff] [blame] | 378 | endif # LOCAL_UNCOMPRESS_DEX |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 379 | ifdef LOCAL_DEX_PREOPT |
| 380 | ifneq ($(BUILD_PLATFORM_ZIP),) |
| 381 | @# Keep a copy of apk with classes.dex unstripped |
| 382 | $(hide) cp -f $@ $(dir $@)package.dex.apk |
| 383 | endif # BUILD_PLATFORM_ZIP |
| 384 | endif # LOCAL_DEX_PREOPT |
Kenny Root | dff3755 | 2015-04-15 12:09:32 -0700 | [diff] [blame] | 385 | ifneq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 386 | @# Only strip out files if we can re-sign the package. |
Dario Freni | 1ecc925 | 2018-07-13 16:44:28 +0100 | [diff] [blame] | 387 | # Run appcompat before stripping the classes.dex file. |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 388 | ifeq ($(module_run_appcompat),true) |
Dario Freni | 716e9b6 | 2018-07-31 15:29:13 +0100 | [diff] [blame] | 389 | ifeq ($(LOCAL_USE_AAPT2),true) |
| 390 | $(call appcompat-header, aapt2) |
| 391 | else |
| 392 | $(appcompat-header) |
| 393 | endif |
Dario Freni | 1ecc925 | 2018-07-13 16:44:28 +0100 | [diff] [blame] | 394 | $(run-appcompat) |
David Brazdil | 825770e | 2018-07-31 11:31:30 +0100 | [diff] [blame] | 395 | endif # module_run_appcompat |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 396 | ifdef LOCAL_DEX_PREOPT |
Dan Willemsen | 07b7357 | 2019-01-07 13:58:37 -0800 | [diff] [blame] | 397 | mv -f $@ $@.tmp |
| 398 | $(PRIVATE_STRIP_SCRIPT) $@.tmp $@ |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 399 | endif # LOCAL_DEX_PREOPT |
Kenny Root | dff3755 | 2015-04-15 12:09:32 -0700 | [diff] [blame] | 400 | $(sign-package) |
Alex Klyubin | 5b826ac | 2015-12-04 10:07:41 -0800 | [diff] [blame] | 401 | # No need for align-package because sign-package takes care of alignment |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 402 | else # LOCAL_CERTIFICATE == PRESIGNED |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 403 | $(align-package) |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 404 | endif # LOCAL_CERTIFICATE |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 405 | ifdef LOCAL_COMPRESSED_MODULE |
| 406 | $(compress-package) |
| 407 | endif # LOCAL_COMPRESSED_MODULE |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 408 | endif # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 409 | |
Ying Wang | 36142f6 | 2014-05-21 16:13:33 -0700 | [diff] [blame] | 410 | |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 411 | ############################### |
| 412 | ## Install split apks. |
| 413 | ifdef LOCAL_PACKAGE_SPLITS |
Narayan Kamath | 7c20510 | 2017-08-07 12:31:17 +0100 | [diff] [blame] | 414 | ifdef LOCAL_COMPRESSED_MODULE |
| 415 | $(error $(LOCAL_MODULE): LOCAL_COMPRESSED_MODULE is not currently supported for split installs) |
| 416 | endif # LOCAL_COMPRESSED_MODULE |
| 417 | |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 418 | # LOCAL_PACKAGE_SPLITS is a list of apks to be installed. |
Dan Willemsen | f72308a | 2017-05-15 23:38:04 -0700 | [diff] [blame] | 419 | built_apk_splits := $(addprefix $(intermediates)/,$(notdir $(LOCAL_PACKAGE_SPLITS))) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 420 | installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS))) |
| 421 | |
Alex Klyubin | 5b826ac | 2015-12-04 10:07:41 -0800 | [diff] [blame] | 422 | # Rules to sign the split apks. |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 423 | my_src_dir := $(sort $(dir $(LOCAL_PACKAGE_SPLITS))) |
| 424 | ifneq (1,$(words $(my_src_dir))) |
| 425 | $(error You must put all the split source apks in the same folder: $(LOCAL_PACKAGE_SPLITS)) |
| 426 | endif |
| 427 | my_src_dir := $(LOCAL_PATH)/$(my_src_dir) |
| 428 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 429 | $(built_apk_splits) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 430 | $(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 431 | $(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
Dan Willemsen | f72308a | 2017-05-15 23:38:04 -0700 | [diff] [blame] | 432 | $(built_apk_splits) : $(intermediates)/%.apk : $(my_src_dir)/%.apk |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 433 | $(copy-file-to-new-target) |
| 434 | $(sign-package) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 435 | |
| 436 | # Rules to install the split apks. |
Dan Willemsen | f72308a | 2017-05-15 23:38:04 -0700 | [diff] [blame] | 437 | $(installed_apk_splits) : $(my_module_path)/%.apk : $(intermediates)/%.apk |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 438 | @echo "Install: $@" |
| 439 | $(copy-file-to-new-target) |
| 440 | |
| 441 | # Register the additional built and installed files. |
| 442 | ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits) |
| 443 | ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \ |
Dan Willemsen | f72308a | 2017-05-15 23:38:04 -0700 | [diff] [blame] | 444 | $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(intermediates)/$(notdir $(s)):$(my_module_path)/$(notdir $(s))) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 445 | |
| 446 | # Make sure to install the splits when you run "make <module_name>". |
Colin Cross | 3388670 | 2016-09-20 16:01:28 -0700 | [diff] [blame] | 447 | $(my_all_targets): $(installed_apk_splits) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 448 | |
| 449 | endif # LOCAL_PACKAGE_SPLITS |
| 450 | |
Ying Wang | da36635 | 2016-03-15 17:05:52 -0700 | [diff] [blame] | 451 | else ifeq ($(prebuilt_module_is_dex_javalib),true) # ! LOCAL_MODULE_CLASS != APPS |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 452 | my_dex_jar := $(my_prebuilt_src_file) |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 453 | # This is a target shared library, i.e. a jar with classes.dex. |
| 454 | ####################################### |
| 455 | # defines built_odex along with rule to install odex |
| 456 | include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk |
| 457 | ####################################### |
| 458 | ifdef LOCAL_DEX_PREOPT |
| 459 | ifneq ($(dexpreopt_boot_jar_module),) # boot jar |
| 460 | # boot jar's rules are defined in dex_preopt.mk |
| 461 | dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar |
| 462 | $(built_module) : $(dexpreopted_boot_jar) |
| 463 | $(call copy-file-to-target) |
Dan Willemsen | 08420cb | 2016-03-01 22:04:57 -0800 | [diff] [blame] | 464 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 465 | # For libart boot jars, we don't have .odex files. |
| 466 | else # ! boot jar |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 467 | |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 468 | $(built_module): PRIVATE_STRIP_SCRIPT := $(intermediates)/strip.sh |
| 469 | $(built_module): $(intermediates)/strip.sh |
Colin Cross | ded0aec | 2019-01-17 16:22:04 -0800 | [diff] [blame] | 470 | $(built_module): | $(DEXPREOPT_STRIP_DEPS) |
Colin Cross | 6db5b0e | 2018-11-16 21:26:33 -0800 | [diff] [blame] | 471 | $(built_module): .KATI_DEPFILE := $(built_module).d |
| 472 | $(built_module): $(my_prebuilt_src_file) |
| 473 | $(PRIVATE_STRIP_SCRIPT) $< $@ |
| 474 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 475 | endif # boot jar |
| 476 | else # ! LOCAL_DEX_PREOPT |
| 477 | $(built_module) : $(my_prebuilt_src_file) |
| 478 | $(call copy-file-to-target) |
| 479 | endif # LOCAL_DEX_PREOPT |
| 480 | |
| 481 | else # ! prebuilt_module_is_dex_javalib |
Tom Cherry | fc97764 | 2018-06-13 14:51:05 -0700 | [diff] [blame] | 482 | ifneq ($(filter init%rc,$(notdir $(LOCAL_INSTALLED_MODULE)))$(filter %/etc/init,$(dir $(LOCAL_INSTALLED_MODULE))),) |
| 483 | $(eval $(call copy-init-script-file-checked,$(my_prebuilt_src_file),$(built_module))) |
| 484 | else ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 485 | $(built_module) : $(my_prebuilt_src_file) |
| 486 | $(transform-prebuilt-to-target-strip-comments) |
| 487 | else |
Tom Cherry | fc97764 | 2018-06-13 14:51:05 -0700 | [diff] [blame] | 488 | $(built_module) : $(my_prebuilt_src_file) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 489 | $(transform-prebuilt-to-target) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 490 | endif |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 491 | ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) |
Dan Willemsen | 08420cb | 2016-03-01 22:04:57 -0800 | [diff] [blame] | 492 | $(hide) chmod +x $@ |
| 493 | endif |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 494 | endif # ! prebuilt_module_is_dex_javalib |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 495 | |
Ying Wang | 8c89b4b | 2016-02-22 15:54:27 -0800 | [diff] [blame] | 496 | ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) |
| 497 | my_src_jar := $(my_prebuilt_src_file) |
Colin Cross | 941b682 | 2017-03-29 13:53:29 -0700 | [diff] [blame] | 498 | |
| 499 | ifdef LOCAL_IS_HOST_MODULE |
| 500 | # for host java libraries deps should be in the common dir, so we make a copy in |
| 501 | # the common dir. |
| 502 | common_classes_jar := $(intermediates.COMMON)/classes.jar |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 503 | common_header_jar := $(intermediates.COMMON)/classes-header.jar |
Colin Cross | 941b682 | 2017-03-29 13:53:29 -0700 | [diff] [blame] | 504 | |
Colin Cross | 96476c1 | 2017-04-06 09:56:19 -0700 | [diff] [blame] | 505 | $(common_classes_jar): PRIVATE_MODULE := $(LOCAL_MODULE) |
Colin Cross | d2e778f | 2017-04-14 15:14:33 -0700 | [diff] [blame] | 506 | $(common_classes_jar): PRIVATE_PREFIX := $(my_prefix) |
Colin Cross | 941b682 | 2017-03-29 13:53:29 -0700 | [diff] [blame] | 507 | |
| 508 | $(common_classes_jar) : $(my_src_jar) |
| 509 | $(transform-prebuilt-to-target) |
| 510 | |
Colin Cross | 7dc9043 | 2017-09-26 16:17:24 -0700 | [diff] [blame] | 511 | ifneq ($(TURBINE_ENABLED),false) |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 512 | $(common_header_jar) : $(my_src_jar) |
| 513 | $(transform-prebuilt-to-target) |
Colin Cross | 7dc9043 | 2017-09-26 16:17:24 -0700 | [diff] [blame] | 514 | endif |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 515 | |
Colin Cross | 941b682 | 2017-03-29 13:53:29 -0700 | [diff] [blame] | 516 | else # !LOCAL_IS_HOST_MODULE |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 517 | # for target java libraries, the LOCAL_BUILT_MODULE is in a product-specific dir, |
| 518 | # while the deps should be in the common dir, so we make a copy in the common dir. |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 519 | common_classes_jar := $(intermediates.COMMON)/classes.jar |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 520 | common_header_jar := $(intermediates.COMMON)/classes-header.jar |
Colin Cross | 950f1ef | 2017-04-05 15:30:42 -0700 | [diff] [blame] | 521 | common_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 522 | common_javalib_jar := $(intermediates.COMMON)/javalib.jar |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 523 | |
Colin Cross | d2e778f | 2017-04-14 15:14:33 -0700 | [diff] [blame] | 524 | $(common_classes_jar) $(common_classes_pre_proguard_jar) $(common_javalib_jar): PRIVATE_MODULE := $(LOCAL_MODULE) |
| 525 | $(common_classes_jar) $(common_classes_pre_proguard_jar) $(common_javalib_jar): PRIVATE_PREFIX := $(my_prefix) |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 526 | |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 527 | ifeq ($(LOCAL_SDK_VERSION),system_current) |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 528 | my_link_type := java:system |
Sundong Ahn | 5a44d1f | 2017-10-16 19:20:34 +0900 | [diff] [blame] | 529 | else ifneq (,$(call has-system-sdk-version,$(LOCAL_SDK_VERSION))) |
| 530 | my_link_type := java:system |
Jiyong Park | 5ebca30 | 2018-01-31 00:14:55 +0900 | [diff] [blame] | 531 | else ifeq ($(LOCAL_SDK_VERSION),core_current) |
| 532 | my_link_type := java:core |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 533 | else ifneq ($(LOCAL_SDK_VERSION),) |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 534 | my_link_type := java:sdk |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 535 | else |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 536 | my_link_type := java:platform |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 537 | endif |
Dan Willemsen | b47d4e9 | 2017-04-08 00:31:31 -0700 | [diff] [blame] | 538 | |
| 539 | # TODO: check dependencies of prebuilt files |
| 540 | my_link_deps := |
| 541 | |
| 542 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) |
| 543 | my_common := COMMON |
| 544 | include $(BUILD_SYSTEM)/link_type.mk |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 545 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 546 | ifeq ($(prebuilt_module_is_dex_javalib),true) |
| 547 | # For prebuilt shared Java library we don't have classes.jar. |
| 548 | $(common_javalib_jar) : $(my_src_jar) |
| 549 | $(transform-prebuilt-to-target) |
| 550 | |
| 551 | else # ! prebuilt_module_is_dex_javalib |
| 552 | |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 553 | my_src_aar := $(filter %.aar, $(my_prebuilt_src_file)) |
| 554 | ifneq ($(my_src_aar),) |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 555 | # This is .aar file, archive of classes.jar and Android resources. |
Jeff Gaston | db6557e | 2018-02-27 14:05:40 -0500 | [diff] [blame] | 556 | |
| 557 | # run Jetifier if needed |
| 558 | LOCAL_JETIFIER_INPUT_FILE := $(my_src_aar) |
| 559 | include $(BUILD_SYSTEM)/jetifier.mk |
| 560 | my_src_aar := $(LOCAL_JETIFIER_OUTPUT_FILE) |
| 561 | |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 562 | my_src_jar := $(intermediates.COMMON)/aar/classes.jar |
Dan Willemsen | 1d64623 | 2017-11-17 13:11:26 -0800 | [diff] [blame] | 563 | my_src_proguard_options := $(intermediates.COMMON)/aar/proguard.txt |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 564 | my_src_android_manifest := $(intermediates.COMMON)/aar/AndroidManifest.xml |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 565 | |
Dan Willemsen | 1d64623 | 2017-11-17 13:11:26 -0800 | [diff] [blame] | 566 | $(my_src_jar) : .KATI_IMPLICIT_OUTPUTS := $(my_src_proguard_options) |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 567 | $(my_src_jar) : .KATI_IMPLICIT_OUTPUTS += $(my_src_android_manifest) |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 568 | $(my_src_jar) : $(my_src_aar) |
Dan Willemsen | 7a1ad6c | 2017-04-27 23:10:47 -0700 | [diff] [blame] | 569 | $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) $(dir $@)/res |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 570 | $(hide) unzip -qo -d $(dir $@) $< |
| 571 | # Make sure the extracted classes.jar has a new timestamp. |
| 572 | $(hide) touch $@ |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 573 | # Make sure the proguard and AndroidManifest.xml files exist |
| 574 | # and have a new timestamp. |
Dan Willemsen | 1d64623 | 2017-11-17 13:11:26 -0800 | [diff] [blame] | 575 | $(hide) touch $(dir $@)/proguard.txt |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 576 | $(hide) touch $(dir $@)/AndroidManifest.xml |
Colin Cross | 8e92179 | 2018-06-07 16:44:07 -0700 | [diff] [blame] | 577 | |
| 578 | my_prebuilt_android_manifest := $(intermediates.COMMON)/manifest/AndroidManifest.xml |
| 579 | $(eval $(call copy-one-file,$(my_src_android_manifest),$(my_prebuilt_android_manifest))) |
| 580 | $(call add-dependency,$(LOCAL_BUILT_MODULE),$(my_prebuilt_android_manifest)) |
| 581 | |
Jeff Gaston | db6557e | 2018-02-27 14:05:40 -0500 | [diff] [blame] | 582 | else |
| 583 | |
| 584 | # run Jetifier if needed |
| 585 | LOCAL_JETIFIER_INPUT_FILE := $(my_src_jar) |
| 586 | include $(BUILD_SYSTEM)/jetifier.mk |
| 587 | my_src_jar := $(LOCAL_JETIFIER_OUTPUT_FILE) |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 588 | |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 589 | endif |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 590 | |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 591 | $(common_classes_jar) : $(my_src_jar) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 592 | $(transform-prebuilt-to-target) |
| 593 | |
Colin Cross | 7dc9043 | 2017-09-26 16:17:24 -0700 | [diff] [blame] | 594 | ifneq ($(TURBINE_ENABLED),false) |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 595 | $(common_header_jar) : $(my_src_jar) |
| 596 | $(transform-prebuilt-to-target) |
Colin Cross | 7dc9043 | 2017-09-26 16:17:24 -0700 | [diff] [blame] | 597 | endif |
Nan Zhang | b3ec534 | 2017-08-31 21:43:04 +0000 | [diff] [blame] | 598 | |
Colin Cross | 950f1ef | 2017-04-05 15:30:42 -0700 | [diff] [blame] | 599 | $(common_classes_pre_proguard_jar) : $(my_src_jar) |
| 600 | $(transform-prebuilt-to-target) |
| 601 | |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 602 | $(common_javalib_jar) : $(common_classes_jar) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 603 | $(transform-prebuilt-to-target) |
| 604 | |
Colin Cross | 2029903 | 2018-05-09 13:29:51 -0700 | [diff] [blame] | 605 | include $(BUILD_SYSTEM)/force_aapt2.mk |
| 606 | |
Dan Willemsen | bb6393c | 2017-11-17 15:39:52 -0800 | [diff] [blame] | 607 | ifdef LOCAL_AAPT2_ONLY |
| 608 | LOCAL_USE_AAPT2 := true |
| 609 | endif |
| 610 | |
Colin Cross | 2029903 | 2018-05-09 13:29:51 -0700 | [diff] [blame] | 611 | ifeq ($(LOCAL_USE_AAPT2),true) |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 612 | ifneq ($(my_src_aar),) |
Dan Willemsen | 1d64623 | 2017-11-17 13:11:26 -0800 | [diff] [blame] | 613 | |
| 614 | $(intermediates.COMMON)/export_proguard_flags : $(my_src_proguard_options) |
| 615 | $(transform-prebuilt-to-target) |
| 616 | |
Dan Willemsen | 470e0e1 | 2017-04-27 22:28:06 -0700 | [diff] [blame] | 617 | LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION)) |
| 618 | ifeq ($(LOCAL_SDK_RES_VERSION),) |
| 619 | LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION) |
| 620 | endif |
| 621 | |
| 622 | framework_res_package_export := |
Dan Willemsen | 470e0e1 | 2017-04-27 22:28:06 -0700 | [diff] [blame] | 623 | # Please refer to package.mk |
| 624 | ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true) |
| 625 | ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),) |
| 626 | framework_res_package_export := \ |
Anton Hansson | 66d47b8 | 2018-04-27 14:11:17 +0100 | [diff] [blame] | 627 | $(call resolve-prebuilt-sdk-jar-path,$(LOCAL_SDK_RES_VERSION)) |
Dan Willemsen | 470e0e1 | 2017-04-27 22:28:06 -0700 | [diff] [blame] | 628 | else |
| 629 | framework_res_package_export := \ |
| 630 | $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk |
Dan Willemsen | 470e0e1 | 2017-04-27 22:28:06 -0700 | [diff] [blame] | 631 | endif |
| 632 | endif |
| 633 | |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 634 | my_res_package := $(intermediates.COMMON)/package-res.apk |
| 635 | |
| 636 | # We needed only very few PRIVATE variables and aapt2.mk input variables. Reset the unnecessary ones. |
| 637 | $(my_res_package): PRIVATE_AAPT2_CFLAGS := |
Dan Willemsen | e3c9901 | 2017-10-05 13:22:30 -0700 | [diff] [blame] | 638 | $(my_res_package): PRIVATE_AAPT_FLAGS := --static-lib --no-static-lib-packages --auto-add-overlay |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 639 | $(my_res_package): PRIVATE_ANDROID_MANIFEST := $(my_src_android_manifest) |
Dan Willemsen | 470e0e1 | 2017-04-27 22:28:06 -0700 | [diff] [blame] | 640 | $(my_res_package): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export) |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 641 | $(my_res_package): PRIVATE_SOURCE_INTERMEDIATES_DIR := |
| 642 | $(my_res_package): PRIVATE_PROGUARD_OPTIONS_FILE := |
| 643 | $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK := |
| 644 | $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK := |
Adam Lesinski | e758f93 | 2016-02-26 11:13:43 -0800 | [diff] [blame] | 645 | $(my_res_package): PRIVATE_PRODUCT_AAPT_CONFIG := |
| 646 | $(my_res_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := |
| 647 | $(my_res_package): PRIVATE_TARGET_AAPT_CHARACTERISTICS := |
Colin Cross | 65c7cdf | 2018-02-20 14:31:33 -0800 | [diff] [blame] | 648 | $(my_res_package) : $(framework_res_package_export) |
Colin Cross | 93fbe84 | 2018-06-12 14:02:41 -0700 | [diff] [blame] | 649 | $(my_res_package) : $(my_src_android_manifest) |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 650 | |
| 651 | full_android_manifest := |
| 652 | my_res_resources := |
| 653 | my_overlay_resources := |
Dan Willemsen | 4884525 | 2017-04-27 21:25:34 -0700 | [diff] [blame] | 654 | my_compiled_res_base_dir := $(intermediates.COMMON)/flat-res |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 655 | R_file_stamp := |
| 656 | proguard_options_file := |
| 657 | my_generated_res_dirs := $(intermediates.COMMON)/aar/res |
| 658 | my_generated_res_dirs_deps := $(my_src_jar) |
| 659 | include $(BUILD_SYSTEM)/aapt2.mk |
| 660 | |
| 661 | # Make sure my_res_package is created when you run mm/mmm. |
| 662 | $(built_module) : $(my_res_package) |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 663 | endif # $(my_src_aar) |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 664 | endif # LOCAL_USE_AAPT2 |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 665 | # make sure the classes.jar and javalib.jar are built before $(LOCAL_BUILT_MODULE) |
| 666 | $(built_module) : $(common_javalib_jar) |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 667 | |
Jiyong Park | 1cf8ee6 | 2018-05-22 15:39:59 +0900 | [diff] [blame] | 668 | my_exported_sdk_libs_file := $(intermediates.COMMON)/exported-sdk-libs |
| 669 | $(my_exported_sdk_libs_file): PRIVATE_EXPORTED_SDK_LIBS := $(LOCAL_EXPORT_SDK_LIBRARIES) |
| 670 | $(my_exported_sdk_libs_file): |
| 671 | @echo "Export SDK libs $@" |
| 672 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
Jiyong Park | be4910a | 2018-07-14 15:06:48 +0900 | [diff] [blame] | 673 | $(if $(PRIVATE_EXPORTED_SDK_LIBS),\ |
Jiyong Park | 1cf8ee6 | 2018-05-22 15:39:59 +0900 | [diff] [blame] | 674 | $(hide) echo $(PRIVATE_EXPORTED_SDK_LIBS) | tr ' ' '\n' > $@,\ |
| 675 | $(hide) touch $@) |
| 676 | |
Ying Wang | 09c306c | 2016-03-15 16:36:29 -0700 | [diff] [blame] | 677 | endif # ! prebuilt_module_is_dex_javalib |
Ying Wang | 8c89b4b | 2016-02-22 15:54:27 -0800 | [diff] [blame] | 678 | endif # LOCAL_IS_HOST_MODULE is not set |
Yohann Roussel | d87cc99 | 2016-01-19 16:08:34 +0100 | [diff] [blame] | 679 | |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 680 | endif # JAVA_LIBRARIES |
| 681 | |
Dan Willemsen | 1c6dc5b | 2016-01-06 14:28:36 -0800 | [diff] [blame] | 682 | $(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 683 | |
| 684 | my_prebuilt_src_file := |
Mathieu Chartier | 55eabd5 | 2017-09-15 13:40:48 -0700 | [diff] [blame] | 685 | my_preopt_for_extracted_apk := |