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模块,当前目录为源码根目录,方法以下: 

一、. build/envsetup.sh 
二、mmm external/jpeg/ 

或者 : 

一、. build/envsetup.sh 
二、cd external/jpeg 
三、mm 

最后说明一下,envsetup.sh只要source一次就够了,source以后还能够用croot命令返回到源码根目录,很好用。 
相关文章
相关标签/搜索