使用make help可以显示以下内容:
Common make targets:
----------------------------------------------------------------------------------
droid Default target
clean (aka clobber) equivalent to rm -rf out/
snod Quickly rebuild the system image from built packages
offline-sdk-docs Generate the HTML for the developer SDK docs
doc-comment-check-docs Check HTML doc links & validity, without generating HTML
libandroid_runtime All the JNI framework stuff
framework All the java framework stuff
services The system server (Java) and friends
help You're reading it right now
普通输入make 则全部编译,非常耗时,大约3个小时
make -j2 表示用双线程编译(类似的-j4表示4线程编译)可以加快编译速度。前提是你的计算机是多核的,或者拥有足够强大的cpu
make clean 清理所有目标和中间文件
make snod 从已经编译好的built packages快速重建system镜像
make offline-sdk-docs 生成html的开发sdk文档
make doc-comment-check-docs 仅检查html文档的连接和有效性,不生成html
make libandroid_runtime 所有jni框架目标
make framework 所有java框架目标
make services 所有系统服务(java)和依赖项
这些可以帮助我们缩短编译时间
比如你修改了libc之类的东西,就可以只用make libandroid_runtime
如果你调整了root文件夹之类,就可以使用make snod来快速重建system.img