The difference between m, MM, MMM, MMA, Mmma in Android

Source: Internet
Author: User

M: Compiling the entire Android system

Makes from the top of the tree

mm: Compile the current directory of the module , the current directory needs to have android.mk this makefile file, or go up to the nearest android.mk file.

Builds all of the moudles in the current directory

MMA: After adding or deleting files in the current directory, you can recompile with MMA.

mmm: Compile the module under the specified path , the path specified below needs to have android.mk this makefile file

Builds all of the moudles in the supplies directory

Mmma: After adding or deleting files in the specified directory, you can recompile with Mmma.

the compilation process of the MMM command:

BUILD/CORE/MAIN.MK (is the entry file for Android compilation system)

->BUILD/CORE/CONFIG.MK (compile type and target file will be fixed)

->BUILD/CORE/DEFINITIONS.MK (defines the macros used during compilation)

                                                       - >ONE_SHOT_MAKEFILE->BUILD/CORE/PACKAGE.MK (compile apk library file)

                                                                                                      ->build/core/java_library.mk (compiling Java library file)

                                                                                                     ->build/core/static_java_library.mk (compiling java static library file)

                                                                                                     ->build/core/shared_library.mk->build/core/dynamic_library.mk- >build/core/binary.mk->build/core/base_rules.mk

                                                                                                                                                                                                   (  calculates the values of some basic variables and creates some basic dependency rules)

                                                                                                                                                          ->BUILD/CORE/STATIC_LIBRARY.MK (compile. A static library file)

                                                                                                                                                         ->build/core/executable.mk (compile executable)

                                                                                                                                                         ->build/core/prebuilt.mk (Compile a pre-compiled third-party library file)

->build/core/makfile (with System.img, boot.img, recovery.img and other image file generation rules)

The environment variable One_shot_makefile holds the file path to the android.mk of the module to be compiled, and if the environment variable value is empty, it means that the M or make command is executed, and all modules in the Android source code are compiled.

MM, MMM is similar, is used to compile some modules.

With these compile commands, you first need to configure the environment in the Android root directory

[Plain]View Plain Copy
    1. #source build/envsetup.sh to ensure that there are envsetup.sh script files in the current root directory
[Plain]View Plain Copy
    1. #choose ... The choice of the environment
[Plain]View Plain Copy
    1. #cd (the directory where the module is to be compiled)
[Plain]View Plain Copy
    1. #mm (MMA, MMM, Mmma)-b-j2 2>&1 start compiling the module
[Plain]View Plain Copy
    1. Note:-B means all files of the compiled module,-J2 indicates that two threads are opened at compile time, 2>&1 indicates that the error is switched to output (input is 0, output is 1, error 2).
    1. envsetup.sh script file contains definitions of vendorsetup.sh, lunch, M mm mmm

The difference between m, MM, MMM, MMA, Mmma in Android

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.