There Application.mk file in a predefined command parameters APP_ABI, compile and debug is specified CPU architecture.
Android system supports the following seven different CPU architecture: ARMv5, ARMv7 (starting in 2010), x86 (from 2011), MIPS (since 2012), ARMv8, MIPS64 and x86_64 (2014), each of which corresponds to a respective ABI.
CPU architecture | HELP | |
ARMv5 | armeabi | 32, from 2010 |
ARMv7 | armeabi-v7a | 32, from 2010 |
x86 | x86 | 32, from 2011 |
MIPS | mips | 32 from 2012 |
ARMv8 | arm64-v8a | 64, 2014 |
MIPS64 | mips64 | 64, 2014 |
x86_64 | x86_64 | 64, 2014 |
Corresponding generation arm64-v8a, mips64, documents required under the x86_64 version supports NDK_r10 above. Configure content APP_ABI in Application.mk file. For example, indicate that a particular CPU architecture
APP_ABI := arm64-v8a
Or directly generate all editions
APP_ABI := all
Note: Depending on the version of NDK, APP_ABI: = all only generate current version supports the ABI repository file, if you need to generate the latest NDK must update the appropriate version.
Or explicitly stated support for CPU architecture
APP_ABI := armeabi,armeabi-v7a,x86,mips,arm64-v8a,mips64,x86_64
Note: (1) the current simulator not only x86_64 arm64-v8a; and (2), in the test using a real machine armv8-a, preferably first through adb shell, cat / proc / cpuinfo, to view the real machine whether support armv8-a; (3), arm32 arm64 some configuration parameters, and can not coexist, as -msoft-float only ARM32 support position, at arm64 bits are not supported.
## a .Application.mk Introduction
To C \ C ++ code into SO files, file Android.mk there is not enough light, you also need a Application.mk file.
This article will Application.mk a very detailed description.
### 1. Role
Application.mk some compilers are used to determine the rules,
not a single document which provides a line of code, but all files related
### 2. stowed position
Application.mk and Android.mk is in the same directory under.
Usually placed under src / main / jni /
jni is a new folder for storing the C / C ++ code related
java jni folder and the folder is the same directory,
if the resulting .so also create folders jniLibs in the / main, the .so on jniLibs folder
Reference blog: https://blog.csdn.net/qq_31387043/article/details/50899589
Reference blog: https://www.cnblogs.com/gamesky/p/11369156.html