From: http://blog.csdn.net/weidawei0609/article/details/6561280
Application. mk:
Application. mk describes the dynamic and static libraries required by the application.
Storage location:
Files are usually stored in the JNI folder of the project directory.
Variable definition:
Since application. mk is only a part of GNU makefile, some variables need to be defined.
-App_project_path
This variable should be assigned the project root directory address, which is optional.
-App_modules
This option is optional. If this option is not available, ndk automatically compiles all modules defined in the Android. mk file and its sub-modules.
When this option is available, it must be a list of modules, separated by spaces or listed in Android. mk.
-App_optim
This option can be defined as release or debug. This option is used to change the optimization level when compiling the program module.
The default option is release, which is optimized at a higher level. In debug, too much optimization is not performed to facilitate debugging.
You can set Android: debuggable to true in the <Application> tag in the manifest file to change the default value to debug.
In fact, both Debug and release allow users to debug, but more information is provided in debug mode.
-APP_BUILD_SCRIPT
By default, the ndk compiling system searches for the Android. mk file in the JNI folder of the project directory. If you want to overwrite this behavior
You can define this variable. If you specify a non-absolute path, this path is always considered as a path relative to the top-level directory of ndk.
-APP_ABI
The default condition is armeabi. You can use this option to modify it. For example, to support the hardware FPU command on armv7, you can modify it as follows:
APP_ABI := armeabi-v7a
Or a device that supports armv5te and armv7
APP_ABI := armeabi armeabi-v7a
-APP_STL
By default, the ndk compilation system uses the lightweight C ++ Runtime Library provided by the Android system.
/system/lib/libstdc++.so
Ndk itself provides users with a selectable C ++ library, which can be used or linked to their own applications.
For example:
APP_STL := stlport_static --> static STLport library APP_STL := stlport_shared --> shared STLport library APP_STL := system --> default C++ runtime library