android下m、mm、mmm编译命令的使用

通过查看android源码目录下的build/envsetup.sh文件,可知: 
- 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. 

要想使用这些命令,首先需要在android源码根目录执行. build/envsetup.sh 

m:编译所有的模块 
mm:编译当前目录下的模块,当前目录下要有Android.mk文件 
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件 

下面举个例子说明,假设我要编译android下的libjpeg模块,当前目录为源码根目录,方法如下: 

1、. build/envsetup.sh 
2、mmm external/jpeg/ 

或者 : 

1、. build/envsetup.sh 
2、cd external/jpeg 
3、mm 

最后说明一下,envsetup.sh只要source一次就够了,source之后还可以用croot命令返回到源码根目录,很好用。 

posted @ 2011-12-05 16:28  心随灵动  阅读(15978)  评论(0编辑  收藏  举报