2014-02-06 22:45:37 +00:00
|
|
|
###########################################################
|
|
|
|
## Determine if a module can be built for an arch
|
|
|
|
##
|
|
|
|
## Inputs from module makefile:
|
2014-04-17 17:03:35 +00:00
|
|
|
## my_prefix TARGET_ or HOST_
|
2014-03-21 19:29:32 +00:00
|
|
|
## my_module_multilib
|
2014-04-17 17:03:35 +00:00
|
|
|
## LOCAL_MODULE_$(my_prefix)ARCH
|
|
|
|
## LOCAL_MODULE_$(my_prefix)ARCH_WARN
|
|
|
|
## LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH
|
|
|
|
## LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH_WARN
|
2014-02-06 22:45:37 +00:00
|
|
|
##
|
|
|
|
## Inputs from build system:
|
2014-04-17 17:03:35 +00:00
|
|
|
## $(my_prefix)IS_64_BIT
|
2014-02-06 22:45:37 +00:00
|
|
|
## LOCAL_2ND_ARCH_VAR_PREFIX
|
|
|
|
##
|
|
|
|
## Outputs:
|
|
|
|
## my_module_arch_supported := (true|false)
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
my_module_arch_supported := true
|
|
|
|
|
2014-03-21 19:29:32 +00:00
|
|
|
ifeq ($(my_module_multilib),none)
|
|
|
|
my_module_arch_supported := false
|
|
|
|
endif
|
|
|
|
|
2014-02-06 22:45:37 +00:00
|
|
|
ifeq ($(LOCAL_2ND_ARCH_VAR_PREFIX),)
|
2014-04-17 17:03:35 +00:00
|
|
|
ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),true|32)
|
2014-01-24 21:38:08 +00:00
|
|
|
my_module_arch_supported := false
|
2014-04-17 17:03:35 +00:00
|
|
|
else ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),|64)
|
2014-04-10 18:28:04 +00:00
|
|
|
my_module_arch_supported := false
|
2014-02-06 22:45:37 +00:00
|
|
|
endif
|
|
|
|
else # LOCAL_2ND_ARCH_VAR_PREFIX
|
2014-03-21 19:29:32 +00:00
|
|
|
ifeq ($(my_module_multilib),first)
|
2014-02-06 22:45:37 +00:00
|
|
|
my_module_arch_supported := false
|
2014-04-10 18:28:04 +00:00
|
|
|
else ifeq ($(my_module_multilib),64)
|
|
|
|
my_module_arch_supported := false
|
2014-02-06 22:45:37 +00:00
|
|
|
endif
|
2014-03-21 19:29:32 +00:00
|
|
|
endif # LOCAL_2ND_ARCH_VAR_PREFIX
|
2014-02-06 22:45:37 +00:00
|
|
|
|
2014-04-17 17:03:35 +00:00
|
|
|
ifneq (,$(LOCAL_MODULE_$(my_prefix)ARCH))
|
|
|
|
ifeq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_$(my_prefix)ARCH)))
|
2014-02-06 22:45:37 +00:00
|
|
|
my_module_arch_supported := false
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-04-17 17:03:35 +00:00
|
|
|
ifneq (,$(LOCAL_MODULE_$(my_prefix)ARCH_WARN))
|
|
|
|
ifeq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_$(my_prefix)ARCH_WARN)))
|
2014-02-06 22:45:37 +00:00
|
|
|
my_module_arch_supported := false
|
2014-04-17 17:03:35 +00:00
|
|
|
$(warning $(LOCAL_MODULE): architecture $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) not supported)
|
2014-02-06 22:45:37 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-04-17 17:03:35 +00:00
|
|
|
ifneq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH)))
|
2014-02-06 22:45:37 +00:00
|
|
|
my_module_arch_supported := false
|
|
|
|
endif
|
|
|
|
|
2014-04-17 17:03:35 +00:00
|
|
|
ifneq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_UNSUPPORTED_$(my_prefix)ARCH_WARN)))
|
2014-02-06 22:45:37 +00:00
|
|
|
my_module_arch_supported := false
|
2014-04-17 17:03:35 +00:00
|
|
|
$(warning $(LOCAL_MODULE): architecture $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) unsupported)
|
2014-02-06 22:45:37 +00:00
|
|
|
endif
|