LOCAL_EXPORT_××用法
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_××用法的更多相关文章
随机推荐
- 从源码看springboot默认的资源文件和配置文件所在位置
首先,使用的springboot版本是2.X,在这里写一点学习springboot的记录 springboot需要配置的不多,但也并不是完全不需要配置就可以顺畅使用,这里看一下它默认的配置 首先,看一 ...
- flask 实现登录 登出 检查登录状态 的两种方法的总结
这里我是根据两个项目的实际情况做的总结,方法一(来自项目一)的登录用的是用户名(字符串)和密码,前后端不分离,用form表单传递数据:方法二用的是手机号和密码登录,前后端分离,以json格式传递数据, ...
- Python future使用
Python的每个新版本都会增加一些新的功能,或者对原来的功能作一些改动.有些改动是不兼容旧版本的,也就是在当前版本运行正常的代码,到下一个版本运行就可能不正常了. 从Python 2.7到Pytho ...
- [Codeforces702F]T-Shirts——非旋转treap+贪心
题目链接: Codeforces702F 题目大意:有$n$种T恤,每种有一个价格$c_{i}$和品质$q_{i}$且每种数量无限.现在有$m$个人,第$i$个人有$v_{i}$元,每人每次会买他能买 ...
- rest framework 认证 权限 频率
认证组件 发生位置 APIview 类种的 dispatch 方法执行到 initial 方法 进行 认证组件认证 源码位置 rest_framework.authentication 源码内部需要 ...
- lesson03
3.1. 画 点 3.2. 基准平面 (重要) 1. 关于 点 的使用() 1.画一条直线,在线上画一个点(利用该点占该线段的百分比画出),通过该点画一条直线 2. 画一个长方体,定位到上表面.选择( ...
- [HAOI2008]糖果传递 结论题
题目描述 有\(n(n<1000000)\)个小朋友坐成一圈,每人有\(a_i\)个糖果.每人只能给左右两人传递糖果.每人每次传递一个糖果代价为\(1\),求使所有人糖果数相等的最小代价. 暴力 ...
- redis简单命令总结
1.连接到redis服务器:redis-cli -h 127.0.0.1 -p 6379 -a 密码 select index 切换 redis 数据库 flushdb 删除当前数据库所有的 key ...
- pandas常用函数之diff
diff函数是用来将数据进行某种移动之后与原数据进行比较得出的差异数据,举个例子,现在有一个DataFrame类型的数据df,如下: index value1 A 0 B 1 C 2 D 3 如果执行 ...
- React 记录(6)
React文档:https://www.reactjscn.com/docs/react-component.html 慢慢学习:对照教程文档,逐句猜解,截图 React官网:https://reac ...