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
|
|
|
###########################################################
|
|
|
|
|
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_
|
2016-03-17 03:53:19 +01:00
|
|
|
|
|
|
|
ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
|
|
|
|
LOCAL_MULTILIB := first
|
|
|
|
endif
|
2014-04-17 19:03:35 +02:00
|
|
|
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
|
|
|
OVERRIDE_BUILT_MODULE_PATH :=
|
|
|
|
LOCAL_BUILT_MODULE :=
|
|
|
|
LOCAL_INSTALLED_MODULE :=
|
|
|
|
LOCAL_MODULE_STEM :=
|
|
|
|
LOCAL_BUILT_MODULE_STEM :=
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM :=
|
|
|
|
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
|
|
|
|
2015-08-14 21:59:50 +02:00
|
|
|
ifdef LOCAL_IS_HOST_MODULE
|
|
|
|
ifdef HOST_CROSS_OS
|
|
|
|
ifneq (,$(filter EXECUTABLES STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)))
|
|
|
|
my_prefix := HOST_CROSS_
|
|
|
|
LOCAL_HOST_PREFIX := $(my_prefix)
|
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
|
|
|
# host cross compilation is supported
|
|
|
|
OVERRIDE_BUILT_MODULE_PATH :=
|
|
|
|
LOCAL_BUILT_MODULE :=
|
|
|
|
LOCAL_INSTALLED_MODULE :=
|
|
|
|
LOCAL_MODULE_STEM :=
|
|
|
|
LOCAL_BUILT_MODULE_STEM :=
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM :=
|
|
|
|
LOCAL_INTERMEDIATE_TARGETS :=
|
|
|
|
include $(BUILD_SYSTEM)/prebuilt_internal.mk
|
|
|
|
endif
|
|
|
|
LOCAL_HOST_PREFIX :=
|
|
|
|
endif
|
2016-02-09 23:55:13 +01:00
|
|
|
|
|
|
|
ifdef HOST_CROSS_2ND_ARCH
|
|
|
|
my_prefix := HOST_CROSS_
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
|
|
|
|
LOCAL_HOST_PREFIX := $(my_prefix)
|
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
|
|
|
OVERRIDE_BUILT_MODULE_PATH :=
|
|
|
|
LOCAL_BUILT_MODULE :=
|
|
|
|
LOCAL_INSTALLED_MODULE :=
|
|
|
|
LOCAL_MODULE_STEM :=
|
|
|
|
LOCAL_BUILT_MODULE_STEM :=
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM :=
|
|
|
|
LOCAL_INTERMEDIATE_TARGETS :=
|
|
|
|
include $(BUILD_SYSTEM)/prebuilt_internal.mk
|
|
|
|
endif
|
|
|
|
LOCAL_HOST_PREFIX :=
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
|
|
|
endif
|
2015-08-14 21:59:50 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-02-14 00:04:18 +01:00
|
|
|
my_module_arch_supported :=
|