准备工作

在AndroidSource Code中有envsetup.sh档案,当执行过此档案后,可以大幅将build的过程简单化、自动化

此档案在src(android source code 位置)/build/中

所以可以执行以下指令

cd /src/build/
. envsetup.sh

可以使用help来检示有哪些指令可以使用

    Invoke ". build/envsetup.sh" from your shell to add thefollowing functions to your environment:  

    - croot:   Changes directory to the top of the tree.
- m: Makesfrom the top of the tree.
- mm: Builds all of the modules in the currentdirectory.
- mmm: Builds all of the modules in the supplieddirectories.
- cgrep: Greps on all local C/C++ files.
- hgrep: Greps on all local C/C++ header files.
- jgrep: Greps on all local Java files.
- mkgrep: Greps on all local make files.
- rcgrep: Greps on all local .rc files.
- resgrep: Greps on all local res/*.xml files.
- shgrep: Greps on all local .sh files.
- godir: Go to the directory containing a file.  

其中对模块的编译有辅助说明的是tapas、m、mm、mmm这几个指令。

m越多,编译范围越小。

m 编译全部的模块

root@ubuntu:/home/android/src# m  

mm 编译模块目录

    root@ubuntu:/home/android/src/external/jpeg# mm
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
make: Entering directory `/home/android/src'
Copy: out/target/product/generic/system/etc/apns-conf.xml
make: Leaving directory `/home/android/src'
root@ubuntu:/home/android/src/external/jpeg#

单独编译某模块,需要在mmm后面指定模块路径

    root@ubuntu:/home/android/src# mmm external/jpeg/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
make: Entering directory `/home/android/src'
Target buildinfo: out/target/product/generic/root/default.prop
Target buildinfo: out/target/product/generic/system/build.prop
Copy: out/target/product/generic/system/etc/apns-conf.xml
make: Leaving directory `/home/android/src'
root@ubuntu:/home/android/src#

Android编译中m、mm、mmm的区别的更多相关文章

  1. 【转】Android源代码编译命令m/mm/mmm/make分析--不错

    原文网址:http://blog.csdn.net/luoshengyang/article/details/19023609 在前文中,我们分析了Android编译环境的初始化过程.Android编 ...

  2. android平台的三个编译命令——make,mm,mmm

    在Android源码根目录下,执行以下三步即可编译android: 1.  build/envsetup.sh  #这个脚本用来设置android的编译环境; 2.  lunch  #选择编译目标 3 ...

  3. Android编译implement、api 和compile区别【转】

    感谢大佬:https://blog.csdn.net/fengyeNom1/article/details/81903186 前言 2017 年google 后,Android studio 版本更新 ...

  4. android开发中的 Activity 与 Context 区别与联系

    Context 是 Application /Activity /Service的基类 Intent(Context , Class); Activity中的上下文Context是随着活动的产生而产生 ...

  5. 关于android编程中service和activity的区别

    一. 绝大部分情况下,Service的作用是用来“执行”后台的.耗时的.重要的任务,三者缺一不可,而最重要的原因是第三点:要执行重要的任务. 因为当一个进程启动了Service后,进程的优先级变高了, ...

  6. Android系统中Parcelable和Serializable的区别

    转载:https://greenrobot.me/devpost/android-parcelable-serializable/ 进行Android开发的时候,我们都知道不能将对象的引用传给Acti ...

  7. 【安卓开发】Android系统中Parcelable和Serializable的区别

    http://greenrobot.me/devpost/android-parcelable-serializable/ 进行Android开发的时候,我们都知道不能将对象的引用传给Activiti ...

  8. Android系统中Parcelable和Serializable的区别,自动化实现Parcelable接口的插件

    Parcelable和Serializable的区别 参考地址:http://greenrobot.me/devpost/android-parcelable-serializable/ 由于最终的区 ...

  9. android MotionEvent中getX()和getRawX()的区别

    public class Res extends Activity implements View.OnTouchListener { Button btn = null; int x = 0; in ...

随机推荐

  1. php第三方登陆

    学习之前,请大家先看一下oAuth协议. 首先呢,我们进入QQ互联的官方网站 http://connect.qq.com登入我们自己的QQ号,没有QQ号的小伙伴可以忽略本篇博文分享!

  2. JavaOOP QuickHit项目分析

    项目需求:游戏等级6级,随机字符串每级长度不同.每升一级减少比较次数,但是字符串长度相应增加!每级总分数不同,如果游戏中途输入错误则游戏退出!玩家每次在规定时间内输入字符串的同时,打印出游戏难度等级. ...

  3. cocos游戏开发之海岛冒险1

    1.首先在cocosStudio软件中新建项目:项目名称IslandAdventure:项目语言:C++ 2.在项目路径F:\cocos\MyProject\IslandAdventure如下: 3. ...

  4. (转载)R14也称作子程序连接寄存器

    R14也称作子程序连接寄存器(Subroutine Link Register)或连接寄存器LR.当执行BL子程序调用指令时,R14中得到R15(程序计数器PC)的备份. 其他情况下,R14用作通用寄 ...

  5. Unity中加入Android项目的Build步骤

    转载请注明本文出自大苞米的博客(http://blog.csdn.net/a396901990),谢谢支持! 简介: 有的项目需要在Android中加入Unity功能,例如ANDROID应用中嵌入Un ...

  6. Android异步任务AsyncTask

    package com.example.asynctask; import java.net.MalformedURLException; import java.net.URL; import an ...

  7. oracle的索引维护

    索引重建 Alter index idx_name rebuild partition index_partition_name [online nologging] 需要对每个分区索引做rebuil ...

  8. linux更新系统之后,删除多余的开机启动项

    实验环境是centos7,采用uefi的引导方式,启动管理软件是grub2 1. 进入 /boot 目录,应该可以发现许多文件的文件名是以 vmlinuz 开头,后面跟着版本信息,这些就是内核.我们要 ...

  9. C语言初学者代码中的常见错误与瑕疵(13)

    https://www.cpfn.org/bbs/viewtopic.php?f=85&t=5940&sid=ccbcf716d21191452e7c08a97b502337& ...

  10. Servlet乱码

      request.setCharacterEncoding():是设置从request中取得的值或从数据库中取出的值 (只管post方式提交的问题///get需在server.xml中的: < ...