The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 2 | my_prefix := HOST_ |
| 3 | include $(BUILD_SYSTEM)/multilib.mk |
| 4 | |
Ying Wang | 6e85f8b | 2014-06-10 16:21:50 -0700 | [diff] [blame] | 5 | ifndef LOCAL_MODULE_HOST_ARCH |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 6 | ifndef my_module_multilib |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 7 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 8 | my_module_multilib := 32 |
| 9 | else |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 10 | # By default we only build host module for the first arch. |
| 11 | my_module_multilib := first |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 12 | endif |
Ying Wang | 966c1e0 | 2014-05-20 14:43:51 -0700 | [diff] [blame] | 13 | endif |
Ying Wang | 6e85f8b | 2014-06-10 16:21:50 -0700 | [diff] [blame] | 14 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 15 | |
Tim Murray | 595d0db | 2014-09-03 15:01:46 -0700 | [diff] [blame] | 16 | ifeq ($(LOCAL_NO_FPIE),) |
| 17 | LOCAL_LDFLAGS += $(HOST_FPIE_FLAGS) |
| 18 | endif |
| 19 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 20 | ifeq ($(my_module_multilib),both) |
| 21 | ifeq ($(LOCAL_MODULE_PATH_32)$(LOCAL_MODULE_STEM_32),) |
| 22 | $(error $(LOCAL_PATH): LOCAL_MODULE_STEM_32 or LOCAL_MODULE_PATH_32 is required for LOCAL_MULTILIB := both for module $(LOCAL_MODULE)) |
Ying Wang | 63d94fa | 2012-12-13 18:23:01 -0800 | [diff] [blame] | 23 | endif |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 24 | ifeq ($(LOCAL_MODULE_PATH_64)$(LOCAL_MODULE_STEM_64),) |
| 25 | $(error $(LOCAL_PATH): LOCAL_MODULE_STEM_64 or LOCAL_MODULE_PATH_64 is required for LOCAL_MULTILIB := both for module $(LOCAL_MODULE)) |
| 26 | endif |
| 27 | else #!LOCAL_MULTILIB == both |
| 28 | LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true |
Ying Wang | 63d94fa | 2012-12-13 18:23:01 -0800 | [diff] [blame] | 29 | endif |
| 30 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 31 | LOCAL_2ND_ARCH_VAR_PREFIX := |
| 32 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
Ying Wang | 63d94fa | 2012-12-13 18:23:01 -0800 | [diff] [blame] | 33 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 34 | ifeq ($(my_module_arch_supported),true) |
| 35 | include $(BUILD_SYSTEM)/host_executable_internal.mk |
| 36 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 37 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 38 | ifdef HOST_2ND_ARCH |
| 39 | LOCAL_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) |
| 40 | include $(BUILD_SYSTEM)/module_arch_supported.mk |
| 41 | ifeq ($(my_module_arch_supported),true) |
| 42 | # Build for HOST_2ND_ARCH |
| 43 | OVERRIDE_BUILT_MODULE_PATH := |
| 44 | LOCAL_BUILT_MODULE := |
| 45 | LOCAL_INSTALLED_MODULE := |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 46 | LOCAL_INTERMEDIATE_TARGETS := |
Ying Wang | 63d94fa | 2012-12-13 18:23:01 -0800 | [diff] [blame] | 47 | |
Ying Wang | 6feb6d5 | 2014-04-17 10:03:35 -0700 | [diff] [blame] | 48 | include $(BUILD_SYSTEM)/host_executable_internal.mk |
| 49 | endif |
| 50 | LOCAL_2ND_ARCH_VAR_PREFIX := |
| 51 | endif # HOST_2ND_ARCH |
| 52 | |
| 53 | LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := |
| 54 | my_module_arch_supported := |