2009-03-04 04:28:42 +01:00
|
|
|
###########################################################
|
|
|
|
## Standard rules for copying files that are prebuilt
|
|
|
|
##
|
|
|
|
## Additional inputs from base_rules.make:
|
|
|
|
## None.
|
2009-08-06 22:02:19 +02:00
|
|
|
##
|
2009-03-04 04:28:42 +01:00
|
|
|
###########################################################
|
2016-07-26 01:03:53 +02:00
|
|
|
$(call record-module-type,PREBUILT)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2011-09-15 21:00:52 +02:00
|
|
|
ifdef LOCAL_IS_HOST_MODULE
|
2014-04-17 19:03:35 +02:00
|
|
|
my_prefix := HOST_
|
2015-08-14 21:59:50 +02:00
|
|
|
LOCAL_HOST_PREFIX :=
|
2014-04-17 19:03:35 +02:00
|
|
|
else
|
|
|
|
my_prefix := TARGET_
|
|
|
|
endif
|
2014-03-21 20:29:32 +01:00
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/multilib.mk
|
|
|
|
|
2014-05-16 19:38:43 +02:00
|
|
|
my_skip_non_preferred_arch :=
|
2014-03-21 20:29:32 +01:00
|
|
|
|
|
|
|
# check if first arch is supported
|
2014-10-22 03:34:30 +02:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
2014-02-14 00:04:18 +01:00
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
2014-03-21 20:29:32 +01:00
|
|
|
# first arch is supported
|
2014-02-14 00:04:18 +01:00
|
|
|
include $(BUILD_SYSTEM)/prebuilt_internal.mk
|
2014-05-16 19:38:43 +02:00
|
|
|
ifneq ($(my_module_multilib),both)
|
|
|
|
my_skip_non_preferred_arch := true
|
|
|
|
endif # $(my_module_multilib)
|
2014-12-02 00:56:19 +01:00
|
|
|
# For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both".
|
|
|
|
ifeq (APPS,$(LOCAL_MODULE_CLASS))
|
|
|
|
my_skip_non_preferred_arch := true
|
|
|
|
endif
|
2014-05-16 19:38:43 +02:00
|
|
|
endif # $(my_module_arch_supported)
|
|
|
|
|
|
|
|
ifndef my_skip_non_preferred_arch
|
|
|
|
ifneq (,$($(my_prefix)2ND_ARCH))
|
2014-02-14 00:04:18 +01:00
|
|
|
# check if secondary arch is supported
|
2014-04-17 19:03:35 +02:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
|
2014-02-14 00:04:18 +01:00
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
|
|
|
# secondary arch is supported
|
2014-05-16 19:38:43 +02:00
|
|
|
LOCAL_BUILT_MODULE :=
|
|
|
|
LOCAL_INSTALLED_MODULE :=
|
|
|
|
LOCAL_INTERMEDIATE_TARGETS :=
|
2014-02-14 00:04:18 +01:00
|
|
|
include $(BUILD_SYSTEM)/prebuilt_internal.mk
|
2014-05-16 19:38:43 +02:00
|
|
|
endif # $(my_module_arch_supported)
|
|
|
|
endif # $($(my_prefix)2ND_ARCH)
|
|
|
|
endif # $(my_skip_non_preferred_arch) not true
|
2014-01-24 22:34:51 +01:00
|
|
|
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
2014-02-14 00:04:18 +01:00
|
|
|
|
|
|
|
my_module_arch_supported :=
|