<! -- @ Page {margin: 2 cm} P {margin-bottom: 0.21} -->
The Android. mk file is used to describe the project organization and Compilation Method to the compilation system. It is actually a small part of the GNU make file, which will be parsed once or multiple times by the compilation system.
The content of this file is as follows:
LOCAL_PATH: = $ (call my-dir)
This line is used to specify the current directory, that is, to assign the current directory $ (call my-dir) to the variable LOCAL_PATH, so that you can find the source code and the corresponding resource file.
Include $ (CLEAR_VARS)
Clear the temporary variables used previously.
LOCAL_STATIC_JAVA_LIBRARIES: = libarity
Use a static JAVA library named libarity.
LOCAL_SRC_FILES: = $ (call all-java-files-under, src)
This indicates the file to be compiled, that is, the file list of the source code. Compile the java source code in all src directories.
LOCAL_PACKAGE_NAME: = Calculator
This indicates the name of the compiled package. The name of the computer package is calculator.apk.
Include $ (BUILD_PACKAGE)
Here is the rule for compiling and generating packages. Its definition is also defined in config. mk, as follows:
BUILD_PACKAGE: = $ (BUILD_SYSTEM)/package. mk. This file defines in detail how to generate a package file.
######################################## ##########
Include $ (CLEAR_VARS)
Clear the temporary variables used previously.
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES: = libarity: arity-1.3.3.jar
Include $ (BUILD_MULTI_PREBUILT)
Compile the dependent library in advance.
# Use the folloing include to make our test apk.
Include $ (call all-makefiles-under, $ (LOCAL_PATH ))
Generate a test package.