By viewing the build/envsetup. Sh file in the android source code directory, we can see that:
-M: makes from the top of the tree.
-Mm: builds all of the modules in the current directory.
-Mmm: builds all of the modules in the supplied directories.
To use these commands, you must first execute. Build/envsetup. Sh in the root directory of the android source code.
M: compile all modules
MM: Compile the modules in the current directory. The current directory must contain the Android. mk file.
Mmm: Compile the module in the specified path. The Android. mk file must exist in the specified path.
The following example shows how to compile the libjpeg module in Android. The current directory is the source code root directory:
1. Build/envsetup. Sh
2. Mmm external/JPEG/
Or:
1. Build/envsetup. Sh
2. CD external/JPEG
3. Mm
Finally, envsetup. Sh only needs to be set to source once. After source, you can use the Croot command to return to the source code root directory, which is very useful.