http://stackoverflow.com/questions/6595208/what-does-this-line-mean-local-export-c-includes

LOCAL_EXPORT_CFLAGS
Define this variable to record a set of C/C++ compiler flags that will
be added to the LOCAL_CFLAGS definition of any other module that uses
this one with LOCAL_STATIC_LIBRARIES or LOCAL_SHARED_LIBRARIES.

LOCAL_EXPORT_CFLAGS定义了一组C/C++编译器flags,当其他模块以LOCAL_STATIC_LIBRARIES/LOCAL_SHARED_LIBRARIES方式引用该模块时,就会将该组值加入到LOCAL_CFLAGS,从而传递给编译器。

LOCAL_EXPORT_C_INCLUDES和LOCALC_INCLUDES:

编译某模块时,如果它依赖别的模块,那么别的模块的LOCAL_EXPORT×的值,会自动加入到本模块。(但是反过来不会有作用)

For example, consider the module 'foo' with the following definition:

   include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_SRC_FILES := foo/foo.c
LOCAL_EXPORT_CFLAGS :=-DFOO=
include $(BUILD_STATIC_LIBRARY)

And another module, named 'bar' that depends on it as:

   include $(CLEAR_VARS)
LOCAL_MODULE := bar
LOCAL_SRC_FILES := bar.c
LOCAL_CFLAGS :=-DBAR=
LOCAL_STATIC_LIBRARIES := foo
include $(BUILD_SHARED_LIBRARY)

Then, the flags '-DFOO=1 -DBAR=2' will be passed to the compiler when building bar.c

// 这样,编译bar.c文件时,flags -DFOO=1 -DBAR=2将会被传递到编译器。

Exported flags are prepended to your module's LOCAL_CFLAGS so you can
easily override them. They are also transitive: if 'zoo' depends on
'bar' which depends on 'foo', then 'zoo' will also inherit all flags
exported by 'foo'.

// 被导出的flags是继承的,如果zoo依赖bar,bar依赖foo,那么zoo也会继承foo模块中导出的flags。

Finally, exported flags are not used when building the module that
exports them. In the above example, -DFOO=1 would not be passed to the
compiler when building foo/foo.c.

// 被导出的flags对于导出他们的模块是无用的,如上面的例子中,编译foo模块时-DFOO=1不会被传递到编译器。

LOCAL_EXPORT_CPPFLAGS
Same as LOCAL_EXPORT_CFLAGS, but for C++ flags only.

LOCAL_EXPORT_C_INCLUDES
Same as LOCAL_EXPORT_CFLAGS, but for C include paths.
This can be useful if 'bar.c' wants to include headers that are provided by module 'foo'.

LOCAL_EXPORT_××用法的更多相关文章

随机推荐

  1. CodeForces Round #544 Div.3

    A. Middle of the Contest 代码: #include <bits/stdc++.h> using namespace std; int h1, m1, h2, m2; ...

  2. Object的所有方法

    Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象复制到目标对象.它将返回目标对象. const object1 = { a: 1, b: 2, c: 3 }; const ...

  3. AngularJS 1.x系列:Node.js安装及npm常用命令(1)

    1. Node.js安装 1.1 Node.js下载 Node.js官网:https://nodejs.org 当前下载版本(含npm):Latest LTS Version: v6.10.3 (in ...

  4. 【数学建模】MATLAB语法

    一.向量.矩阵的表示和使用 format long  %小数很多format short %默认4位小数format rat %显示最近的分数format short e %指数格式的数 尾数多少 e ...

  5. 高斯消元(Gauss消元)

    众所周知,高斯消元可以用来求n元一次方程组的,主要思想就是把一个n*(n+1)的矩阵的对角线消成1,除了第n+1列(用来存放b的)的其他全部元素消成0,是不是听起来有点不可思议??! NO NO NO ...

  6. AtCoder Grand Contest 012

    AtCoder Grand Contest 012 A - AtCoder Group Contest 翻译 有\(3n\)个人,每一个人有一个强大值(看我的假翻译),每三个人可以分成一组,一组的强大 ...

  7. U66785 行列式求值

    二更:把更多的行列式有关内容加了进来(%%%%%Jelly Goat奆佬) 题目描述 给你一个N(n≤10n\leq 10n≤10)阶行列式,请计算出它的值 输入输出格式 输入格式: 第一行有一个整数 ...

  8. 使用vue-cli创建vue项目

    vue-cli是官方发布的vue.js项目脚手架工具,使用它可以快速创建vue项目,github地址:https://github.com/vuejs/vue-cli 1.安装vue-cli //设置 ...

  9. js上传图片压缩,并转化为base64

    <input type="file" onchange="startUpload(this,'front')" id="renm"/& ...

  10. H5取经之路——CSS基础语法

    一.CSS常用选择器 [选择器的命名规则] * 1.只能有字母数字下划线组成,不能有其他任何字符 * 2.开头不能是数字 [通用选择器] * 1.写法:*{} * 2.选中页面中的所有标签 * 3.优 ...