MK File
Local_ldlibs: =
Connect to the existing static library of ndk. For example, if the C library function is used, you need to use-LC, which is in the user/lib directory.
----- Tips ----
Ndk usage tips
1. How to forcibly output the compilation command:
-------------------------------------------
Run the "ndk-build v = 1" command"
2. How to force re-compile all source files:
-------------------------------------------
Use GNU make's "-B" option, as in:
Ndk-Build-B
3. How to put your code in a folder other than $ Project/JNI:
-------------------------------------------
First, you can tell $ Project/JNI/Android. mk to include other android. mk
Second, define app_build_script in the application. mk file.
Point to the location of an android. mk file.
4. Compile without using the CD command to enter the project root directory:
-------------------------------------------
Run the ndk-Build-C command <project path>
5. Store your application. mk in a place other than $ Project/JNI:
---------------------------------------------------------
Commands supported after ndk r4
Ndk-build ndk_application_mk =/Your/path/application. mk
6. Reasonably Add the header file path to your module Declaration
---------------------------------------------------------
When you define several modules, compiling a module usually needs to contain the header file of another module, as shown in the following example:
$ Project/JNI/Foo/
Android. mk
Foo. h
Foo. c
$ Project/JNI/BAR/
Android. mk
Bar. c
This bar. C contains Foo. H. You need to add the foo path to JNI/BAR/Android. mk.
There is a method below:
Local_c_includes: = ../Foo, so that
The correct method is:
Local_c_includes: = $ (local_path)/../foo
We recommend that you use the relative path of $ (local_path ).