安卓驱动开发 m mm mmm命令

tech2022-10-23  110

1. 说明

通过查看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.

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

要想使用这些命令,android源码根目录执行source build/envsetup.sh来使能环境变量

举例

我要编译android下的hello.c文件,其所在目录为external/hello,我们现在所在目录为源码根目录,方法如下:

source build/envsetup.shmmm external/hello/

或者 :

source build/envsetup.shcd external/hello/mm

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

参考:https://www.cnblogs.com/myitm/archive/2011/12/05/2276977.html

最新回复(0)