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 | |
| 9 | ifneq ($(LOCAL_PREBUILT_LIBS),) |
| 10 | $(error dont use LOCAL_PREBUILT_LIBS anymore LOCAL_PATH=$(LOCAL_PATH)) |
| 11 | endif |
| 12 | ifneq ($(LOCAL_PREBUILT_EXECUTABLES),) |
| 13 | $(error dont use LOCAL_PREBUILT_EXECUTABLES anymore LOCAL_PATH=$(LOCAL_PATH)) |
| 14 | endif |
| 15 | ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),) |
| 16 | $(error dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore LOCAL_PATH=$(LOCAL_PATH)) |
| 17 | endif |
| 18 | |
| 19 | # Not much sense to check build prebuilts |
| 20 | LOCAL_DONT_CHECK_MODULE := true |
| 21 | |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 22 | my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32) |
| 23 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 24 | ifdef LOCAL_PREBUILT_MODULE_FILE |
Ying Wang | c0adfb7 | 2014-02-27 14:10:53 -0800 | [diff] [blame] | 25 | my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 26 | else |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 27 | ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) |
| 28 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) |
Dan Willemsen | 5709bd5 | 2016-02-01 21:40:17 -0800 | [diff] [blame] | 29 | LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := |
Ying Wang | c0adfb7 | 2014-02-27 14:10:53 -0800 | [diff] [blame] | 30 | else |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 31 | ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix) |
| 32 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix)) |
Dan Willemsen | 3bb168f | 2016-01-19 20:07:08 -0800 | [diff] [blame] | 33 | LOCAL_SRC_FILES_$(my_32_64_bit_suffix) := |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 34 | else |
| 35 | my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES) |
Dan Willemsen | 3bb168f | 2016-01-19 20:07:08 -0800 | [diff] [blame] | 36 | LOCAL_SRC_FILES := |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 37 | endif |
Ying Wang | c0adfb7 | 2014-02-27 14:10:53 -0800 | [diff] [blame] | 38 | endif |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 39 | endif |
| 40 | |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 41 | my_strip_module := $(firstword \ |
| 42 | $(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \ |
| 43 | $(LOCAL_STRIP_MODULE)) |
| 44 | my_pack_module_relocations := $(firstword \ |
| 45 | $(LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \ |
| 46 | $(LOCAL_PACK_MODULE_RELOCATIONS)) |
| 47 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 48 | ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)) |
Dan Albert | 4ac4231 | 2016-07-20 11:02:18 -0700 | [diff] [blame] | 49 | # LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES indicates that this prebuilt should be |
| 50 | # installed to the common directory of libraries. This is needed for the NDK |
| 51 | # shared libraries built by soong, as we build many different versions of each |
| 52 | # library (one for each API level). Since they all have the same basename, |
| 53 | # they'd clobber each other (as well as any platform libraries by the same |
| 54 | # name). |
| 55 | ifneq ($(LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES),false) |
| 56 | # Put the built targets of all shared libraries in a common directory |
| 57 | # to simplify the link line. |
| 58 | OVERRIDE_BUILT_MODULE_PATH := \ |
| 59 | $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES) |
| 60 | endif |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 61 | ifeq ($(LOCAL_IS_HOST_MODULE)$(my_strip_module),) |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 62 | # Strip but not try to add debuglink |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 63 | my_strip_module := no_debuglink |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 64 | endif |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 65 | |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 66 | ifeq ($(LOCAL_IS_HOST_MODULE)$(my_pack_module_relocations),) |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 67 | # Do not pack relocations by default |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 68 | my_pack_module_relocations := false |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 69 | endif |
Dan Albert | 52831d1 | 2015-11-12 15:27:49 -0800 | [diff] [blame] | 70 | |
| 71 | ifeq ($(DISABLE_RELOCATION_PACKER),true) |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 72 | my_pack_module_relocations := false |
Dan Albert | 52831d1 | 2015-11-12 15:27:49 -0800 | [diff] [blame] | 73 | endif |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 74 | endif |
| 75 | |
| 76 | ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),) |
| 77 | prebuilt_module_is_a_library := true |
| 78 | else |
| 79 | prebuilt_module_is_a_library := |
| 80 | endif |
| 81 | |
Dan Willemsen | fc92fb2 | 2016-08-26 13:27:13 -0700 | [diff] [blame] | 82 | ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) |
| 83 | ifeq ($(prebuilt_module_is_a_library),true) |
| 84 | SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE) |
| 85 | endif |
| 86 | endif |
| 87 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 88 | # Don't install static libraries by default. |
| 89 | ifndef LOCAL_UNINSTALLABLE_MODULE |
| 90 | ifeq (STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)) |
| 91 | LOCAL_UNINSTALLABLE_MODULE := true |
| 92 | endif |
| 93 | endif |
| 94 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 95 | ifeq (JAVA_LIBRARIES,$(LOCAL_IS_HOST_MODULE)$(LOCAL_MODULE_CLASS)$(filter true,$(LOCAL_UNINSTALLABLE_MODULE))) |
| 96 | prebuilt_module_is_dex_javalib := true |
| 97 | else |
| 98 | prebuilt_module_is_dex_javalib := |
| 99 | endif |
| 100 | |
Ying Wang | af9757e | 2014-07-17 21:24:42 -0700 | [diff] [blame] | 101 | ifeq ($(LOCAL_MODULE_CLASS),APPS) |
| 102 | LOCAL_BUILT_MODULE_STEM := package.apk |
| 103 | LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk |
| 104 | endif |
| 105 | |
Dan Willemsen | 4598fbc | 2016-07-13 16:08:36 -0700 | [diff] [blame] | 106 | ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module) $(my_pack_module_relocations)),) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 107 | ifdef LOCAL_IS_HOST_MODULE |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 108 | $(error Cannot strip/pack host module LOCAL_PATH=$(LOCAL_PATH)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 109 | endif |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 110 | ifeq ($(filter SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 111 | $(error Can strip/pack only shared libraries or executables LOCAL_PATH=$(LOCAL_PATH)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 112 | endif |
| 113 | ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) |
Dmitriy Ivanov | 64762c3 | 2015-04-24 15:33:14 -0700 | [diff] [blame] | 114 | $(error Cannot strip/pack scripts LOCAL_PATH=$(LOCAL_PATH)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 115 | endif |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 116 | # Set the arch-specific variables to set up the strip/pack rules. |
| 117 | LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_strip_module) |
| 118 | LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_pack_module_relocations) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 119 | include $(BUILD_SYSTEM)/dynamic_binary.mk |
| 120 | built_module := $(linked_module) |
Ying Wang | bfb52a2 | 2014-08-20 17:12:32 -0700 | [diff] [blame] | 121 | |
Ying Wang | b6eb8dd | 2016-03-01 20:14:52 -0800 | [diff] [blame] | 122 | else # my_strip_module and my_pack_module_relocations not true |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 123 | include $(BUILD_SYSTEM)/base_rules.mk |
| 124 | built_module := $(LOCAL_BUILT_MODULE) |
| 125 | |
| 126 | ifdef prebuilt_module_is_a_library |
| 127 | export_includes := $(intermediates)/export_includes |
| 128 | $(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS) |
Dan Willemsen | 1c6dc5b | 2016-01-06 14:28:36 -0800 | [diff] [blame] | 129 | $(export_includes) : |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 130 | @echo Export includes file: $< -- $@ |
| 131 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
| 132 | ifdef LOCAL_EXPORT_C_INCLUDE_DIRS |
| 133 | $(hide) for d in $(PRIVATE_EXPORT_C_INCLUDE_DIRS); do \ |
| 134 | echo "-I $$d" >> $@; \ |
| 135 | done |
| 136 | else |
| 137 | $(hide) touch $@ |
| 138 | endif |
| 139 | |
Dan Willemsen | b097fbe | 2016-06-07 14:25:14 -0700 | [diff] [blame] | 140 | my_link_type := $(intermediates)/link_type |
| 141 | $(my_link_type): PRIVATE_LINK_TYPE := $(if $(LOCAL_SDK_VERSION),ndk,platform) |
| 142 | $(my_link_type): |
| 143 | @echo Check module type: $@ |
| 144 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
| 145 | $(hide) echo $(PRIVATE_LINK_TYPE) >$@ |
| 146 | |
| 147 | $(LOCAL_BUILT_MODULE) : | $(export_includes) $(my_link_type) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 148 | endif # prebuilt_module_is_a_library |
| 149 | |
| 150 | # The real dependency will be added after all Android.mks are loaded and the install paths |
| 151 | # of the shared libraries are determined. |
| 152 | ifdef LOCAL_INSTALLED_MODULE |
| 153 | ifdef LOCAL_SHARED_LIBRARIES |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 154 | my_shared_libraries := $(LOCAL_SHARED_LIBRARIES) |
| 155 | # Extra shared libraries introduced by LOCAL_CXX_STL. |
| 156 | include $(BUILD_SYSTEM)/cxx_stl_setup.mk |
Ying Wang | 58f462f | 2014-02-25 18:26:29 -0800 | [diff] [blame] | 157 | $(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \ |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 158 | $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 159 | |
| 160 | # We also need the LOCAL_BUILT_MODULE dependency, |
| 161 | # since we use -rpath-link which points to the built module's path. |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 162 | my_built_shared_libraries := \ |
Ying Wang | 58f462f | 2014-02-25 18:26:29 -0800 | [diff] [blame] | 163 | $(addprefix $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \ |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 164 | $(addsuffix $($(my_prefix)SHLIB_SUFFIX), \ |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 165 | $(my_shared_libraries))) |
| 166 | $(LOCAL_BUILT_MODULE) : $(my_built_shared_libraries) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 167 | endif |
| 168 | endif |
| 169 | |
Ying Wang | 7c87739 | 2014-10-07 13:03:29 -0700 | [diff] [blame] | 170 | # 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] | 171 | # "my_strip_module not true" because otherwise the rules are defined in dynamic_binary.mk. |
| 172 | endif # my_strip_module not true |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 173 | |
Ryan Campbell | 81c9d29 | 2016-09-12 13:56:50 -0700 | [diff] [blame^] | 174 | # Coverage information is needed when static lib is a dependency of another |
| 175 | # coverage-enabled module. |
| 176 | ifeq (STATIC_LIBRARIES, $(LOCAL_MODULE_CLASS)) |
| 177 | GCNO_ARCHIVE := $(LOCAL_MODULE).gcnodir |
| 178 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_OBJECTS := |
| 179 | $(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_WHOLE_STATIC_LIBRARIES := |
| 180 | $(intermediates)/$(GCNO_ARCHIVE) : |
| 181 | $(transform-o-to-static-lib) |
| 182 | endif |
| 183 | |
Ying Wang | f0534c2 | 2014-04-15 11:12:21 -0700 | [diff] [blame] | 184 | ifeq ($(LOCAL_MODULE_CLASS),APPS) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 185 | PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) |
| 186 | |
Ying Wang | 43f7a32 | 2014-11-17 16:56:04 -0800 | [diff] [blame] | 187 | # Select dpi-specific source |
| 188 | ifdef LOCAL_DPI_VARIANTS |
Ying Wang | 6068658 | 2014-12-10 12:40:09 -0800 | [diff] [blame] | 189 | 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] | 190 | ifdef my_dpi |
| 191 | ifdef LOCAL_DPI_FILE_STEM |
| 192 | my_prebuilt_dpi_file_stem := $(LOCAL_DPI_FILE_STEM) |
| 193 | else |
| 194 | my_prebuilt_dpi_file_stem := $(LOCAL_MODULE)_%.apk |
| 195 | endif |
| 196 | my_prebuilt_src_file := $(dir $(my_prebuilt_src_file))$(subst %,$(my_dpi),$(my_prebuilt_dpi_file_stem)) |
| 197 | endif # my_dpi |
| 198 | endif # LOCAL_DPI_VARIANTS |
| 199 | |
Ying Wang | 96bcad4 | 2014-04-17 13:38:04 -0700 | [diff] [blame] | 200 | rs_compatibility_jni_libs := |
| 201 | include $(BUILD_SYSTEM)/install_jni_libs.mk |
| 202 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 203 | ifeq ($(LOCAL_CERTIFICATE),EXTERNAL) |
| 204 | # The magic string "EXTERNAL" means this package will be signed with |
| 205 | # the default dev key throughout the build process, but we expect |
| 206 | # the final package to be signed with a different key. |
| 207 | # |
| 208 | # This can be used for packages where we don't have access to the |
| 209 | # keys, but want the package to be predexopt'ed. |
| 210 | LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE) |
| 211 | PACKAGES.$(LOCAL_MODULE).EXTERNAL_KEY := 1 |
| 212 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 213 | $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 214 | $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 215 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 216 | endif |
| 217 | ifeq ($(LOCAL_CERTIFICATE),) |
Ying Wang | f0534c2 | 2014-04-15 11:12:21 -0700 | [diff] [blame] | 218 | # It is now a build error to add a prebuilt .apk without |
| 219 | # specifying a key for it. |
| 220 | $(error No LOCAL_CERTIFICATE specified for prebuilt "$(my_prebuilt_src_file)") |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 221 | else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 222 | # The magic string "PRESIGNED" means this package is already checked |
| 223 | # signed with its release key. |
| 224 | # |
| 225 | # By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be |
| 226 | # mentioned in apkcerts.txt (with certificate set to "PRESIGNED") |
| 227 | # but the dexpreopt process will not try to re-sign the app. |
| 228 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED |
| 229 | PACKAGES := $(PACKAGES) $(LOCAL_MODULE) |
| 230 | else |
| 231 | # If this is not an absolute certificate, assign it to a generic one. |
| 232 | ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) |
| 233 | LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) |
| 234 | endif |
| 235 | |
| 236 | PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 237 | PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 238 | PACKAGES := $(PACKAGES) $(LOCAL_MODULE) |
| 239 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 240 | $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 241 | $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 242 | $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
| 243 | endif |
| 244 | |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 245 | # Disable dex-preopt of prebuilts to save space, if requested. |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 246 | ifndef LOCAL_DEX_PREOPT |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 247 | ifeq ($(DONT_DEXPREOPT_PREBUILTS),true) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 248 | LOCAL_DEX_PREOPT := false |
Andreas Gampe | 5e0dbe0 | 2014-10-01 22:01:16 -0700 | [diff] [blame] | 249 | endif |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 250 | endif |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 251 | |
| 252 | ####################################### |
| 253 | # defines built_odex along with rule to install odex |
| 254 | include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk |
| 255 | ####################################### |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 256 | ifneq ($(LOCAL_REPLACE_PREBUILT_APK_INSTALLED),) |
| 257 | # There is a replacement for the prebuilt .apk we can install without any processing. |
Ying Wang | c9a1977 | 2016-03-15 14:40:33 -0700 | [diff] [blame] | 258 | $(built_module) : $(LOCAL_REPLACE_PREBUILT_APK_INSTALLED) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 259 | $(transform-prebuilt-to-target) |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 260 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 261 | else # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED |
| 262 | # Sign and align non-presigned .apks. |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 263 | # The embedded prebuilt jni to uncompress. |
Ying Wang | 226eb92 | 2015-06-01 19:19:57 -0700 | [diff] [blame] | 264 | ifeq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 265 | # For PRESIGNED apks we must uncompress every .so file: |
| 266 | # even if the .so file isn't for the current TARGET_ARCH, |
| 267 | # we can't strip the file. |
| 268 | embedded_prebuilt_jni_libs := 'lib/*.so' |
| 269 | endif |
Ying Wang | 1fb0152 | 2015-05-01 14:02:26 -0700 | [diff] [blame] | 270 | ifndef embedded_prebuilt_jni_libs |
| 271 | # No LOCAL_PREBUILT_JNI_LIBS, uncompress all. |
| 272 | embedded_prebuilt_jni_libs := 'lib/*.so' |
| 273 | endif |
| 274 | $(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs) |
| 275 | |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 276 | $(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(SIGNAPK_JAR) $(AAPT) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 277 | $(transform-prebuilt-to-target) |
Ying Wang | 226eb92 | 2015-06-01 19:19:57 -0700 | [diff] [blame] | 278 | $(uncompress-shared-libs) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 279 | ifdef LOCAL_DEX_PREOPT |
| 280 | ifneq ($(BUILD_PLATFORM_ZIP),) |
| 281 | @# Keep a copy of apk with classes.dex unstripped |
| 282 | $(hide) cp -f $@ $(dir $@)package.dex.apk |
| 283 | endif # BUILD_PLATFORM_ZIP |
| 284 | endif # LOCAL_DEX_PREOPT |
Kenny Root | dff3755 | 2015-04-15 12:09:32 -0700 | [diff] [blame] | 285 | ifneq ($(LOCAL_CERTIFICATE),PRESIGNED) |
| 286 | @# Only strip out files if we can re-sign the package. |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 287 | ifdef LOCAL_DEX_PREOPT |
Ying Wang | 36142f6 | 2014-05-21 16:13:33 -0700 | [diff] [blame] | 288 | ifneq (nostripping,$(LOCAL_DEX_PREOPT)) |
| 289 | $(call dexpreopt-remove-classes.dex,$@) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 290 | endif # LOCAL_DEX_PREOPT != nostripping |
| 291 | endif # LOCAL_DEX_PREOPT |
Kenny Root | dff3755 | 2015-04-15 12:09:32 -0700 | [diff] [blame] | 292 | $(sign-package) |
Alex Klyubin | 5b826ac | 2015-12-04 10:07:41 -0800 | [diff] [blame] | 293 | # No need for align-package because sign-package takes care of alignment |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 294 | else # LOCAL_CERTIFICATE == PRESIGNED |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 295 | $(align-package) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 296 | endif # LOCAL_CERTIFICATE |
| 297 | endif # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 298 | |
Ying Wang | 36142f6 | 2014-05-21 16:13:33 -0700 | [diff] [blame] | 299 | ############################### |
| 300 | ## Rule to build the odex file |
| 301 | ifdef LOCAL_DEX_PREOPT |
| 302 | $(built_odex) : $(my_prebuilt_src_file) |
| 303 | $(call dexpreopt-one-file,$<,$@) |
| 304 | endif |
| 305 | |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 306 | ############################### |
| 307 | ## Install split apks. |
| 308 | ifdef LOCAL_PACKAGE_SPLITS |
| 309 | # LOCAL_PACKAGE_SPLITS is a list of apks to be installed. |
| 310 | built_apk_splits := $(addprefix $(built_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS))) |
| 311 | installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS))) |
| 312 | |
Alex Klyubin | 5b826ac | 2015-12-04 10:07:41 -0800 | [diff] [blame] | 313 | # Rules to sign the split apks. |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 314 | my_src_dir := $(sort $(dir $(LOCAL_PACKAGE_SPLITS))) |
| 315 | ifneq (1,$(words $(my_src_dir))) |
| 316 | $(error You must put all the split source apks in the same folder: $(LOCAL_PACKAGE_SPLITS)) |
| 317 | endif |
| 318 | my_src_dir := $(LOCAL_PATH)/$(my_src_dir) |
| 319 | |
Shinichiro Hamaji | 641e61c | 2016-05-13 16:03:24 +0900 | [diff] [blame] | 320 | $(built_apk_splits) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 321 | $(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8 |
| 322 | $(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 323 | $(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk | $(AAPT) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 324 | $(copy-file-to-new-target) |
| 325 | $(sign-package) |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 326 | |
| 327 | # Rules to install the split apks. |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 328 | $(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk |
Ying Wang | 00fe587 | 2014-07-23 14:35:40 -0700 | [diff] [blame] | 329 | @echo "Install: $@" |
| 330 | $(copy-file-to-new-target) |
| 331 | |
| 332 | # Register the additional built and installed files. |
| 333 | ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits) |
| 334 | ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \ |
| 335 | $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/$(notdir $(s)):$(my_module_path)/$(notdir $(s))) |
| 336 | |
| 337 | # Make sure to install the splits when you run "make <module_name>". |
| 338 | $(my_register_name): $(installed_apk_splits) |
| 339 | |
| 340 | endif # LOCAL_PACKAGE_SPLITS |
| 341 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 342 | else # LOCAL_MODULE_CLASS != APPS |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 343 | ifeq ($(prebuilt_module_is_dex_javalib),true) |
| 344 | # This is a target shared library, i.e. a jar with classes.dex. |
| 345 | ####################################### |
| 346 | # defines built_odex along with rule to install odex |
| 347 | include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk |
| 348 | ####################################### |
| 349 | ifdef LOCAL_DEX_PREOPT |
| 350 | ifneq ($(dexpreopt_boot_jar_module),) # boot jar |
| 351 | # boot jar's rules are defined in dex_preopt.mk |
| 352 | dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar |
Ying Wang | c9a1977 | 2016-03-15 14:40:33 -0700 | [diff] [blame] | 353 | $(built_module) : $(dexpreopted_boot_jar) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 354 | $(call copy-file-to-target) |
Dan Willemsen | 08420cb | 2016-03-01 22:04:57 -0800 | [diff] [blame] | 355 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 356 | # For libart boot jars, we don't have .odex files. |
| 357 | else # ! boot jar |
| 358 | $(built_odex): PRIVATE_MODULE := $(LOCAL_MODULE) |
| 359 | # Use pattern rule - we may have multiple built odex files. |
| 360 | $(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(my_prebuilt_src_file) |
| 361 | @echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)" |
| 362 | $(call dexpreopt-one-file,$<,$@) |
| 363 | |
Ying Wang | c9a1977 | 2016-03-15 14:40:33 -0700 | [diff] [blame] | 364 | $(built_module) : $(my_prebuilt_src_file) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 365 | $(call copy-file-to-target) |
| 366 | ifneq (nostripping,$(LOCAL_DEX_PREOPT)) |
| 367 | $(call dexpreopt-remove-classes.dex,$@) |
| 368 | endif |
| 369 | endif # boot jar |
| 370 | else # ! LOCAL_DEX_PREOPT |
Ying Wang | c9a1977 | 2016-03-15 14:40:33 -0700 | [diff] [blame] | 371 | $(built_module) : $(my_prebuilt_src_file) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 372 | $(call copy-file-to-target) |
| 373 | endif # LOCAL_DEX_PREOPT |
| 374 | |
| 375 | else # ! prebuilt_module_is_dex_javalib |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 376 | $(built_module) : $(my_prebuilt_src_file) |
Dan Willemsen | 08420cb | 2016-03-01 22:04:57 -0800 | [diff] [blame] | 377 | ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 378 | $(transform-prebuilt-to-target-strip-comments) |
| 379 | else |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 380 | $(transform-prebuilt-to-target) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 381 | endif |
Dan Willemsen | 7fe992c | 2016-03-02 13:54:51 -0800 | [diff] [blame] | 382 | ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) |
Dan Willemsen | 08420cb | 2016-03-01 22:04:57 -0800 | [diff] [blame] | 383 | $(hide) chmod +x $@ |
| 384 | endif |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 385 | endif # ! prebuilt_module_is_dex_javalib |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 386 | endif # LOCAL_MODULE_CLASS != APPS |
| 387 | |
Ying Wang | 8c89b4b | 2016-02-22 15:54:27 -0800 | [diff] [blame] | 388 | ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) |
| 389 | my_src_jar := $(my_prebuilt_src_file) |
| 390 | ifeq ($(LOCAL_IS_HOST_MODULE),) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 391 | # for target java libraries, the LOCAL_BUILT_MODULE is in a product-specific dir, |
| 392 | # 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] | 393 | common_classes_jar := $(intermediates.COMMON)/classes.jar |
| 394 | common_javalib_jar := $(intermediates.COMMON)/javalib.jar |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 395 | |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 396 | $(common_classes_jar) $(common_javalib_jar): PRIVATE_MODULE := $(LOCAL_MODULE) |
| 397 | |
Dan Willemsen | 62dfb59 | 2016-07-08 21:33:05 -0700 | [diff] [blame] | 398 | my_link_type := $(intermediates.COMMON)/link_type |
| 399 | ifeq ($(LOCAL_SDK_VERSION),system_current) |
| 400 | $(my_link_type): PRIVATE_LINK_TYPE := system |
| 401 | else ifneq ($(LOCAL_SDK_VERSION),) |
| 402 | $(my_link_type): PRIVATE_LINK_TYPE := sdk |
| 403 | else |
| 404 | $(my_link_type): PRIVATE_LINK_TYPE := platform |
| 405 | endif |
| 406 | $(my_link_type): |
| 407 | @echo Check module type: $@ |
| 408 | $(hide) mkdir -p $(dir $@) && rm -f $@ |
| 409 | $(hide) echo $(PRIVATE_LINK_TYPE) >$@ |
| 410 | $(LOCAL_BUILT_MODULE): $(my_link_type) |
| 411 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 412 | ifeq ($(prebuilt_module_is_dex_javalib),true) |
| 413 | # For prebuilt shared Java library we don't have classes.jar. |
Ying Wang | c9a1977 | 2016-03-15 14:40:33 -0700 | [diff] [blame] | 414 | $(common_javalib_jar) : $(my_src_jar) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 415 | $(transform-prebuilt-to-target) |
| 416 | |
| 417 | else # ! prebuilt_module_is_dex_javalib |
| 418 | |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 419 | my_src_aar := $(filter %.aar, $(my_prebuilt_src_file)) |
| 420 | ifneq ($(my_src_aar),) |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 421 | # This is .aar file, archive of classes.jar and Android resources. |
| 422 | my_src_jar := $(intermediates.COMMON)/aar/classes.jar |
| 423 | |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 424 | $(my_src_jar) : $(my_src_aar) |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 425 | $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) |
| 426 | $(hide) unzip -qo -d $(dir $@) $< |
| 427 | # Make sure the extracted classes.jar has a new timestamp. |
| 428 | $(hide) touch $@ |
| 429 | |
Ying Wang | e9dd9f2 | 2014-10-29 15:48:32 -0700 | [diff] [blame] | 430 | endif |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 431 | |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 432 | $(common_classes_jar) : $(my_src_jar) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 433 | $(transform-prebuilt-to-target) |
| 434 | |
Dan Willemsen | 7f01615 | 2016-02-29 17:52:39 -0800 | [diff] [blame] | 435 | $(common_javalib_jar) : $(common_classes_jar) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 436 | $(transform-prebuilt-to-target) |
| 437 | |
Shinichiro Hamaji | 89b255a | 2015-11-09 16:47:42 +0900 | [diff] [blame] | 438 | $(call define-jar-to-toc-rule, $(common_classes_jar)) |
| 439 | |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 440 | ifdef LOCAL_USE_AAPT2 |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 441 | ifneq ($(my_src_aar),) |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 442 | my_res_package := $(intermediates.COMMON)/package-res.apk |
| 443 | |
| 444 | # We needed only very few PRIVATE variables and aapt2.mk input variables. Reset the unnecessary ones. |
| 445 | $(my_res_package): PRIVATE_AAPT2_CFLAGS := |
| 446 | $(my_res_package): PRIVATE_ANDROID_MANIFEST := $(intermediates.COMMON)/aar/AndroidManifest.xml |
| 447 | $(my_res_package): PRIVATE_AAPT_INCLUDES := |
| 448 | $(my_res_package): PRIVATE_SOURCE_INTERMEDIATES_DIR := |
| 449 | $(my_res_package): PRIVATE_PROGUARD_OPTIONS_FILE := |
| 450 | $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK := |
| 451 | $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK := |
Adam Lesinski | e758f93 | 2016-02-26 11:13:43 -0800 | [diff] [blame] | 452 | $(my_res_package): PRIVATE_PRODUCT_AAPT_CONFIG := |
| 453 | $(my_res_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := |
| 454 | $(my_res_package): PRIVATE_TARGET_AAPT_CHARACTERISTICS := |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 455 | |
| 456 | full_android_manifest := |
| 457 | my_res_resources := |
| 458 | my_overlay_resources := |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 459 | my_compiled_res_base_dir := |
| 460 | R_file_stamp := |
| 461 | proguard_options_file := |
| 462 | my_generated_res_dirs := $(intermediates.COMMON)/aar/res |
| 463 | my_generated_res_dirs_deps := $(my_src_jar) |
| 464 | include $(BUILD_SYSTEM)/aapt2.mk |
| 465 | |
| 466 | # Make sure my_res_package is created when you run mm/mmm. |
| 467 | $(built_module) : $(my_res_package) |
Ying Wang | dd71c85 | 2015-12-04 13:59:18 -0800 | [diff] [blame] | 468 | endif # $(my_src_aar) |
Ying Wang | e295c3d | 2016-02-24 14:11:55 -0800 | [diff] [blame] | 469 | endif # LOCAL_USE_AAPT2 |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 470 | # make sure the classes.jar and javalib.jar are built before $(LOCAL_BUILT_MODULE) |
| 471 | $(built_module) : $(common_javalib_jar) |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 472 | |
| 473 | endif # ! prebuilt_module_is_dex_javalib |
Ying Wang | 8c89b4b | 2016-02-22 15:54:27 -0800 | [diff] [blame] | 474 | endif # LOCAL_IS_HOST_MODULE is not set |
Yohann Roussel | d87cc99 | 2016-01-19 16:08:34 +0100 | [diff] [blame] | 475 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 476 | ifneq ($(prebuilt_module_is_dex_javalib),true) |
Yohann Roussel | d87cc99 | 2016-01-19 16:08:34 +0100 | [diff] [blame] | 477 | |
Ying Wang | 8c89b4b | 2016-02-22 15:54:27 -0800 | [diff] [blame] | 478 | # We may be building classes.jack from a host jar for host dalvik Java library. |
Yohann Roussel | d87cc99 | 2016-01-19 16:08:34 +0100 | [diff] [blame] | 479 | $(intermediates.COMMON)/classes.jack : PRIVATE_JACK_FLAGS:=$(LOCAL_JACK_FLAGS) |
Yohann Roussel | 5960c54 | 2016-08-19 18:57:34 +0200 | [diff] [blame] | 480 | $(intermediates.COMMON)/classes.jack : PRIVATE_JACK_MIN_SDK_VERSION := $(if $(strip $(LOCAL_MIN_SDK_VERSION)),$(LOCAL_MIN_SDK_VERSION),1) |
Dan Willemsen | 1c6dc5b | 2016-01-06 14:28:36 -0800 | [diff] [blame] | 481 | $(intermediates.COMMON)/classes.jack : $(my_src_jar) \ |
Shinichiro Hamaji | 4eaeef8 | 2016-04-07 18:56:42 +0900 | [diff] [blame] | 482 | $(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK_DEFAULT_ARGS) $(JACK) \ |
| 483 | | setup-jack-server |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 484 | $(transform-jar-to-jack) |
| 485 | |
Shinichiro Hamaji | f972a4a | 2015-12-09 18:06:20 +0900 | [diff] [blame] | 486 | # Update timestamps of .toc files for prebuilts so dependents will be |
| 487 | # always rebuilt. |
| 488 | $(intermediates.COMMON)/classes.dex.toc: $(intermediates.COMMON)/classes.jack |
| 489 | touch $@ |
| 490 | |
Ying Wang | 3a61eeb | 2016-03-11 10:32:01 -0800 | [diff] [blame] | 491 | endif # ! prebuilt_module_is_dex_javalib |
Yohann Roussel | b4c49cb | 2014-09-08 14:45:14 +0200 | [diff] [blame] | 492 | endif # JAVA_LIBRARIES |
| 493 | |
Dan Willemsen | 1c6dc5b | 2016-01-06 14:28:36 -0800 | [diff] [blame] | 494 | $(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 495 | |
| 496 | my_prebuilt_src_file := |