blob: ed25f71aa19f2861b748315ed7846464d3c59481 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001###########################################################
2## Standard rules for copying files that are prebuilt
3##
4## Additional inputs from base_rules.make:
5## None.
Doug Zongker1046d202009-08-06 13:02:19 -07006##
The Android Open Source Project88b60792009-03-03 19:28:42 -08007###########################################################
8
Ying Wangc36b4502011-09-15 12:00:52 -07009ifdef LOCAL_IS_HOST_MODULE
Ying Wang6feb6d52014-04-17 10:03:35 -070010 my_prefix := HOST_
Dan Willemsen057aaea2015-08-14 12:59:50 -070011 LOCAL_HOST_PREFIX :=
Ying Wang6feb6d52014-04-17 10:03:35 -070012else
13 my_prefix := TARGET_
14endif
Colin Crosse6e48f62014-03-21 12:29:32 -070015
16include $(BUILD_SYSTEM)/multilib.mk
17
Ying Wang34d5f1b2014-05-16 10:38:43 -070018my_skip_non_preferred_arch :=
Colin Crosse6e48f62014-03-21 12:29:32 -070019
20# check if first arch is supported
Ying Wang85f24a42014-10-21 18:34:30 -070021LOCAL_2ND_ARCH_VAR_PREFIX :=
Colin Crosse18cb932014-02-13 15:04:18 -080022include $(BUILD_SYSTEM)/module_arch_supported.mk
23ifeq ($(my_module_arch_supported),true)
Colin Crosse6e48f62014-03-21 12:29:32 -070024# first arch is supported
Colin Crosse18cb932014-02-13 15:04:18 -080025include $(BUILD_SYSTEM)/prebuilt_internal.mk
Ying Wang34d5f1b2014-05-16 10:38:43 -070026ifneq ($(my_module_multilib),both)
27my_skip_non_preferred_arch := true
28endif # $(my_module_multilib)
Ying Wanga11cf4d2014-12-01 15:56:19 -080029# For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both".
30ifeq (APPS,$(LOCAL_MODULE_CLASS))
31my_skip_non_preferred_arch := true
32endif
Ying Wang34d5f1b2014-05-16 10:38:43 -070033endif # $(my_module_arch_supported)
34
35ifndef my_skip_non_preferred_arch
36ifneq (,$($(my_prefix)2ND_ARCH))
Colin Crosse18cb932014-02-13 15:04:18 -080037# check if secondary arch is supported
Ying Wang6feb6d52014-04-17 10:03:35 -070038LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
Colin Crosse18cb932014-02-13 15:04:18 -080039include $(BUILD_SYSTEM)/module_arch_supported.mk
40ifeq ($(my_module_arch_supported),true)
41# secondary arch is supported
Ying Wang34d5f1b2014-05-16 10:38:43 -070042OVERRIDE_BUILT_MODULE_PATH :=
43LOCAL_BUILT_MODULE :=
44LOCAL_INSTALLED_MODULE :=
45LOCAL_MODULE_STEM :=
46LOCAL_BUILT_MODULE_STEM :=
47LOCAL_INSTALLED_MODULE_STEM :=
48LOCAL_INTERMEDIATE_TARGETS :=
Colin Crosse18cb932014-02-13 15:04:18 -080049include $(BUILD_SYSTEM)/prebuilt_internal.mk
Ying Wang34d5f1b2014-05-16 10:38:43 -070050endif # $(my_module_arch_supported)
51endif # $($(my_prefix)2ND_ARCH)
52endif # $(my_skip_non_preferred_arch) not true
Colin Cross0b70c432014-01-24 13:34:51 -080053
54LOCAL_2ND_ARCH_VAR_PREFIX :=
Colin Crosse18cb932014-02-13 15:04:18 -080055
Dan Willemsen057aaea2015-08-14 12:59:50 -070056ifdef LOCAL_IS_HOST_MODULE
57ifdef HOST_CROSS_OS
58ifneq (,$(filter EXECUTABLES STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)))
59my_prefix := HOST_CROSS_
60LOCAL_HOST_PREFIX := $(my_prefix)
61include $(BUILD_SYSTEM)/module_arch_supported.mk
62ifeq ($(my_module_arch_supported),true)
63# host cross compilation is supported
64OVERRIDE_BUILT_MODULE_PATH :=
65LOCAL_BUILT_MODULE :=
66LOCAL_INSTALLED_MODULE :=
67LOCAL_MODULE_STEM :=
68LOCAL_BUILT_MODULE_STEM :=
69LOCAL_INSTALLED_MODULE_STEM :=
70LOCAL_INTERMEDIATE_TARGETS :=
71include $(BUILD_SYSTEM)/prebuilt_internal.mk
72endif
73LOCAL_HOST_PREFIX :=
74endif
75endif
76endif
77
Colin Crosse18cb932014-02-13 15:04:18 -080078my_module_arch_supported :=