Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6564902
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-10-18 18:16:58


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下的\hardware\libhardware_legacy\power模块,当前目录为源码根目录,
方法如下:  
1、. build/envsetup.sh  
2、mmm hardware/libhardware_legacy/power/  

或者 :  
1、. build/envsetup.sh  
2、cd hardware/libhardware_legacy/power/  
3、mm
++++++++++++++++++++++++++++

[root@localhost build]# . envsetup.sh
执行完后,就会多出以下几个命令:
- 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.    用于编译指定目录,如:mmm Settings,表示编译Settings这个目录,之后会生成新的apk
- 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.
- printconfig: 当前build的配置情况

阅读(1026) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~