There is documentation about this in the following files in Android NDK: docs / CPU-ARCH-ABIS.html and docs / CPU-ARM-NEON.html.
Basically you want to put
APP_ABI := armeabi armeabi-v7a
to create two shared libraries, without targeting ARMv5TE and with support for VFP (targeting on ARMv7).
To create a .c / .cpp file with NEON support, add the suffix .neon to filename (for example: file.cpp.neon) to the Android.mk file. Or, to create all files with NEON enabled, put in the Android.mk file:
LOCAL_ARM_NEON := true
Be careful - not all ARMv7 devices support NEON (for example, Nvidia Tegra 2). It is better to detect it at runtime and choose a different encoding.
Read more in the documents.
source share