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. 2019微信公开课 同行With Us 听课笔记及演讲全文

    [2019WeChat 微信公开课] 产品理念: 微信启动页 一个小人站在地球前面,每个人都有自己的理解和解读 所谓异类,表示与别人与众不同,即优秀的代名词. 微信的与众不同体现在尊重用户对产品的感受 ...

  2. jsp中【<%=request.getContextPath()%>】项目路径

    1 2 "request.getContextPath()的值是        "<%=request.getContextPath()%><br/> &q ...

  3. C# Note36: .NET unit testing framework

    It’s usually good practice to have automated unit tests while developing your code. Doing so helps y ...

  4. SpringCloud入门(一)

    一.微服务概述 1.什么是微服务 目前的微服务并没有一个统一的标准,一般是以业务来划分将传统的一站式应用,拆分成一个个的服务,彻底去耦合,一个微服务就是单功能业务,只做一件事. 与微服务相对的叫巨石 ...

  5. Qt QWidget

    原文: https://www.cnblogs.com/muyuhu/archive/2012/10/26/2741184.html QWidget 类代表一般的窗口,其他窗口类都是从 QWidget ...

  6. 解决 MariaDB无密码就可以登录的问题

    问题: 困扰了很久的问题,, 使用apt-get来安装mysql,安装好之后发现安装的是 MariaDB,如下,无需密码既可以登录了.即使使用mysqladmin设置好密码,用密码登录可以,不用密码登 ...

  7. oracle表的操作SQL语句

    这篇文章的内容包括:表的増删改查,字段的増删改查,主键.外键.唯一.非空.默认约束的増删改   查看自己用户的所有表: select * from user_tab_comments;    www. ...

  8. 【BZOJ5503】[GXOI/GZOI2019]宝牌一大堆(动态规划)

    [BZOJ5503][GXOI/GZOI2019]宝牌一大堆(动态规划) 题面 BZOJ 洛谷 题解 首先特殊牌型直接特判. 然后剩下的部分可以直接\(dp\),直接把所有可以存的全部带进去大力\(d ...

  9. 题解 CF540D 【Bad Luck Island】

    既然没有大佬写题解那本蒟蒻就厚颜无耻地写(水)一(经)下(验)吧 题目要求算出个种人单独留下的存活率 因为n,m,p的范围极小, 那么就可以方便地设3位dp状态dp[i][j][k]表示剩余i个石头, ...

  10. Oracle jdbc 连接

    所需jar包: ojdbc6.jar 下载地址:https://download.csdn.net/download/xc_oo0/10897959 示例代码: package cnblogs.com ...