2014-02-14 00:04:18 +01:00
|
|
|
###########################################################
|
|
|
|
## Standard rules for copying files that are prebuilt
|
|
|
|
##
|
|
|
|
## Additional inputs from base_rules.make:
|
|
|
|
## None.
|
|
|
|
##
|
|
|
|
###########################################################
|
|
|
|
|
2018-04-12 19:55:54 +02:00
|
|
|
include $(BUILD_SYSTEM)/use_lld_setup.mk
|
|
|
|
|
2014-02-14 00:04:18 +01:00
|
|
|
ifneq ($(LOCAL_PREBUILT_LIBS),)
|
2018-06-25 22:20:04 +02:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_LIBS anymore)
|
2014-02-14 00:04:18 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(LOCAL_PREBUILT_EXECUTABLES),)
|
2018-06-25 22:20:04 +02:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_EXECUTABLES anymore)
|
2014-02-14 00:04:18 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),)
|
2018-06-25 22:20:04 +02:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore)
|
2014-02-14 00:04:18 +01:00
|
|
|
endif
|
|
|
|
|
2014-05-16 19:38:43 +02:00
|
|
|
my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32)
|
|
|
|
|
2014-02-14 00:04:18 +01:00
|
|
|
ifdef LOCAL_PREBUILT_MODULE_FILE
|
2014-02-27 23:10:53 +01:00
|
|
|
my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE)
|
2018-02-28 00:27:30 +01:00
|
|
|
else ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
2019-06-12 19:13:28 +02:00
|
|
|
my_prebuilt_src_file := $(call clean-path,$(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
|
2018-02-28 00:27:30 +01:00
|
|
|
LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) :=
|
|
|
|
else ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix)
|
2019-06-12 19:13:28 +02:00
|
|
|
my_prebuilt_src_file := $(call clean-path,$(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix)))
|
2018-02-28 00:27:30 +01:00
|
|
|
LOCAL_SRC_FILES_$(my_32_64_bit_suffix) :=
|
|
|
|
else ifdef LOCAL_SRC_FILES
|
2019-06-12 19:13:28 +02:00
|
|
|
my_prebuilt_src_file := $(call clean-path,$(LOCAL_PATH)/$(LOCAL_SRC_FILES))
|
2018-02-28 00:27:30 +01:00
|
|
|
LOCAL_SRC_FILES :=
|
|
|
|
else ifdef LOCAL_REPLACE_PREBUILT_APK_INSTALLED
|
2019-03-20 18:35:43 +01:00
|
|
|
# This is handled specially in app_prebuilt_internal.mk
|
2014-02-14 00:04:18 +01:00
|
|
|
else
|
2018-02-28 00:27:30 +01:00
|
|
|
$(call pretty-error,No source files specified)
|
2014-02-14 00:04:18 +01:00
|
|
|
endif
|
|
|
|
|
2016-10-28 00:10:55 +02:00
|
|
|
LOCAL_CHECKED_MODULE := $(my_prebuilt_src_file)
|
|
|
|
|
2019-03-20 18:35:43 +01:00
|
|
|
ifneq (APPS,$(LOCAL_MODULE_CLASS))
|
2017-08-07 13:31:17 +02:00
|
|
|
ifdef LOCAL_COMPRESSED_MODULE
|
|
|
|
$(error $(LOCAL_MODULE) : LOCAL_COMPRESSED_MODULE can only be defined for module class APPS)
|
|
|
|
endif # LOCAL_COMPRESSED_MODULE
|
2019-03-20 18:35:43 +01:00
|
|
|
endif # APPS
|
2014-07-18 06:24:42 +02:00
|
|
|
|
2019-03-20 18:35:43 +01:00
|
|
|
ifeq (APPS,$(LOCAL_MODULE_CLASS))
|
|
|
|
include $(BUILD_SYSTEM)/app_prebuilt_internal.mk
|
|
|
|
else ifeq (JAVA_LIBRARIES,$(LOCAL_MODULE_CLASS))
|
|
|
|
include $(BUILD_SYSTEM)/java_prebuilt_internal.mk
|
2019-05-28 10:17:47 +02:00
|
|
|
else ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
|
2019-03-20 18:35:43 +01:00
|
|
|
include $(BUILD_SYSTEM)/cc_prebuilt_internal.mk
|
2019-05-28 10:17:47 +02:00
|
|
|
else ifneq ($(filter SCRIPT ETC DATA,$(LOCAL_MODULE_CLASS)),)
|
|
|
|
include $(BUILD_SYSTEM)/misc_prebuilt_internal.mk
|
|
|
|
else
|
|
|
|
$(error $(LOCAL_MODULE) : unexpected LOCAL_MODULE_CLASS for prebuilts: $(LOCAL_MODULE_CLASS))
|
2017-04-28 07:28:06 +02:00
|
|
|
endif
|
2019-03-18 22:25:00 +01:00
|
|
|
|
2016-01-06 23:28:36 +01:00
|
|
|
$(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
2014-02-14 00:04:18 +01:00
|
|
|
|
|
|
|
my_prebuilt_src_file :=
|
2017-09-15 22:40:48 +02:00
|
|
|
my_preopt_for_extracted_apk :=
|