zoukankan      html  css  js  c++  java
  • Android编译,模块的编译和CLEAN

    在Android源代码目录下的build目录下,有个脚本文件envsetup.sh;
    $ . build/envsetup.sh
    注:该命令的前面的逗点(.),相当于source
    执行这个脚本文件后,就可以获得一些有用的工具:
    - 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.
    - 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.
    我们只关注mmm命令,也就是可以用它来编译指定的模块。
    $ mmm hardware/libhardware/modules/slmo/
    详见:http://blog.csdn.net/luoshengyang/article/details/6566662


    对三星SDMK4x12来说,上述方法编译报错,需要选择菜单后再编:
    $ source build/envsetup.sh
    $ lunch
    (弹出选项菜单)
    $ 7 (选择full_smdk4x12-eng)
    然后,可以使用mmm编译单独的模块了。

    使用lunch-7选择过菜单项之前,使用命令:
    $ echo $TARGET_PRODUCT
    查询不到TARGET_PRODUCT的值,而设置后就可以了:
    $ echo $TARGET_PRODUCT
    full_smdk4x12
    (目标产品)
    除了TARGET_PRODUCT外,还设置了如下两个值:
    $ echo $TARGET_BUILD_VARIANT
    eng
    (工程测试版本)
    $ echo $TARGET_BUILD_TYPE
    release
    (发布版本)

    然后,就可以使用如下命令,进行打包system.img了:
    $ make snod (snod: System NO Dependent)

    如果要清理该模块,可以使用如下的命令:
    $ make clean-SlmoTestApp (clean-模块名)

    如果要清理所有,可以使用如下的命令:
    $ make clean
    该命令,会删除整个out文件夹!

  • 相关阅读:
    JQuery移除事件
    .NET经常调用的外部系统函数举例说明
    sql server日期时间转字符串
    关于无法打开微软网站的解决方法[转]
    Html5 第二章
    style、currentStyle、getComputedStyle区别介绍
    删除右键菜单中多余项
    css制作流程及标准
    CSS的选择器
    Mysql 函数集
  • 原文地址:https://www.cnblogs.com/senior-engineer/p/4790861.html
Copyright © 2011-2022 走看看