• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_
15
16  ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
17    # Only support prebuilt shared and static libraries for translated arch
18    ifeq ($(filter SHARED_LIBRARIES STATIC_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
19      LOCAL_MULTILIB := first
20    endif
21  endif
22endif
23
24include $(BUILD_SYSTEM)/multilib.mk
25
26my_skip_non_preferred_arch :=
27
28# check if first arch is supported
29LOCAL_2ND_ARCH_VAR_PREFIX :=
30include $(BUILD_SYSTEM)/module_arch_supported.mk
31ifeq ($(my_module_arch_supported),true)
32# first arch is supported
33include $(BUILD_SYSTEM)/prebuilt_internal.mk
34ifneq ($(my_module_multilib),both)
35my_skip_non_preferred_arch := true
36endif # $(my_module_multilib)
37# For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both".
38ifeq (APPS,$(LOCAL_MODULE_CLASS))
39my_skip_non_preferred_arch := true
40endif
41endif # $(my_module_arch_supported)
42
43ifndef my_skip_non_preferred_arch
44ifneq (,$($(my_prefix)2ND_ARCH))
45# check if secondary arch is supported
46LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
47include $(BUILD_SYSTEM)/module_arch_supported.mk
48ifeq ($(my_module_arch_supported),true)
49# secondary arch is supported
50LOCAL_BUILT_MODULE :=
51LOCAL_INSTALLED_MODULE :=
52LOCAL_INTERMEDIATE_TARGETS :=
53include $(BUILD_SYSTEM)/prebuilt_internal.mk
54endif # $(my_module_arch_supported)
55endif # $($(my_prefix)2ND_ARCH)
56endif # $(my_skip_non_preferred_arch) not true
57
58LOCAL_2ND_ARCH_VAR_PREFIX :=
59
60my_module_arch_supported :=
61