This is the android.mk file for the browser module of the RDA8810 (Android4.2.2)
Local_path: = $ (call My-dir)
Include $ (clear_vars)
Local_module_tags: = Optional
Local_static_java_libraries: = \
Android-common \
Guava \
ANDROID-SUPPORT-V13 \
ANDROID-SUPPORT-V4 \
Local_src_files: = \
$ (call all-java-files-under,src) \
Src/com/android/browser/eventlogtags.logtags
Local_package_name: = Browser
Local_proguard_flag_files: = Proguard.flags
Local_emma_coverage_filter: = *,-com.android.common.*
# We need the recorder for the Media Capture API.
Local_required_modules: = Soundrecorder
Include $ (build_package)
# Additionally, build tests in sub-folders in a separate apk
Include $ (call all-makefiles-under,$ (Local_path))
First line, Local_path:
This variable is used to give the path to the current file, you must define it at the beginning of the Android.mk file, the variable will not be cleared by $ (clear_vars), so each android.mk needs to be defined only once (even if you define several modules in a file);
Second line, include $ (clear_vars)
Clear_vars is provided by the compilation system, specifying that gnu_makefile for you to clear many local_xxx variables, except Local_path, this is necessary, because all the compilation control in the same GNU make execution environment, all variables are global;
Line three, local_module_tags
This variable has four options to choose from:
1, User: Refers to the module only in the user version of the compilation;
2, Eng: Refers to the module only in the Eng version of the compilation;
3, tests: Refers to the module only in the tests version of the compilation;
4, Optional: Refers to the module is compiled under all versions.
Line four, local_static_java_libraries
The name of the. Jar Library, which can be taken arbitrarily.
Line Five, Local_src_files
List all source files that need to be compiled, macro All-java-files-under defined in BUILD/CORE/DEFINITIONS.MK
Line Six, Local_package_name
Indicates the name of the package, usually the same as the name of the folder
Line Seventh, Local_proguard_flag_files
Confusing code-related configuration
Line eighth, Local_emma_coverage_filter
This is not understood for the time being, if there is an understanding of the help to answer
Line Nineth, Local_required_modules
Configuring the interface for recording
Line tenth, include $ (build_package)
Represents the current Java code build into apk
Line 11th, include $ (call all-makefiles-under,$ (Local_path))
Represents a file that needs to build subdirectories in the directory so that the compilation system will look for android.mk in subdirectories under the current directory to compile other programs such as so.
Over
Syntax parsing of android.mk files