1###########################################################
2## Standard rules for copying files that are prebuilt
3##
4## Additional inputs from base_rules.make:
5## None.
6##
7###########################################################
8$(call record-module-type,PREBUILT)
9
10ifdef LOCAL_IS_HOST_MODULE
11  my_prefix := HOST_
12  LOCAL_HOST_PREFIX :=
13else
14  my_prefix := TARGET_
15endif
16
17include $(BUILD_SYSTEM)/multilib.mk
18
19my_skip_non_preferred_arch :=
20
21# check if first arch is supported
22LOCAL_2ND_ARCH_VAR_PREFIX :=
23include $(BUILD_SYSTEM)/module_arch_supported.mk
24ifeq ($(my_module_arch_supported),true)
25# first arch is supported
26include $(BUILD_SYSTEM)/prebuilt_internal.mk
27ifneq ($(my_module_multilib),both)
28my_skip_non_preferred_arch := true
29endif # $(my_module_multilib)
30# For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both".
31ifeq (APPS,$(LOCAL_MODULE_CLASS))
32my_skip_non_preferred_arch := true
33endif
34endif # $(my_module_arch_supported)
35
36ifndef my_skip_non_preferred_arch
37ifneq (,$($(my_prefix)2ND_ARCH))
38# check if secondary arch is supported
39LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
40include $(BUILD_SYSTEM)/module_arch_supported.mk
41ifeq ($(my_module_arch_supported),true)
42# secondary arch is supported
43LOCAL_BUILT_MODULE :=
44LOCAL_INSTALLED_MODULE :=
45LOCAL_INTERMEDIATE_TARGETS :=
46include $(BUILD_SYSTEM)/prebuilt_internal.mk
47endif # $(my_module_arch_supported)
48endif # $($(my_prefix)2ND_ARCH)
49endif # $(my_skip_non_preferred_arch) not true
50
51LOCAL_2ND_ARCH_VAR_PREFIX :=
52
53my_module_arch_supported :=
54