Android training Course (42)

Source: Internet
Author: User

<!--@page {margin:2cm} P {margin-bottom:0.21cm}-->

The Android.mk file is a small fragment of the GNU make file that is used to describe the project's organization and compilation to the compiling system, and is parsed one or more times by the compiled system.

The contents of this document are as follows:

Local_path: = $ (call My-dir)

This line is used to specify where the current directory is, that is, to assign the current directory $ (call My-dir) to the variable Local_path so that the source code and corresponding resource files can be found.

Include $ (clear_vars)

Clears the temporary variable used earlier.

Local_static_java_libraries: = libarity

Use a static Java library with the name Libarity.

Local_src_files: = $ (call All-java-files-under, SRC)

Here is a file that indicates the need to compile, that is, a list of files that indicate source code. Here the Java source code is compiled for all SRC directories.

Local_package_name: = Calculator

This indicates the name of the compiled package, and the package name of the calculator is calculator.apk.

Include $ (build_package)

Here is the rule that includes compiling the build package, and its definition is defined in CONFIG.MK as follows:

build_package:=$ (Build_system)/package.mk. This is where the file is defined in detail to generate the package file.

##################################################

Include $ (clear_vars)

Clears the temporary variable used earlier.

Local_prebuilt_static_java_libraries: = Libarity:arity-1.3.3.jar

Include $ (build_multi_prebuilt)

Pre-compile this dependent library.

# Use the folloing include-to-make, our test apk.

Include $ (call all-makefiles-under,$ (Local_path))

Generate a test package.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.