package.mk revision d3624d5f4850e4cb0676f4a9897fe77524403b8c
1# We don't automatically set up rules to build packages for both 2# TARGET_ARCH and TARGET_2ND_ARCH. 3# By default, an package is built for TARGET_ARCH. 4# To build it for TARGET_2ND_ARCH in a 64bit product, use "LOCAL_MULTILIB := 32". 5 6include $(BUILD_SYSTEM)/multilib.mk 7 8LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true 9 10# if TARGET_PREFER_32_BIT is set, try to build 32-bit first 11ifdef TARGET_2ND_ARCH 12ifeq ($(TARGET_PREFER_32_BIT),true) 13LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) 14else 15LOCAL_2ND_ARCH_VAR_PREFIX := 16endif 17endif 18 19# check if preferred arch is supported 20include $(BUILD_SYSTEM)/module_arch_supported.mk 21ifeq ($(my_module_arch_supported),true) 22# first arch is supported 23include $(BUILD_SYSTEM)/package_internal.mk 24else ifneq (,$(TARGET_2ND_ARCH)) 25# check if the non-preferred arch is the primary or secondary 26ifeq ($(TARGET_PREFER_32_BIT),true) 27LOCAL_2ND_ARCH_VAR_PREFIX := 28else 29LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX) 30endif 31 32# check if non-preferred arch is supported 33include $(BUILD_SYSTEM)/module_arch_supported.mk 34ifeq ($(my_module_arch_supported),true) 35# secondary arch is supported 36include $(BUILD_SYSTEM)/package_internal.mk 37endif 38endif # TARGET_2ND_ARCH 39 40LOCAL_2ND_ARCH_VAR_PREFIX := 41LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := 42 43my_module_arch_supported := 44