2014-02-07 06:45:37 +08:00
|
|
|
# We don't automatically set up rules to build packages for both
|
|
|
|
# TARGET_ARCH and TARGET_2ND_ARCH.
|
|
|
|
# By default, an package is built for TARGET_ARCH.
|
2014-03-22 03:29:32 +08:00
|
|
|
# To build it for TARGET_2ND_ARCH in a 64bit product, use "LOCAL_MULTILIB := 32".
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/multilib.mk
|
|
|
|
|
2014-02-05 03:16:16 +08:00
|
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
|
|
|
|
|
2014-04-11 03:28:56 +08:00
|
|
|
# if TARGET_PREFER_32_BIT is set, try to build 32-bit first
|
|
|
|
ifdef TARGET_2ND_ARCH
|
|
|
|
ifeq ($(TARGET_PREFER_32_BIT),true)
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
|
|
|
|
else
|
2014-02-07 06:45:37 +08:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
2014-04-11 03:28:56 +08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# check if preferred arch is supported
|
2014-02-07 06:45:37 +08:00
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
2014-03-22 03:29:32 +08:00
|
|
|
# first arch is supported
|
2014-02-07 06:45:37 +08:00
|
|
|
include $(BUILD_SYSTEM)/package_internal.mk
|
|
|
|
else ifneq (,$(TARGET_2ND_ARCH))
|
2014-04-11 03:28:56 +08:00
|
|
|
# check if the non-preferred arch is the primary or secondary
|
|
|
|
ifeq ($(TARGET_PREFER_32_BIT),true)
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
|
|
|
else
|
2014-02-07 06:45:37 +08:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
|
2014-04-11 03:28:56 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
# check if non-preferred arch is supported
|
2014-02-07 06:45:37 +08:00
|
|
|
include $(BUILD_SYSTEM)/module_arch_supported.mk
|
|
|
|
ifeq ($(my_module_arch_supported),true)
|
|
|
|
# secondary arch is supported
|
|
|
|
include $(BUILD_SYSTEM)/package_internal.mk
|
2012-05-25 12:05:19 +08:00
|
|
|
endif
|
2014-02-07 06:45:37 +08:00
|
|
|
endif # TARGET_2ND_ARCH
|
2009-03-04 11:28:42 +08:00
|
|
|
|
2014-02-07 06:45:37 +08:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
2014-02-05 03:16:16 +08:00
|
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
|
|
|
|
|
2014-02-07 06:45:37 +08:00
|
|
|
my_module_arch_supported :=
|