先在android 源码根目录下执行: source build/envsetup.sh 再换到目标目录下执
行:mmm <framwork>
或者:
先执行: $. build/envsetup.sh && help
接着:如下, m, mm, mmm.
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.
例1:
==========================================================================
==========================================================================
=======
其中命令croot是改变到顶层目录;m是编译源码树;mm是编译当前目录下所有模块;
mmm是编译所有满足条件编译的模块;cgrep是查找本地所有C/C++文件;jgrep是查找
本地所有java文件;resgrep是查找本地所有资源文件res/*.xml;godir是跳到包括
这个文件的目录。
make 不带任何参数,单核编译,花费时间相当长,2.2版本大约是4个小时,2.3会稍微更长一点。
make 模块名称 , 会将所有依赖的其它模块一起编译,非常适合初次编译
mmm 完整目录路径 , 编译指定目录下的目标模块,不编译所依赖的模块,非常适合整体编译完,调试时使用
mm 进行带有 Android.mk的目录下进行编译,只能编译当前目录下的模块,非常适合整体编译完,调试时使用