2014-02-14 07:04:18 +08:00
|
|
|
###########################################################
|
|
|
|
## Standard rules for copying files that are prebuilt
|
|
|
|
##
|
|
|
|
## Additional inputs from base_rules.make:
|
|
|
|
## None.
|
|
|
|
##
|
|
|
|
###########################################################
|
|
|
|
|
2018-04-13 01:55:54 +08:00
|
|
|
include $(BUILD_SYSTEM)/use_lld_setup.mk
|
|
|
|
|
2014-02-14 07:04:18 +08:00
|
|
|
ifneq ($(LOCAL_PREBUILT_LIBS),)
|
2018-06-26 04:20:04 +08:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_LIBS anymore)
|
2014-02-14 07:04:18 +08:00
|
|
|
endif
|
|
|
|
ifneq ($(LOCAL_PREBUILT_EXECUTABLES),)
|
2018-06-26 04:20:04 +08:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_EXECUTABLES anymore)
|
2014-02-14 07:04:18 +08:00
|
|
|
endif
|
|
|
|
ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),)
|
2018-06-26 04:20:04 +08:00
|
|
|
$(call pretty-error,dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore)
|
2014-02-14 07:04:18 +08:00
|
|
|
endif
|
|
|
|
|
2014-05-17 01:38:43 +08:00
|
|
|
my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32)
|
|
|
|
|
2014-02-14 07:04:18 +08:00
|
|
|
ifdef LOCAL_PREBUILT_MODULE_FILE
|
2014-02-28 06:10:53 +08:00
|
|
|
my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE)
|
2018-02-28 07:27:30 +08:00
|
|
|
else ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
|
|
|
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
|
|
|
LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) :=
|
|
|
|
else ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix)
|
|
|
|
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
|
|
|
|
LOCAL_SRC_FILES_$(my_32_64_bit_suffix) :=
|
|
|
|
else ifdef LOCAL_SRC_FILES
|
|
|
|
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
|
|
|
|
LOCAL_SRC_FILES :=
|
|
|
|
else ifdef LOCAL_REPLACE_PREBUILT_APK_INSTALLED
|
2019-03-21 01:35:43 +08:00
|
|
|
# This is handled specially in app_prebuilt_internal.mk
|
2014-02-14 07:04:18 +08:00
|
|
|
else
|
2018-02-28 07:27:30 +08:00
|
|
|
$(call pretty-error,No source files specified)
|
2014-02-14 07:04:18 +08:00
|
|
|
endif
|
|
|
|
|
2016-10-28 06:10:55 +08:00
|
|
|
LOCAL_CHECKED_MODULE := $(my_prebuilt_src_file)
|
|
|
|
|
2019-03-21 01:35:43 +08:00
|
|
|
ifneq (APPS,$(LOCAL_MODULE_CLASS))
|
2017-08-07 19:31:17 +08: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-21 01:35:43 +08:00
|
|
|
endif # APPS
|
2014-07-18 12:24:42 +08:00
|
|
|
|
2019-03-21 01:35:43 +08: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 16:17:47 +08:00
|
|
|
else ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
|
2019-03-21 01:35:43 +08:00
|
|
|
include $(BUILD_SYSTEM)/cc_prebuilt_internal.mk
|
2019-05-28 16:17:47 +08: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 13:28:06 +08:00
|
|
|
endif
|
2019-03-19 05:25:00 +08:00
|
|
|
|
2016-01-07 06:28:36 +08:00
|
|
|
$(built_module) : $(LOCAL_ADDITIONAL_DEPENDENCIES)
|
2014-02-14 07:04:18 +08:00
|
|
|
|
|
|
|
my_prebuilt_src_file :=
|
2017-09-16 04:40:48 +08:00
|
|
|
my_preopt_for_extracted_apk :=
|