The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | ########################################################### |
| 2 | ## Standard rules for copying files that are prebuilt |
| 3 | ## |
| 4 | ## Additional inputs from base_rules.make: |
| 5 | ## None. |
Doug Zongker | 1046d20 | 2009-08-06 13:02:19 -0700 | [diff] [blame] | 6 | ## |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 7 | ########################################################### |
| 8 | |
Ying Wang | c36b450 | 2011-09-15 12:00:52 -0700 | [diff] [blame] | 9 | ifdef LOCAL_IS_HOST_MODULE |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 10 | my_prefix := HOST_ |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 11 | LOCAL_HOST_PREFIX := |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 12 | else |
| 13 | my_prefix := TARGET_ |
| 14 | endif |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 15 | |
| 16 | include $(BUILD_SYSTEM)/multilib.mk |
| 17 | |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 18 | my_skip_non_preferred_arch := |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 19 | |
| 20 | # check if first arch is supported |
Ying Wang | 85f24a4 | 2014-10-21 18:34:30 -0700 | [diff] [blame] | 21 | LOCAL_2ND_ARCH_VAR_PREFIX := |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 22 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 23 | ifeq ($(my_module_arch_supported),true) |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 24 | # first arch is supported |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 25 | include $(BUILD_SYSTEM)/prebuilt_internal.mk |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 26 | ifneq ($(my_module_multilib),both) |
| 27 | my_skip_non_preferred_arch := true |
| 28 | endif # $(my_module_multilib) |
Ying Wang | a11cf4d | 2014-12-01 15:56:19 -0800 | [diff] [blame] | 29 | # For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both". |
| 30 | ifeq (APPS,$(LOCAL_MODULE_CLASS)) |
| 31 | my_skip_non_preferred_arch := true |
| 32 | endif |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 33 | endif # $(my_module_arch_supported) |
| 34 | |
| 35 | ifndef my_skip_non_preferred_arch |
| 36 | ifneq (,$($(my_prefix)2ND_ARCH)) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 37 | # check if secondary arch is supported |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 38 | LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX) |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 39 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 40 | ifeq ($(my_module_arch_supported),true) |
| 41 | # secondary arch is supported |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 42 | OVERRIDE_BUILT_MODULE_PATH := |
| 43 | LOCAL_BUILT_MODULE := |
| 44 | LOCAL_INSTALLED_MODULE := |
| 45 | LOCAL_MODULE_STEM := |
| 46 | LOCAL_BUILT_MODULE_STEM := |
| 47 | LOCAL_INSTALLED_MODULE_STEM := |
| 48 | LOCAL_INTERMEDIATE_TARGETS := |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 49 | include $(BUILD_SYSTEM)/prebuilt_internal.mk |
Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 50 | endif # $(my_module_arch_supported) |
| 51 | endif # $($(my_prefix)2ND_ARCH) |
| 52 | endif # $(my_skip_non_preferred_arch) not true |
Colin Cross | 0b70c43 | 2014-01-24 13:34:51 -0800 | [diff] [blame] | 53 | |
| 54 | LOCAL_2ND_ARCH_VAR_PREFIX := |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 55 | |
Dan Willemsen | 057aaea | 2015-08-14 12:59:50 -0700 | [diff] [blame] | 56 | ifdef LOCAL_IS_HOST_MODULE |
| 57 | ifdef HOST_CROSS_OS |
| 58 | ifneq (,$(filter EXECUTABLES STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS))) |
| 59 | my_prefix := HOST_CROSS_ |
| 60 | LOCAL_HOST_PREFIX := $(my_prefix) |
| 61 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 62 | ifeq ($(my_module_arch_supported),true) |
| 63 | # host cross compilation is supported |
| 64 | OVERRIDE_BUILT_MODULE_PATH := |
| 65 | LOCAL_BUILT_MODULE := |
| 66 | LOCAL_INSTALLED_MODULE := |
| 67 | LOCAL_MODULE_STEM := |
| 68 | LOCAL_BUILT_MODULE_STEM := |
| 69 | LOCAL_INSTALLED_MODULE_STEM := |
| 70 | LOCAL_INTERMEDIATE_TARGETS := |
| 71 | include $(BUILD_SYSTEM)/prebuilt_internal.mk |
| 72 | endif |
| 73 | LOCAL_HOST_PREFIX := |
| 74 | endif |
| 75 | endif |
| 76 | endif |
| 77 | |
Colin Cross | e18cb93 | 2014-02-13 15:04:18 -0800 | [diff] [blame] | 78 | my_module_arch_supported := |