NDK Samples之hello-neon

hello-neon

— a simple application that shows how to use the cpufeatures library to check CPU capabilities at runtime, then use NEON intrinsics if supported by the CPU. Specifically, the application implements two versions of a tiny benchmark for a FIR filter loop, a C version and a NEON-optimized version for devices that support it.


makefile文件包括两个:Android.mk和Application.mk

其中Application.mk的内容:

---------------------------------

# Build both ARMv5TE and ARMv7-A machine code.
APP_ABI := armeabi armeabi-v7a

--------------------------------

APP_ABI
默认情况下,NDK的编译系统会为”armeabi”ABI生成机器代码。喜爱哪个相当于一个基于CPU可以进行浮点运算的ARMv5TE。你可以使用APP_ABI来选择一个不同的ABI。

比如:为了在ARMv7的设备上支持硬件FPU指令。可以使用
APP_ABI := armeabi-v7a

或者为了支持IA-32指令集,可以使用
APP_ABI := x86

或者为了同时支持这三种,可以使用
APP_ABI := armeabi armeabi-v7a x86


application.mk 详细见:http://www.imobilebbs.com/wordpress/?p=2934


你可能感兴趣的:(c,filter,application,Build,library,X86)