Is there any way to use conditional expressions in Android.mk? I need it to do smth like this:
IF arch = AREABI_V7
*use path for my arm_v7 static libs*
ELSE
*use path for arm static libs*
Overview. The Android.mk file resides in a subdirectory of your project's jni/ directory, and describes your sources and shared libraries to the build system. It is really a tiny GNU makefile fragment that the build system parses once or more.
LOCAL_CFLAGS is applied to the current module, and is undefined after an include $(CLEAR_VARS) . APP_CFLAGS is applied to all modules.
NDK_PROJECT_PATH - the location of your project NDK_APPLICATION_MK - the path of the Application.mk file APP_BUILD_SCRIPT - the path to the Android.mk file. These are needed to override the default values of the build script, which expects things to be in the jni folder.
The ifeq directive begins the conditional, and specifies the condition. It contains two arguments, separated by a comma and surrounded by parentheses. Variable substitution is performed on both arguments and then they are compared.
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
...
else
ifeq($(TARGET_ARCH_ABI),armeabi)
...
endif
endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With