1 2my_prefix := HOST_ 3include $(BUILD_SYSTEM)/multilib.mk 4 5ifndef LOCAL_MODULE_HOST_ARCH 6ifndef my_module_multilib 7ifeq ($(HOST_PREFER_32_BIT),true) 8my_module_multilib := 32 9else 10# By default we only build host module for the first arch. 11my_module_multilib := first 12endif 13endif 14endif 15 16ifeq ($(LOCAL_NO_FPIE),) 17LOCAL_LDFLAGS += $(HOST_FPIE_FLAGS) 18endif 19 20ifeq ($(my_module_multilib),both) 21ifeq ($(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)) 23endif 24ifeq ($(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)) 26endif 27else #!LOCAL_MULTILIB == both 28LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true 29endif 30 31LOCAL_2ND_ARCH_VAR_PREFIX := 32include $(BUILD_SYSTEM)/module_arch_supported.mk 33 34ifeq ($(my_module_arch_supported),true) 35include $(BUILD_SYSTEM)/host_executable_internal.mk 36endif 37 38ifdef HOST_2ND_ARCH 39LOCAL_2ND_ARCH_VAR_PREFIX := $(HOST_2ND_ARCH_VAR_PREFIX) 40include $(BUILD_SYSTEM)/module_arch_supported.mk 41ifeq ($(my_module_arch_supported),true) 42# Build for HOST_2ND_ARCH 43OVERRIDE_BUILT_MODULE_PATH := 44LOCAL_BUILT_MODULE := 45LOCAL_INSTALLED_MODULE := 46LOCAL_INTERMEDIATE_TARGETS := 47 48include $(BUILD_SYSTEM)/host_executable_internal.mk 49endif 50LOCAL_2ND_ARCH_VAR_PREFIX := 51endif # HOST_2ND_ARCH 52 53LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := 54my_module_arch_supported := 55