uboot主Makefile分析2
2016-04-20 14:28
253 查看
《朱老师物联网大讲堂》学习笔记
学习地址:www.zhulaoshi.org
这里是关于静默编译的,
那什么是静默编译,
也就是执行脚本的时候,不去回显命令的执行,
编译时侯make -s即可,
这里-s作为MAKEFLAGS传给Makefile,
两种编译管理方法,
默认编译XX.c生成的XX.O会在同一文件夹下,这样做简单,但是会污染源文件,
如果项目涉及不同配置的版本,就无法使用这种方式来管理,
于是就出现了单独输出文件夹的方法,
即指定一个输出目录,
make O=输出目录,
或者
export BUILD DIR=输出目录,
这两种方式同时使用的话,按前一种来理解,
下面是配置代码:
然后我们去这么做的时候,报错了,
看readme中的介绍,
1. Add O= to the make command line invocations:
make O=/tmp/build distclean
make O=/tmp/build NAME_config
make O=/tmp/build all
不过好像还是没成功,
学习地址:www.zhulaoshi.org
# Allow for silent builds ifeq (,$(findstring s,$(MAKEFLAGS))) XECHO = echo else XECHO = : endif
这里是关于静默编译的,
那什么是静默编译,
也就是执行脚本的时候,不去回显命令的执行,
编译时侯make -s即可,
这里-s作为MAKEFLAGS传给Makefile,
两种编译管理方法,
默认编译XX.c生成的XX.O会在同一文件夹下,这样做简单,但是会污染源文件,
如果项目涉及不同配置的版本,就无法使用这种方式来管理,
于是就出现了单独输出文件夹的方法,
即指定一个输出目录,
make O=输出目录,
或者
export BUILD DIR=输出目录,
这两种方式同时使用的话,按前一种来理解,
下面是配置代码:
######################################################################### # # U-boot build supports producing a object files to the separate external # directory. Two use cases are supported: # # 1) Add O= to the make command line # 'make O=/tmp/build all' # # 2) Set environement variable BUILD_DIR to point to the desired location # 'export BUILD_DIR=/tmp/build' # 'make' # # The second approach can also be used with a MAKEALL script # 'export BUILD_DIR=/tmp/build' # './MAKEALL' # # Command line 'O=' setting overrides BUILD_DIR environent variable. # # When none of the above methods is used the local build is performed and # the object files are placed in the source directory. #
然后我们去这么做的时候,报错了,
看readme中的介绍,
1. Add O= to the make command line invocations:
make O=/tmp/build distclean
make O=/tmp/build NAME_config
make O=/tmp/build all
不过好像还是没成功,
相关文章推荐
- Linux/Unix环境下的Make和Makefile详解
- Linux Makefile与Shell的问题
- Python实现生成简单的Makefile文件代码示例
- (转)自动生成 Makefile 的全过程详解
- 我的 ARM+Linux 学习路线
- 开发学习记录之看门狗驱动
- 时钟+温度+遥控设置,综合时钟例子
- u-boot的Makefile分析
- 关于linux模块驱动简单的Makefile
- 编译单个驱动的Makefile文件。
- Linux下运行openwebos- -(转)
- Linux下运行openwebos- -(转)
- makefile完全教程
- BusyBox 简化嵌入式 Linux 系统
- Linux内核Makefile文件
- Linux内核的Makefile
- EGL 学习
- 嵌入式开发设计方法变化的背景
- Makefile 文件的相关知识(2)
- 嵌入式人才的发展方向