Android compilation, module compilation and clean

Source: Internet
Author: User

In the Android source code directory under the build directory, there is a script file envsetup.sh;
$ . build/envsetup.sh
Note: the preceding comma (.) of the command is equivalent to source.
After executing this script file, you will get some useful tools:
-Croot:changes directory to the top of the tree.
-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.
-Cgrep:greps on all local C + + files.
-Jgrep:greps on all local Java files.
-Resgrep:greps on all local res/*.xml files.
-Godir:go to the directory containing a file.
We only focus on the MMM command, that is, it can be used to compile the specified module.
$ mmm hardware/libhardware/modules/slmo/
See: http://blog.csdn.net/luoshengyang/article/details/6566662


For Samsung sdmk4x12, the above method compiles the error, you need to select the menu and then edit:
$ source Build/envsetup.sh
$ lunch
(pop-up options menu)
$7 (select Full_smdk4x12-eng)
Then, you can use MMM to compile a separate module.

Use Lunch-7 to select a menu item before using the command:
$ echo $TARGET _product
The value of target_product cannot be queried, but it can be set up:
$ echo $TARGET _product
full_smdk4x12
(target product)
In addition to Target_product, the following two values are set:
$ echo $TARGET _build_variant
Eng
(Engineering test version)
$ echo $TARGET _build_type
Release (released version)

You can then use the following command to package the SYSTEM.IMG:
$ make Snod (Snod:system NO Dependent)

If you want to clean up the module, you can use the following command:
$ make Clean-slmotestapp (clean-module name)

If you want to clean all, you can use the following command:
$ make clean
The command will delete the entire out folder!

Android compilation, module compilation and clean

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.