一个标准的Application.mk如下
APP_OPTIM := release
#it is very import
APP_PLATFORM := android-9
APP_ABI := armeabi-v7a x86
NDK_TOOLCHAIN_VERSION=4.9
APP_PIE := false
APP_STL := stlport_static
APP_CFLAGS := -O3 -Wall -pipe \
-ffast-math \
-fstrict-aliasing -Werror=strict-aliasing \
-Wno-psabi -Wa,--noexecstack \
-DANDROID -DNDEBUG
APP_ABI指定CPU架构类型
可选值如下:
APP_ABI := armeabi,armeabi-v7a,x86,mips,arm64-v8a,mips64,x86_64
或者直接填一个all也可以
| CPU架构 | ABI | 时间 |
|---|---|---|
| ARMv5 | armeabi | 32位,从2010年 |
| ARMv7 | armeabi-v7a | 32位,从2010年 |
| x86 | x86 | 32位,从2011年 |
| MIPS | mips | 32位,从2012年 |
| ARMv8 | arm64-v8a | 64位,从2014年 |
| MIPS64 | mips64 | 64位,从2014年 |
| x86_64 | x86_64 | 64位,从2014年 |
APP_PLATFORM := android-9 非常重要,如果不指定平台,会报下面这个错误
android/SDL_android.h:30:29: fatal error: EGL/eglplatform.h: No such file or directory
#include <EGL/eglplatform.h>









网友评论