加快Android单模块编译

转载时请注明出处和作者联系方式
文章出处:http://www.limodev.cn/blog
作者联系方式:李先静 <xianjimli at hotmail dot com>

习惯了automake之后,再用Android的编译系统,就是感觉不爽。编译一个小模块也等上几分钟,有次实在受不了,看了一下它的实现,发现它对任何一次编译都要查找所有的Android.mk:

subdir_makefiles=$(shell cat build/tools/Android.mk.cache)

我把build/core/main.mk修改了一下,增加了一个cache:

subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
ifeq ($(subdir_makefiles),)
$(info "no cache. create build/tools/Android.mk.cache")
$(shell build/tools/findleaves.sh --prune="./out" . Android.mk > build/tools/Android.mk.cache)
subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
else
$(info "use cache: build/tools/Android.mk.cache")
endif

速度终于可以接受了。

更多相关文章

  1. Android(安卓)模块通信—— EventBus
  2. 在Ubuntu 9.10下编译Android源码
  3. Android(安卓)Gradle编译学习日记之二(使用 Gradle 编译 Eclipse,
  4. MAC下编译arm架构的tcpdump
  5. Android中的Ninja简介
  6. ok6410开发板android底层驱动模块编写,出现insmod:init_module ‘
  7. Android知识梳理:获得源码和编译系统
  8. Android(安卓)命令行手动编译打包详解
  9. 在Ubuntu 9.10下编译Android源码

随机推荐

  1. Android推送通知指南
  2. 图解RGB565、RGB555、RGB16、RGB24、RGB3
  3. 修改Android(安卓)Studio下的AVD的下载路
  4. Android之四大布局
  5. Android(安卓)SDK Manager国内无法更新的
  6. Android声音管理方法
  7. Android单元测试初探——Instrumentation
  8. android:layout_weight总有你不知道的用
  9. Android之NDK开发
  10. Android系列教程之前言