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. Mac之日常操作

    1.创建root用户使用最高权限 sudo passwd root 一般情况下,使用临时获取最高权限 sudo vim /etc/shells 2. apache操作 #启动Apache sudo a ...

  2. redis cli命令

    redis安装后,在src和/usr/local/bin下有几个以redis开头的可执行文件,称为redis shell,这些可执行文件可做很多事情. 可执行文件 作用 redis-server  启 ...

  3. 一些很容易被忘记的css

    一些很偏门的css,用过一两次,很难记得牢,这里,我总结一些. outline 当input选中的时候会出现一个边框 /*一般设置成 none*/ textarea:focus, input:focu ...

  4. qrcode & vue

    qrcode & vue $ yarn add qrcode.vue # OR $ npm i -S qrcode.vue https://www.npmjs.com/package/qrco ...

  5. springboot 静态注入 单例

    package com.b2q.web_push.util; import io.goeasy.GoEasy; import org.springframework.beans.factory.ann ...

  6. LOJ #2719. 「NOI2018」冒泡排序(组合数 + 树状数组)

    题意 给你一个长为 \(n\) 的排列 \(p\) ,问你有多少个等长的排列满足 字典序比 \(p\) 大 : 它进行冒泡排序所需要交换的次数可以取到下界,也就是令第 \(i\) 个数为 \(a_i\ ...

  7. iPhone各种机型尺寸、屏幕分辨率

    px与pt区别 字体大小的设置单位,常用的有2种:px.pt.这两个有什么区别呢? 先搞清基本概念: px就是表示pixel,像素,是屏幕上显示数据的最基本的点: pt就是point,是印刷行业常用单 ...

  8. Hdoj 1517.A Multiplication Game 题解

    Problem Description Stan and Ollie play the game of multiplication by multiplying an integer p by on ...

  9. Redux Todos Example

    此项目模板是使用Create React App构建的,它提供了一种简单的方法来启动React项目而无需构建配置. 使用Create-React-App构建的项目包括对ES6语法的支持,以及几种非官方 ...

  10. HTML(二)HTML元素(整体结构,块级元素,内联元素,结构元素,交互元素,元素嵌套规则)

    HTML整体结构解释 <!DOCTYPE html> // 文件应以"<!DOCTYPE ......>"首行顶格开始,推荐使用"<!DOC ...