blob: 47bd1b26bef647268d80ca5f6105c90f3b8745d3 [file] [log] [blame]
Colin Crosse18cb932014-02-13 15:04:18 -08001###########################################################
2## Standard rules for copying files that are prebuilt
3##
4## Additional inputs from base_rules.make:
5## None.
6##
7###########################################################
8
9ifneq ($(LOCAL_PREBUILT_LIBS),)
10$(error dont use LOCAL_PREBUILT_LIBS anymore LOCAL_PATH=$(LOCAL_PATH))
11endif
12ifneq ($(LOCAL_PREBUILT_EXECUTABLES),)
13$(error dont use LOCAL_PREBUILT_EXECUTABLES anymore LOCAL_PATH=$(LOCAL_PATH))
14endif
15ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),)
16$(error dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore LOCAL_PATH=$(LOCAL_PATH))
17endif
18
Ying Wang34d5f1b2014-05-16 10:38:43 -070019my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32)
20
Colin Crosse18cb932014-02-13 15:04:18 -080021ifdef LOCAL_PREBUILT_MODULE_FILE
Ying Wangc0adfb72014-02-27 14:10:53 -080022 my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE)
Colin Crosse18cb932014-02-13 15:04:18 -080023else
Ying Wang6feb6d52014-04-17 10:03:35 -070024 ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
25 my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
Dan Willemsen5709bd52016-02-01 21:40:17 -080026 LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) :=
Ying Wangc0adfb72014-02-27 14:10:53 -080027 else
Ying Wang34d5f1b2014-05-16 10:38:43 -070028 ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix)
29 my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
Dan Willemsen3bb168f2016-01-19 20:07:08 -080030 LOCAL_SRC_FILES_$(my_32_64_bit_suffix) :=
Ying Wang34d5f1b2014-05-16 10:38:43 -070031 else
32 my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
Dan Willemsen3bb168f2016-01-19 20:07:08 -080033 LOCAL_SRC_FILES :=
Ying Wang34d5f1b2014-05-16 10:38:43 -070034 endif
Ying Wangc0adfb72014-02-27 14:10:53 -080035 endif
Colin Crosse18cb932014-02-13 15:04:18 -080036endif
37
Colin Cross01e1b8f2016-10-27 22:10:55 +000038LOCAL_CHECKED_MODULE := $(my_prebuilt_src_file)
39
Ying Wangb6eb8dd2016-03-01 20:14:52 -080040my_strip_module := $(firstword \
41 $(LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
42 $(LOCAL_STRIP_MODULE))
43my_pack_module_relocations := $(firstword \
44 $(LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
45 $(LOCAL_PACK_MODULE_RELOCATIONS))
46
Colin Crosse18cb932014-02-13 15:04:18 -080047ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS))
Dan Albert4ac42312016-07-20 11:02:18 -070048 # LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES indicates that this prebuilt should be
49 # installed to the common directory of libraries. This is needed for the NDK
50 # shared libraries built by soong, as we build many different versions of each
51 # library (one for each API level). Since they all have the same basename,
52 # they'd clobber each other (as well as any platform libraries by the same
53 # name).
54 ifneq ($(LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES),false)
55 # Put the built targets of all shared libraries in a common directory
56 # to simplify the link line.
57 OVERRIDE_BUILT_MODULE_PATH := \
58 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
59 endif
Ying Wangb6eb8dd2016-03-01 20:14:52 -080060 ifeq ($(LOCAL_IS_HOST_MODULE)$(my_strip_module),)
Ying Wangbfb52a22014-08-20 17:12:32 -070061 # Strip but not try to add debuglink
Ying Wangb6eb8dd2016-03-01 20:14:52 -080062 my_strip_module := no_debuglink
Ying Wangbfb52a22014-08-20 17:12:32 -070063 endif
Dmitriy Ivanov64762c32015-04-24 15:33:14 -070064
Ying Wangb6eb8dd2016-03-01 20:14:52 -080065 ifeq ($(LOCAL_IS_HOST_MODULE)$(my_pack_module_relocations),)
Dmitriy Ivanov64762c32015-04-24 15:33:14 -070066 # Do not pack relocations by default
Ying Wangb6eb8dd2016-03-01 20:14:52 -080067 my_pack_module_relocations := false
Dmitriy Ivanov64762c32015-04-24 15:33:14 -070068 endif
Dan Albert52831d12015-11-12 15:27:49 -080069
70 ifeq ($(DISABLE_RELOCATION_PACKER),true)
Ying Wangb6eb8dd2016-03-01 20:14:52 -080071 my_pack_module_relocations := false
Dan Albert52831d12015-11-12 15:27:49 -080072 endif
Colin Crosse18cb932014-02-13 15:04:18 -080073endif
74
75ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
76 prebuilt_module_is_a_library := true
77else
78 prebuilt_module_is_a_library :=
79endif
80
Dan Willemsenfc92fb22016-08-26 13:27:13 -070081ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
Dan Willemsen9d2b3282017-04-07 20:58:43 -070082 ifeq ($(prebuilt_module_is_a_library),true)
83 SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
84 endif
85
86 ifdef LOCAL_USE_VNDK
Jiyong Parka9c4c712017-07-18 13:35:27 +090087 name_without_suffix := $(patsubst %.vendor,%,$(LOCAL_MODULE))
88 ifneq ($(name_without_suffix),$(LOCAL_MODULE)
89 SPLIT_VENDOR.$(LOCAL_MODULE_CLASS).$(name_without_suffix) := 1
90 endif
91 name_without_suffix :=
Dan Willemsen9d2b3282017-04-07 20:58:43 -070092 endif
Dan Willemsenfc92fb22016-08-26 13:27:13 -070093endif
94
Colin Crosse18cb932014-02-13 15:04:18 -080095# Don't install static libraries by default.
96ifndef LOCAL_UNINSTALLABLE_MODULE
97ifeq (STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS))
98 LOCAL_UNINSTALLABLE_MODULE := true
99endif
100endif
101
Ying Wang09c306c2016-03-15 16:36:29 -0700102ifeq (JAVA_LIBRARIES,$(LOCAL_IS_HOST_MODULE)$(LOCAL_MODULE_CLASS)$(filter true,$(LOCAL_UNINSTALLABLE_MODULE)))
103 prebuilt_module_is_dex_javalib := true
104else
105 prebuilt_module_is_dex_javalib :=
106endif
107
Ying Wangaf9757e2014-07-17 21:24:42 -0700108ifeq ($(LOCAL_MODULE_CLASS),APPS)
109LOCAL_BUILT_MODULE_STEM := package.apk
Dan Willemsendc1ddfc2016-08-05 17:23:33 -0700110ifndef LOCAL_INSTALLED_MODULE_STEM
Ying Wangaf9757e2014-07-17 21:24:42 -0700111LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE).apk
112endif
Dan Willemsendc1ddfc2016-08-05 17:23:33 -0700113endif
Ying Wangaf9757e2014-07-17 21:24:42 -0700114
Dan Willemsen4598fbc2016-07-13 16:08:36 -0700115ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module) $(my_pack_module_relocations)),)
Colin Crosse18cb932014-02-13 15:04:18 -0800116 ifdef LOCAL_IS_HOST_MODULE
Dmitriy Ivanov64762c32015-04-24 15:33:14 -0700117 $(error Cannot strip/pack host module LOCAL_PATH=$(LOCAL_PATH))
Colin Crosse18cb932014-02-13 15:04:18 -0800118 endif
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800119 ifeq ($(filter SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
Dmitriy Ivanov64762c32015-04-24 15:33:14 -0700120 $(error Can strip/pack only shared libraries or executables LOCAL_PATH=$(LOCAL_PATH))
Colin Crosse18cb932014-02-13 15:04:18 -0800121 endif
122 ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
Dmitriy Ivanov64762c32015-04-24 15:33:14 -0700123 $(error Cannot strip/pack scripts LOCAL_PATH=$(LOCAL_PATH))
Colin Crosse18cb932014-02-13 15:04:18 -0800124 endif
Ying Wangb6eb8dd2016-03-01 20:14:52 -0800125 # Set the arch-specific variables to set up the strip/pack rules.
126 LOCAL_STRIP_MODULE_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_strip_module)
127 LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) := $(my_pack_module_relocations)
Colin Crosse18cb932014-02-13 15:04:18 -0800128 include $(BUILD_SYSTEM)/dynamic_binary.mk
129 built_module := $(linked_module)
Ying Wangbfb52a22014-08-20 17:12:32 -0700130
Ying Wangb6eb8dd2016-03-01 20:14:52 -0800131else # my_strip_module and my_pack_module_relocations not true
Colin Crosse18cb932014-02-13 15:04:18 -0800132 include $(BUILD_SYSTEM)/base_rules.mk
133 built_module := $(LOCAL_BUILT_MODULE)
134
135ifdef prebuilt_module_is_a_library
136export_includes := $(intermediates)/export_includes
Dan Willemsen05909fa2017-03-19 13:22:45 -0700137export_cflags := $(foreach d,$(LOCAL_EXPORT_C_INCLUDE_DIRS),-I $(d))
138# Soong exports cflags instead of include dirs, so that -isystem can be included.
139ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
140export_cflags += $(LOCAL_EXPORT_CFLAGS)
141else ifdef LOCAL_EXPORT_CFLAGS
142$(call pretty-error,LOCAL_EXPORT_CFLAGS can only be used by Soong, use LOCAL_EXPORT_C_INCLUDE_DIRS instead)
143endif
144$(export_includes): PRIVATE_EXPORT_CFLAGS := $(export_cflags)
Dan Willemsenba6a1642016-09-29 12:08:29 -0700145$(export_includes): $(LOCAL_EXPORT_C_INCLUDE_DEPS)
Colin Crosse18cb932014-02-13 15:04:18 -0800146 @echo Export includes file: $< -- $@
147 $(hide) mkdir -p $(dir $@) && rm -f $@
Dan Willemsen05909fa2017-03-19 13:22:45 -0700148ifdef export_cflags
149 $(hide) echo "$(PRIVATE_EXPORT_CFLAGS)" >$@
Colin Crosse18cb932014-02-13 15:04:18 -0800150else
151 $(hide) touch $@
152endif
Dan Willemsen05909fa2017-03-19 13:22:45 -0700153export_cflags :=
Colin Crosse18cb932014-02-13 15:04:18 -0800154
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700155ifdef LOCAL_SDK_VERSION
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700156my_link_type := native:ndk
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700157else ifdef LOCAL_USE_VNDK
Jiyong Parka3fb1582017-08-16 18:28:12 +0900158 _name := $(patsubst %.vendor,%,$(LOCAL_MODULE))
159 ifneq ($(filter $(_name),$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES) $(LLNDK_LIBRARIES)),)
160 ifeq ($(filter $(_name),$(VNDK_PRIVATE_LIBRARIES)),)
161 my_link_type := native:vndk
162 else
163 my_link_type := native:vndk_private
164 endif
165 else
166 my_link_type := native:vendor
167 endif
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700168else
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700169my_link_type := native:platform
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700170endif
Dan Willemsenb097fbe2016-06-07 14:25:14 -0700171
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700172# TODO: check dependencies of prebuilt files
173my_link_deps :=
174
175my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
176my_common :=
177include $(BUILD_SYSTEM)/link_type.mk
Colin Crosse18cb932014-02-13 15:04:18 -0800178endif # prebuilt_module_is_a_library
179
180# The real dependency will be added after all Android.mks are loaded and the install paths
181# of the shared libraries are determined.
182ifdef LOCAL_INSTALLED_MODULE
183ifdef LOCAL_SHARED_LIBRARIES
Ying Wang7c877392014-10-07 13:03:29 -0700184my_shared_libraries := $(LOCAL_SHARED_LIBRARIES)
185# Extra shared libraries introduced by LOCAL_CXX_STL.
186include $(BUILD_SYSTEM)/cxx_stl_setup.mk
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700187ifdef LOCAL_USE_VNDK
Jiyong Parka9c4c712017-07-18 13:35:27 +0900188 ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
Dan Willemsen9d2b3282017-04-07 20:58:43 -0700189 my_shared_libraries := $(foreach l,$(my_shared_libraries),\
190 $(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
191 endif
192endif
Ying Wang58f462f2014-02-25 18:26:29 -0800193$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
Ying Wang7c877392014-10-07 13:03:29 -0700194 $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries))
Colin Crosse18cb932014-02-13 15:04:18 -0800195
196# We also need the LOCAL_BUILT_MODULE dependency,
197# since we use -rpath-link which points to the built module's path.
Ying Wang7c877392014-10-07 13:03:29 -0700198my_built_shared_libraries := \
Ying Wang58f462f2014-02-25 18:26:29 -0800199 $(addprefix $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \
Colin Crosse18cb932014-02-13 15:04:18 -0800200 $(addsuffix $($(my_prefix)SHLIB_SUFFIX), \
Ying Wang7c877392014-10-07 13:03:29 -0700201 $(my_shared_libraries)))
202$(LOCAL_BUILT_MODULE) : $(my_built_shared_libraries)
Colin Crosse18cb932014-02-13 15:04:18 -0800203endif
204endif
205
Ying Wang7c877392014-10-07 13:03:29 -0700206# We need to enclose the above export_includes and my_built_shared_libraries in
Ying Wangb6eb8dd2016-03-01 20:14:52 -0800207# "my_strip_module not true" because otherwise the rules are defined in dynamic_binary.mk.
208endif # my_strip_module not true
Colin Crosse18cb932014-02-13 15:04:18 -0800209
Dan Willemsen9f956652016-10-21 15:04:12 -0700210ifeq ($(NATIVE_COVERAGE),true)
Dan Willemsen0f909082017-02-10 00:07:17 -0800211ifneq (,$(strip $(LOCAL_PREBUILT_COVERAGE_ARCHIVE)))
212 $(eval $(call copy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(intermediates)/$(LOCAL_MODULE).gcnodir))
213 ifneq ($(LOCAL_UNINSTALLABLE_MODULE),true)
214 ifdef LOCAL_IS_HOST_MODULE
215 my_coverage_path := $($(my_prefix)OUT_COVERAGE)/$(patsubst $($(my_prefix)OUT)/%,%,$(my_module_path))
216 else
217 my_coverage_path := $(TARGET_OUT_COVERAGE)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
218 endif
Dan Willemsenba9badf2017-11-20 12:45:48 -0800219 my_coverage_path := $(my_coverage_path)/$(patsubst %.so,%,$(my_installed_module_stem)).gcnodir
Dan Willemsen0f909082017-02-10 00:07:17 -0800220 $(eval $(call copy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(my_coverage_path)))
221 $(LOCAL_BUILT_MODULE): $(my_coverage_path)
222 endif
223else
Ryan Campbell81c9d292016-09-12 13:56:50 -0700224# Coverage information is needed when static lib is a dependency of another
225# coverage-enabled module.
226ifeq (STATIC_LIBRARIES, $(LOCAL_MODULE_CLASS))
227GCNO_ARCHIVE := $(LOCAL_MODULE).gcnodir
228$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_OBJECTS :=
229$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_ALL_WHOLE_STATIC_LIBRARIES :=
Dan Willemsen9f956652016-10-21 15:04:12 -0700230$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_PREFIX := $(my_prefix)
231$(intermediates)/$(GCNO_ARCHIVE) : PRIVATE_2ND_ARCH_VAR_PREFIX := $(LOCAL_2ND_ARCH_VAR_PREFIX)
Ryan Campbell81c9d292016-09-12 13:56:50 -0700232$(intermediates)/$(GCNO_ARCHIVE) :
233 $(transform-o-to-static-lib)
234endif
Dan Willemsen9f956652016-10-21 15:04:12 -0700235endif
Dan Willemsen0f909082017-02-10 00:07:17 -0800236endif
Ryan Campbell81c9d292016-09-12 13:56:50 -0700237
Ying Wangf0534c22014-04-15 11:12:21 -0700238ifeq ($(LOCAL_MODULE_CLASS),APPS)
Colin Crosse18cb932014-02-13 15:04:18 -0800239PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
240
Dan Willemsen048f56d2016-06-18 20:43:51 -0700241my_extract_apk := $(strip $(LOCAL_EXTRACT_APK))
242
Ying Wang43f7a322014-11-17 16:56:04 -0800243# Select dpi-specific source
244ifdef LOCAL_DPI_VARIANTS
Ying Wang60686582014-12-10 12:40:09 -0800245my_dpi := $(firstword $(filter $(LOCAL_DPI_VARIANTS),$(PRODUCT_AAPT_PREF_CONFIG) $(PRODUCT_AAPT_PREBUILT_DPI)))
Ying Wang43f7a322014-11-17 16:56:04 -0800246ifdef my_dpi
247ifdef LOCAL_DPI_FILE_STEM
248my_prebuilt_dpi_file_stem := $(LOCAL_DPI_FILE_STEM)
249else
250my_prebuilt_dpi_file_stem := $(LOCAL_MODULE)_%.apk
251endif
252my_prebuilt_src_file := $(dir $(my_prebuilt_src_file))$(subst %,$(my_dpi),$(my_prebuilt_dpi_file_stem))
Dan Willemsen048f56d2016-06-18 20:43:51 -0700253
254ifneq ($(strip $(LOCAL_EXTRACT_DPI_APK)),)
255my_extract_apk := $(subst %,$(my_dpi),$(LOCAL_EXTRACT_DPI_APK))
256endif # LOCAL_EXTRACT_DPI_APK
Ying Wang43f7a322014-11-17 16:56:04 -0800257endif # my_dpi
258endif # LOCAL_DPI_VARIANTS
259
Dan Willemsen048f56d2016-06-18 20:43:51 -0700260ifdef my_extract_apk
261my_extracted_apk := $(intermediates)/extracted.apk
262
263$(my_extracted_apk): PRIVATE_EXTRACT := $(my_extract_apk)
264$(my_extracted_apk): $(my_prebuilt_src_file)
265 @echo Extract APK: $@
266 $(hide) mkdir -p $(dir $@) && rm -f $@
267 $(hide) unzip -p $< $(PRIVATE_EXTRACT) >$@
268
269my_prebuilt_src_file := $(my_extracted_apk)
270my_extracted_apk :=
271my_extract_apk :=
Mathieu Chartier55eabd52017-09-15 13:40:48 -0700272ifeq ($(PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK),true)
273# If the product property is set, always preopt for extracted modules to prevent executing out of
274# the APK.
275my_preopt_for_extracted_apk := true
276endif
Dan Willemsen048f56d2016-06-18 20:43:51 -0700277endif
278
Ying Wang96bcad42014-04-17 13:38:04 -0700279rs_compatibility_jni_libs :=
280include $(BUILD_SYSTEM)/install_jni_libs.mk
281
Colin Crosse18cb932014-02-13 15:04:18 -0800282ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
283 # The magic string "EXTERNAL" means this package will be signed with
284 # the default dev key throughout the build process, but we expect
285 # the final package to be signed with a different key.
286 #
287 # This can be used for packages where we don't have access to the
288 # keys, but want the package to be predexopt'ed.
289 LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
290 PACKAGES.$(LOCAL_MODULE).EXTERNAL_KEY := 1
291
Shinichiro Hamaji641e61c2016-05-13 16:03:24 +0900292 $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem
Colin Crosse18cb932014-02-13 15:04:18 -0800293 $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
294 $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
295endif
296ifeq ($(LOCAL_CERTIFICATE),)
Ying Wangf0534c22014-04-15 11:12:21 -0700297 # It is now a build error to add a prebuilt .apk without
298 # specifying a key for it.
299 $(error No LOCAL_CERTIFICATE specified for prebuilt "$(my_prebuilt_src_file)")
Colin Crosse18cb932014-02-13 15:04:18 -0800300else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
301 # The magic string "PRESIGNED" means this package is already checked
302 # signed with its release key.
303 #
304 # By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be
305 # mentioned in apkcerts.txt (with certificate set to "PRESIGNED")
306 # but the dexpreopt process will not try to re-sign the app.
307 PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED
308 PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
309else
310 # If this is not an absolute certificate, assign it to a generic one.
311 ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
312 LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE)
313 endif
314
315 PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
316 PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
317 PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
318
Shinichiro Hamaji641e61c2016-05-13 16:03:24 +0900319 $(built_module) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem
Colin Crosse18cb932014-02-13 15:04:18 -0800320 $(built_module) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
321 $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
322endif
323
Andreas Gampe5e0dbe02014-10-01 22:01:16 -0700324# Disable dex-preopt of prebuilts to save space, if requested.
Ying Wang09c306c2016-03-15 16:36:29 -0700325ifndef LOCAL_DEX_PREOPT
Andreas Gampe5e0dbe02014-10-01 22:01:16 -0700326ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
Colin Crosse18cb932014-02-13 15:04:18 -0800327LOCAL_DEX_PREOPT := false
Andreas Gampe5e0dbe02014-10-01 22:01:16 -0700328endif
Ying Wang09c306c2016-03-15 16:36:29 -0700329endif
Colin Crosse18cb932014-02-13 15:04:18 -0800330
331#######################################
332# defines built_odex along with rule to install odex
333include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
334#######################################
Ying Wang09c306c2016-03-15 16:36:29 -0700335ifneq ($(LOCAL_REPLACE_PREBUILT_APK_INSTALLED),)
336# There is a replacement for the prebuilt .apk we can install without any processing.
337$(built_module) : $(LOCAL_REPLACE_PREBUILT_APK_INSTALLED)
338 $(transform-prebuilt-to-target)
Ying Wangb7d33c02016-03-15 16:28:57 -0700339
Ying Wang09c306c2016-03-15 16:36:29 -0700340else # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED
341# Sign and align non-presigned .apks.
Ying Wang1fb01522015-05-01 14:02:26 -0700342# The embedded prebuilt jni to uncompress.
Ying Wang226eb922015-06-01 19:19:57 -0700343ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
344# For PRESIGNED apks we must uncompress every .so file:
345# even if the .so file isn't for the current TARGET_ARCH,
346# we can't strip the file.
347embedded_prebuilt_jni_libs := 'lib/*.so'
348endif
Ying Wang1fb01522015-05-01 14:02:26 -0700349ifndef embedded_prebuilt_jni_libs
350# No LOCAL_PREBUILT_JNI_LIBS, uncompress all.
351embedded_prebuilt_jni_libs := 'lib/*.so'
352endif
353$(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs)
354
Alex Klyubin1b391c02016-12-15 12:51:25 -0800355$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(SIGNAPK_JAR)
Colin Crosse18cb932014-02-13 15:04:18 -0800356 $(transform-prebuilt-to-target)
Ying Wang226eb922015-06-01 19:19:57 -0700357 $(uncompress-shared-libs)
Nicolas Geoffrayb06c30b2017-09-19 11:51:45 +0000358ifneq (true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))
359ifeq (true,$(LOCAL_PRIVILEGED_MODULE))
360 $(uncompress-dexs)
Nicolas Geoffraya95fbd12017-09-19 13:10:31 +0100361else
362 ifneq (,$(filter $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES), $(LOCAL_MODULE)))
363 $(uncompress-dexs)
364 endif # PRODUCT_LOADED_BY_PRIVILEGED_MODULES
Nicolas Geoffrayb06c30b2017-09-19 11:51:45 +0000365endif # LOCAL_PRIVILEGED_MODULE
366endif # DONT_UNCOMPRESS_PRIV_APPS_DEXS
Ying Wang09c306c2016-03-15 16:36:29 -0700367ifdef LOCAL_DEX_PREOPT
368ifneq ($(BUILD_PLATFORM_ZIP),)
369 @# Keep a copy of apk with classes.dex unstripped
370 $(hide) cp -f $@ $(dir $@)package.dex.apk
371endif # BUILD_PLATFORM_ZIP
372endif # LOCAL_DEX_PREOPT
Kenny Rootdff37552015-04-15 12:09:32 -0700373ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
374 @# Only strip out files if we can re-sign the package.
Colin Crosse18cb932014-02-13 15:04:18 -0800375ifdef LOCAL_DEX_PREOPT
Ying Wang36142f62014-05-21 16:13:33 -0700376ifneq (nostripping,$(LOCAL_DEX_PREOPT))
377 $(call dexpreopt-remove-classes.dex,$@)
Ying Wang09c306c2016-03-15 16:36:29 -0700378endif # LOCAL_DEX_PREOPT != nostripping
379endif # LOCAL_DEX_PREOPT
Kenny Rootdff37552015-04-15 12:09:32 -0700380 $(sign-package)
Alex Klyubin5b826ac2015-12-04 10:07:41 -0800381 # No need for align-package because sign-package takes care of alignment
Ying Wang09c306c2016-03-15 16:36:29 -0700382else # LOCAL_CERTIFICATE == PRESIGNED
Colin Crosse18cb932014-02-13 15:04:18 -0800383 $(align-package)
Ying Wang09c306c2016-03-15 16:36:29 -0700384endif # LOCAL_CERTIFICATE
385endif # ! LOCAL_REPLACE_PREBUILT_APK_INSTALLED
Colin Crosse18cb932014-02-13 15:04:18 -0800386
Ying Wang36142f62014-05-21 16:13:33 -0700387###############################
388## Rule to build the odex file
389ifdef LOCAL_DEX_PREOPT
390$(built_odex) : $(my_prebuilt_src_file)
391 $(call dexpreopt-one-file,$<,$@)
392endif
393
Ying Wang00fe5872014-07-23 14:35:40 -0700394###############################
395## Install split apks.
396ifdef LOCAL_PACKAGE_SPLITS
397# LOCAL_PACKAGE_SPLITS is a list of apks to be installed.
Dan Willemsenf72308a2017-05-15 23:38:04 -0700398built_apk_splits := $(addprefix $(intermediates)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
Ying Wang00fe5872014-07-23 14:35:40 -0700399installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
400
Alex Klyubin5b826ac2015-12-04 10:07:41 -0800401# Rules to sign the split apks.
Ying Wang00fe5872014-07-23 14:35:40 -0700402my_src_dir := $(sort $(dir $(LOCAL_PACKAGE_SPLITS)))
403ifneq (1,$(words $(my_src_dir)))
404$(error You must put all the split source apks in the same folder: $(LOCAL_PACKAGE_SPLITS))
405endif
406my_src_dir := $(LOCAL_PATH)/$(my_src_dir)
407
Shinichiro Hamaji641e61c2016-05-13 16:03:24 +0900408$(built_apk_splits) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem
Ying Wang00fe5872014-07-23 14:35:40 -0700409$(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
410$(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
Dan Willemsenf72308a2017-05-15 23:38:04 -0700411$(built_apk_splits) : $(intermediates)/%.apk : $(my_src_dir)/%.apk
Ying Wang00fe5872014-07-23 14:35:40 -0700412 $(copy-file-to-new-target)
413 $(sign-package)
Ying Wang00fe5872014-07-23 14:35:40 -0700414
415# Rules to install the split apks.
Dan Willemsenf72308a2017-05-15 23:38:04 -0700416$(installed_apk_splits) : $(my_module_path)/%.apk : $(intermediates)/%.apk
Ying Wang00fe5872014-07-23 14:35:40 -0700417 @echo "Install: $@"
418 $(copy-file-to-new-target)
419
420# Register the additional built and installed files.
421ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
422ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
Dan Willemsenf72308a2017-05-15 23:38:04 -0700423 $(foreach s,$(LOCAL_PACKAGE_SPLITS),$(intermediates)/$(notdir $(s)):$(my_module_path)/$(notdir $(s)))
Ying Wang00fe5872014-07-23 14:35:40 -0700424
425# Make sure to install the splits when you run "make <module_name>".
Colin Cross33886702016-09-20 16:01:28 -0700426$(my_all_targets): $(installed_apk_splits)
Ying Wang00fe5872014-07-23 14:35:40 -0700427
428endif # LOCAL_PACKAGE_SPLITS
429
Ying Wangda366352016-03-15 17:05:52 -0700430else ifeq ($(prebuilt_module_is_dex_javalib),true) # ! LOCAL_MODULE_CLASS != APPS
Ying Wang09c306c2016-03-15 16:36:29 -0700431# This is a target shared library, i.e. a jar with classes.dex.
432#######################################
433# defines built_odex along with rule to install odex
434include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
435#######################################
436ifdef LOCAL_DEX_PREOPT
437ifneq ($(dexpreopt_boot_jar_module),) # boot jar
438# boot jar's rules are defined in dex_preopt.mk
439dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar
440$(built_module) : $(dexpreopted_boot_jar)
441 $(call copy-file-to-target)
Dan Willemsen08420cb2016-03-01 22:04:57 -0800442
Ying Wang09c306c2016-03-15 16:36:29 -0700443# For libart boot jars, we don't have .odex files.
444else # ! boot jar
445$(built_odex): PRIVATE_MODULE := $(LOCAL_MODULE)
446# Use pattern rule - we may have multiple built odex files.
447$(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(my_prebuilt_src_file)
448 @echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)"
449 $(call dexpreopt-one-file,$<,$@)
450
Colin Crossea1629e2017-10-06 13:55:48 -0700451$(eval $(call dexpreopt-copy-jar,$(my_prebuilt_src_file),$(built_module),$(LOCAL_DEX_PREOPT)))
Ying Wang09c306c2016-03-15 16:36:29 -0700452endif # boot jar
453else # ! LOCAL_DEX_PREOPT
454$(built_module) : $(my_prebuilt_src_file)
455 $(call copy-file-to-target)
456endif # LOCAL_DEX_PREOPT
457
458else # ! prebuilt_module_is_dex_javalib
Colin Crosse18cb932014-02-13 15:04:18 -0800459$(built_module) : $(my_prebuilt_src_file)
Dan Willemsen08420cb2016-03-01 22:04:57 -0800460ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
Colin Crosse18cb932014-02-13 15:04:18 -0800461 $(transform-prebuilt-to-target-strip-comments)
462else
Colin Crosse18cb932014-02-13 15:04:18 -0800463 $(transform-prebuilt-to-target)
Colin Crosse18cb932014-02-13 15:04:18 -0800464endif
Dan Willemsen7fe992c2016-03-02 13:54:51 -0800465ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
Dan Willemsen08420cb2016-03-01 22:04:57 -0800466 $(hide) chmod +x $@
467endif
Ying Wang09c306c2016-03-15 16:36:29 -0700468endif # ! prebuilt_module_is_dex_javalib
Colin Crosse18cb932014-02-13 15:04:18 -0800469
Ying Wang8c89b4b2016-02-22 15:54:27 -0800470ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
471my_src_jar := $(my_prebuilt_src_file)
Colin Cross941b6822017-03-29 13:53:29 -0700472
473ifdef LOCAL_IS_HOST_MODULE
474# for host java libraries deps should be in the common dir, so we make a copy in
475# the common dir.
476common_classes_jar := $(intermediates.COMMON)/classes.jar
Nan Zhangb3ec5342017-08-31 21:43:04 +0000477common_header_jar := $(intermediates.COMMON)/classes-header.jar
Colin Cross941b6822017-03-29 13:53:29 -0700478
Colin Cross96476c12017-04-06 09:56:19 -0700479$(common_classes_jar): PRIVATE_MODULE := $(LOCAL_MODULE)
Colin Crossd2e778f2017-04-14 15:14:33 -0700480$(common_classes_jar): PRIVATE_PREFIX := $(my_prefix)
Colin Cross941b6822017-03-29 13:53:29 -0700481
482$(common_classes_jar) : $(my_src_jar)
483 $(transform-prebuilt-to-target)
484
Colin Cross7dc90432017-09-26 16:17:24 -0700485ifneq ($(TURBINE_ENABLED),false)
Nan Zhangb3ec5342017-08-31 21:43:04 +0000486$(common_header_jar) : $(my_src_jar)
487 $(transform-prebuilt-to-target)
Colin Cross7dc90432017-09-26 16:17:24 -0700488endif
Nan Zhangb3ec5342017-08-31 21:43:04 +0000489
Colin Cross941b6822017-03-29 13:53:29 -0700490else # !LOCAL_IS_HOST_MODULE
Colin Crosse18cb932014-02-13 15:04:18 -0800491# for target java libraries, the LOCAL_BUILT_MODULE is in a product-specific dir,
492# while the deps should be in the common dir, so we make a copy in the common dir.
Ying Wange9dd9f22014-10-29 15:48:32 -0700493common_classes_jar := $(intermediates.COMMON)/classes.jar
Nan Zhangb3ec5342017-08-31 21:43:04 +0000494common_header_jar := $(intermediates.COMMON)/classes-header.jar
Colin Cross950f1ef2017-04-05 15:30:42 -0700495common_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar
Ying Wange9dd9f22014-10-29 15:48:32 -0700496common_javalib_jar := $(intermediates.COMMON)/javalib.jar
Colin Crosse18cb932014-02-13 15:04:18 -0800497
Colin Crossd2e778f2017-04-14 15:14:33 -0700498$(common_classes_jar) $(common_classes_pre_proguard_jar) $(common_javalib_jar): PRIVATE_MODULE := $(LOCAL_MODULE)
499$(common_classes_jar) $(common_classes_pre_proguard_jar) $(common_javalib_jar): PRIVATE_PREFIX := $(my_prefix)
Ying Wange9dd9f22014-10-29 15:48:32 -0700500
Dan Willemsen62dfb592016-07-08 21:33:05 -0700501ifeq ($(LOCAL_SDK_VERSION),system_current)
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700502my_link_type := java:system
Dan Willemsen62dfb592016-07-08 21:33:05 -0700503else ifneq ($(LOCAL_SDK_VERSION),)
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700504my_link_type := java:sdk
Dan Willemsen62dfb592016-07-08 21:33:05 -0700505else
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700506my_link_type := java:platform
Dan Willemsen62dfb592016-07-08 21:33:05 -0700507endif
Dan Willemsenb47d4e92017-04-08 00:31:31 -0700508
509# TODO: check dependencies of prebuilt files
510my_link_deps :=
511
512my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
513my_common := COMMON
514include $(BUILD_SYSTEM)/link_type.mk
Dan Willemsen62dfb592016-07-08 21:33:05 -0700515
Ying Wang09c306c2016-03-15 16:36:29 -0700516ifeq ($(prebuilt_module_is_dex_javalib),true)
517# For prebuilt shared Java library we don't have classes.jar.
518$(common_javalib_jar) : $(my_src_jar)
519 $(transform-prebuilt-to-target)
520
521else # ! prebuilt_module_is_dex_javalib
522
Ying Wangdd71c852015-12-04 13:59:18 -0800523my_src_aar := $(filter %.aar, $(my_prebuilt_src_file))
524ifneq ($(my_src_aar),)
Ying Wange9dd9f22014-10-29 15:48:32 -0700525# This is .aar file, archive of classes.jar and Android resources.
526my_src_jar := $(intermediates.COMMON)/aar/classes.jar
527
Ying Wangdd71c852015-12-04 13:59:18 -0800528$(my_src_jar) : $(my_src_aar)
Dan Willemsen7a1ad6c2017-04-27 23:10:47 -0700529 $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) $(dir $@)/res
Ying Wange9dd9f22014-10-29 15:48:32 -0700530 $(hide) unzip -qo -d $(dir $@) $<
531 # Make sure the extracted classes.jar has a new timestamp.
532 $(hide) touch $@
533
Ying Wange9dd9f22014-10-29 15:48:32 -0700534endif
Ying Wang09c306c2016-03-15 16:36:29 -0700535
Dan Willemsen7f016152016-02-29 17:52:39 -0800536$(common_classes_jar) : $(my_src_jar)
Colin Crosse18cb932014-02-13 15:04:18 -0800537 $(transform-prebuilt-to-target)
538
Colin Cross7dc90432017-09-26 16:17:24 -0700539ifneq ($(TURBINE_ENABLED),false)
Nan Zhangb3ec5342017-08-31 21:43:04 +0000540$(common_header_jar) : $(my_src_jar)
541 $(transform-prebuilt-to-target)
Colin Cross7dc90432017-09-26 16:17:24 -0700542endif
Nan Zhangb3ec5342017-08-31 21:43:04 +0000543
Colin Cross950f1ef2017-04-05 15:30:42 -0700544$(common_classes_pre_proguard_jar) : $(my_src_jar)
545 $(transform-prebuilt-to-target)
546
Dan Willemsen7f016152016-02-29 17:52:39 -0800547$(common_javalib_jar) : $(common_classes_jar)
Colin Crosse18cb932014-02-13 15:04:18 -0800548 $(transform-prebuilt-to-target)
549
Dan Willemsenbb6393c2017-11-17 15:39:52 -0800550ifdef LOCAL_AAPT2_ONLY
551LOCAL_USE_AAPT2 := true
552endif
553
Ying Wange295c3d2016-02-24 14:11:55 -0800554ifdef LOCAL_USE_AAPT2
Ying Wangdd71c852015-12-04 13:59:18 -0800555ifneq ($(my_src_aar),)
Dan Willemsen470e0e12017-04-27 22:28:06 -0700556LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
557ifeq ($(LOCAL_SDK_RES_VERSION),)
558 LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION)
559endif
560
561framework_res_package_export :=
562framework_res_package_export_deps :=
563# Please refer to package.mk
564ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
565ifneq ($(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))),)
566framework_res_package_export := \
567 $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
568framework_res_package_export_deps := $(framework_res_package_export)
569else
570framework_res_package_export := \
571 $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
572framework_res_package_export_deps := \
573 $(dir $(framework_res_package_export))src/R.stamp
574endif
575endif
576
Ying Wange295c3d2016-02-24 14:11:55 -0800577my_res_package := $(intermediates.COMMON)/package-res.apk
578
579# We needed only very few PRIVATE variables and aapt2.mk input variables. Reset the unnecessary ones.
580$(my_res_package): PRIVATE_AAPT2_CFLAGS :=
Dan Willemsene3c99012017-10-05 13:22:30 -0700581$(my_res_package): PRIVATE_AAPT_FLAGS := --static-lib --no-static-lib-packages --auto-add-overlay
Ying Wange295c3d2016-02-24 14:11:55 -0800582$(my_res_package): PRIVATE_ANDROID_MANIFEST := $(intermediates.COMMON)/aar/AndroidManifest.xml
Dan Willemsen470e0e12017-04-27 22:28:06 -0700583$(my_res_package): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
Ying Wange295c3d2016-02-24 14:11:55 -0800584$(my_res_package): PRIVATE_SOURCE_INTERMEDIATES_DIR :=
585$(my_res_package): PRIVATE_PROGUARD_OPTIONS_FILE :=
586$(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK :=
587$(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK :=
Adam Lesinskie758f932016-02-26 11:13:43 -0800588$(my_res_package): PRIVATE_PRODUCT_AAPT_CONFIG :=
589$(my_res_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG :=
590$(my_res_package): PRIVATE_TARGET_AAPT_CHARACTERISTICS :=
Dan Willemsen470e0e12017-04-27 22:28:06 -0700591$(my_res_package) : $(framework_res_package_export_deps)
Ying Wange295c3d2016-02-24 14:11:55 -0800592
593full_android_manifest :=
594my_res_resources :=
595my_overlay_resources :=
Dan Willemsen48845252017-04-27 21:25:34 -0700596my_compiled_res_base_dir := $(intermediates.COMMON)/flat-res
Ying Wange295c3d2016-02-24 14:11:55 -0800597R_file_stamp :=
598proguard_options_file :=
599my_generated_res_dirs := $(intermediates.COMMON)/aar/res
600my_generated_res_dirs_deps := $(my_src_jar)
601include $(BUILD_SYSTEM)/aapt2.mk
602
603# Make sure my_res_package is created when you run mm/mmm.
604$(built_module) : $(my_res_package)
Ying Wangdd71c852015-12-04 13:59:18 -0800605endif # $(my_src_aar)
Ying Wange295c3d2016-02-24 14:11:55 -0800606endif # LOCAL_USE_AAPT2
Colin Crosse18cb932014-02-13 15:04:18 -0800607# make sure the classes.jar and javalib.jar are built before $(LOCAL_BUILT_MODULE)
608$(built_module) : $(common_javalib_jar)
Ying Wang09c306c2016-03-15 16:36:29 -0700609
610endif # ! prebuilt_module_is_dex_javalib
Ying Wang8c89b4b2016-02-22 15:54:27 -0800611endif # LOCAL_IS_HOST_MODULE is not set
Yohann Rousseld87cc992016-01-19 16:08:34 +0100612
Yohann Rousselb4c49cb2014-09-08 14:45:14 +0200613endif # JAVA_LIBRARIES
614
Dan Willemsen1c6dc5b2016-01-06 14:28:36 -0800615$(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES)
Colin Crosse18cb932014-02-13 15:04:18 -0800616
617my_prebuilt_src_file :=
Mathieu Chartier55eabd52017-09-15 13:40:48 -0700618my_preopt_for_extracted_apk :=