Chinaunix首页 | 论坛 | 博客
  • 博客访问: 463731
  • 博文数量: 153
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 1724
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-08 11:55
文章分类

全部博文(153)

文章存档

2011年(1)

2010年(55)

2009年(88)

2008年(9)

我的朋友

分类: LINUX

2009-01-20 16:56:22


Android的代码包越来越大,每次新的编译基本1个小时左右。实际中的修改并不需要把整个包都再编译一次,只要编译改动部分即可。为此,查找并研究Android的Building system to save time。作为一个大而有序的系统,Android也提供有这方面的功能:

基本操作如下:

(1) . ./build/envsetup.sh
(2) tapas or lunch 0 or 1
(3) 根据所要编译目录中Android.mk里的LOCAL_MODULE名字执行make xxx 即可。
(3.1) 另: 在 envsetup.sh 中也包含了一些专用命令来生成独立的module,
   - 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.

执行(1),(2)后可以到自己想编译的目录,直接执行mm或使用mmm dircetroy指定目录.

make -B / -B mm/mmm  也可以达到同样目的。

make xxx showcommands  show the original commands


注:
(1).通过测试,此法对编译独立模块比较好用,若是用于有信赖性的模块好像不行。
(2).Adapted from '飞镖 luther's blog, with many thanks!
阅读(802) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~