u-boot Makefile分析 -- (2)
来源:互联网 发布:mac如何设置用户名 编辑:程序博客网 时间:2024/05/01 13:32
[Author: Bo Shen <voice.shen@gmail.com>]
[u-boot: 2014.01-rc1, e03c76c30342797a25ef9350e51c8daa0b56f1df]
1. 一些参数的export
101 OBJTREE := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))102 SPLTREE := $(OBJTREE)/spl103 TPLTREE := $(OBJTREE)/tpl104 SRCTREE := $(CURDIR)105 TOPDIR := $(SRCTREE)106 LNDIR := $(OBJTREE)107 export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE108 109 MKCONFIG := $(SRCTREE)/mkconfig110 export MKCONFIG111 112 ifneq ($(OBJTREE),$(SRCTREE))113 REMOTE_BUILD := 1114 export REMOTE_BUILD115 endif116 117 # $(obj) and (src) are defined in config.mk but here in main Makefile118 # we also need them before config.mk is included which is the case for119 # some targets like unconfig, clean, clobber, distclean, etc.120 ifneq ($(OBJTREE),$(SRCTREE))121 obj := $(OBJTREE)/122 src := $(SRCTREE)/123 else124 obj :=125 src :=126 endif127 export obj src128 129 # Make sure CDPATH settings don't interfere130 unexport CDPATH
101: Makefile中if的使用:$(if <condition>, <then-part>, <else-part>). 相当于C语言中的if-then-else. 其中BUILD_DIR在前面判断过,CURDIR是Makefile中的一个特殊参数,表示当前目录。所以,此句含义是决定使用BUILD_DIR还是CURDIR.
102~107: 做一些赋值,然后export这些变量。
109: 得到mkconfig,并且export。
112~115: 判断是否是本地编译,导致的结果是编译生成的object文件是否与源代码在同一目录。
0 0
- u-boot Makefile分析 -- (2)
- U-boot Makefile 分析
- u-boot Makefile分析
- U-Boot Makefile分析
- u-boot makefile分析
- U-Boot Makefile分析
- U-Boot Makefile分析
- U-Boot Makefile分析
- u-boot Makefile分析
- U-Boot Makefile分析
- U-boot--Makefile分析
- u-boot Makefile分析
- u-boot的Makefile分析
- U-boot的Makefile分析
- u-boot顶层Makefile分析
- u-boot的Makefile分析
- u-boot的Makefile分析
- u-boot的Makefile分析
- linux mysql用户管理
- No smpd passphrase specified through the registry or .smpd file, exiting
- MongoDB Shard Model
- RTMP协议分析 二、AMF数据
- ios7兼容 蛋疼的问题
- u-boot Makefile分析 -- (2)
- ListActivity
- css属性值定位方式
- 常用查询条件
- Hessian服务搭建
- Android/Linux Kernel 記憶體管理-入門筆記
- AVCapture中实现拉近拉远镜头
- MySQL处理千万级数据查询分页
- 汇编语言的冒泡排序和二分法