I'm trying to configure Android.mk to cross compile native code to support different chipset namely armeabi, mips, and x86. I know I can configure Application.mk in the following way to compile the source code for different chip set:
APP_ABI := all
This will trigger Android-NDK's build script to compile the source code for all the chipsets. However, I want to dynamically tell Android.mk to look for different static library dependencies compiled with different chip set.
# Get the architecture info ARCH := ???? include $(CLEAR_VARS) LOCAL_MODULE:= mylib LOCAL_SRC_FILES:= build/lib/libxxx_$(ARCH).a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) include $(PREBUILT_STATIC_LIBRARY)
Is this possible to do? If so, can anyone advice how to do so?
Update: I tried something like this in Application.mk:
APP_ABI := armeabi armeabi-v7a mips x64
with Android.mk:
# Get the architecture info ARCH := $(APP_ABI) include $(CLEAR_VARS) LOCAL_MODULE:= mylib LOCAL_SRC_FILES:= build/lib/libxxx_$(ARCH).a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) include $(PREBUILT_STATIC_LIBRARY)
but it errors with the following:
The LOCAL_SRC_FILES for a prebuilt static library should only contain one item
which makes sense. I want to pass APP_ABI := all in Application.mk and be able to dynamically reference it. Any ideas?