Android module Compilation

Source: Internet
Author: User

Android supports modular compilation and can compile a module, such as a browser.

1. Go to the android source code root directory and execute source build/envsetup. Sh;

2. You can execute compilation commands for mm, mmm, and other modules. To compile audioflinger, run Mmm frameworks/base/services/audioflinger/-B.

3. Make-Snod to regenerate the system. IMG image.

 

Remove some annotations of envsetup. Sh as follows:

Invoke ". Build/envsetup. Sh" from your shell to add the following functions to your environment:
-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/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.

Compile the make command for Android source code

Makefile

Makefile conforming to the GNU makefiel Convention contains some basic pre-defined operations:

Make

Compile the source code, connect to generate the target file, and execute the file according to makefile.

Make clean

 Clear the object files generated by the last make command (Files suffixed with ". O") and executable files. Only the previously compiled executable files and configuration files are cleared.

Make distclean: Clear all generated files, including the files generated by configure, such as makefile.

Make install

Install the compiled executable files to the system directory, which is generally the/usr/local/bin directory.

Make Dist

Generate the release package file (distributionpackage ). This command will pack executable files and related files into a tar.gz compressed file for software release.

A file named "package-version.tar.gz" will be generated in the current directory. Package and version are the am_init_automake (package, Version) defined in Configure. In ).

Make distcheck

Generate and test the release package to confirm the correctness of the release package. This operation will automatically unbind the compressed package file, execute the configure command, and execute make to confirm that there is no error in compilation, and finally prompt that your software package is ready and can be released.

Make distclean is similar to make clean, but it also deletes all files generated by configure, including makefile.

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.