1########################################################### 2## Determine if a module can be built for an arch 3## 4## Inputs from module makefile: 5## my_prefix TARGET_ or HOST_ 6## my_module_multilib 7## LOCAL_MODULE_$(my_prefix)ARCH 8## LOCAL_MODULE_$(my_prefix)ARCH_WARN 9## LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH 10## LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH_WARN 11## 12## Inputs from build system: 13## $(my_prefix)IS_64_BIT 14## LOCAL_2ND_ARCH_VAR_PREFIX 15## 16## Outputs: 17## my_module_arch_supported := (true|false) 18########################################################### 19 20my_module_arch_supported := true 21 22ifeq ($(my_module_multilib),none) 23my_module_arch_supported := false 24endif 25 26ifeq ($(LOCAL_2ND_ARCH_VAR_PREFIX),) 27ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),true|32) 28my_module_arch_supported := false 29else ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),|64) 30my_module_arch_supported := false 31endif 32else # LOCAL_2ND_ARCH_VAR_PREFIX 33ifeq ($(my_module_multilib),first) 34my_module_arch_supported := false 35else ifeq ($(my_module_multilib),64) 36my_module_arch_supported := false 37endif 38endif # LOCAL_2ND_ARCH_VAR_PREFIX 39 40ifneq (,$(LOCAL_MODULE_$(my_prefix)ARCH)) 41ifeq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_$(my_prefix)ARCH))) 42my_module_arch_supported := false 43endif 44endif 45 46ifneq (,$(LOCAL_MODULE_$(my_prefix)ARCH_WARN)) 47ifeq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_$(my_prefix)ARCH_WARN))) 48my_module_arch_supported := false 49$(warning $(LOCAL_MODULE): architecture $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) not supported) 50endif 51endif 52 53ifneq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH))) 54my_module_arch_supported := false 55endif 56 57ifneq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH_WARN))) 58my_module_arch_supported := false 59$(warning $(LOCAL_MODULE): architecture $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) unsupported) 60endif 61