Windriver的编译流程 和 简洁的编译脚本
来源:互联网 发布:c语言指针怎么用 编辑:程序博客网 时间:2024/06/08 05:33
1、每个IDE里的项目都有一个makefile的模版,名字叫 “.wrmakefile” 用句号作为开头是因为Eclipse的项目管理可以设置过滤器,不显示本文件。
该文件的大概内容:
all : subdirs_all main_all
#macros and complier flags generated by IDE
%IDE_GENERATED%
-include *.makefile
main_all : check_objectdir $(PROJECT_TARGETS)
@echo "make: built targets of `pwd`"
check_objectdir :
@if [ ! -d "$(OBJ_DIR)" ]; then/
mkdir -p $(OBJ_DIR);/
fi
# recursive make in SUBDIRS
subdirs_all :
@_PWD=`pwd`;/
for dir in _dummy_ $(SUBDIRS); do/
if [ "$$dir" = "_dummy_" ]; then/
continue ;/
fi;/
if [ ! -d "$$dir" ]; then/
continue ;/
fi;/
echo "Recursive make: Changing to Directory '$$dir'";/
cd "$$dir";/
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) all || exit;/
echo "Recursive make: Changing back to Directory '$$_PWD'";/
cd "$$_PWD";/
done
clean ::
@_PWD=`pwd`;/
for dir in _dummy_ $(SUBDIRS); do/
if [ "$$dir" = "_dummy_" ]; then/
continue ;/
fi;/
if [ ! -d "$$dir" ]; then/
continue ;/
fi;/
echo "Recursive make: Changing to Directory '$$dir'";/
cd "$$dir";/
"$(MAKE)" -f "$(MAKEFILE)" $(MFLAGS) $@ || exit;/
echo "Recursive make: Changing back to Directory '$$_PWD'";/
cd "$$_PWD";/
done
3、在每一个子目录下,重复上述工作,根据用户的设置,保证要编译的子目录下都产生正确的makefile文件。
4、调用make命令,make命令就会根据上述生成的makefile 递归的编译整个项目。
当然在启动命令之前,IDE需要把make命令的路径,以及makefile里调用的命令,如gcc 等加入到系统的搜索路径。 以及设置一些makefile里必须的全局环境变量,如SDK的根目录等。
- Windriver的编译流程 和 简洁的编译脚本
- E9 Ubuntu内核编译的简洁方法
- 编译的相关流程
- GCC的编译流程
- GCC的编译流程
- gcc的编译流程
- 程序的编译流程
- APK 的编译流程
- jsp的编译流程
- Linux驱动的配置和编译脚本
- Linux驱动的配置和编译脚本
- FORM的编译脚本
- 脚本的编译顺序
- C#的脚本编译
- 使用VCS2008编译Windriver工程
- GCC的编译流程详解
- U-boot的编译流程
- Android编译系统的流程
- Armadillo find protected 1.3 by vel
- 多行表头设计
- 播放器代码大全
- Javascript+DOM访问XML文件中的数据
- 选择DataGrid中的CheckBox控件后该行背景变色
- Windriver的编译流程 和 简洁的编译脚本
- POI操作EXCEL
- DataGrid利用模板列实现自动连续编号
- ClassLoader分析
- 《五项核心度量》笔记4-最小开发时间
- SQLServer存储过程访问数据库权限异常问题的解决方案
- 航模相关网站收藏
- class 图
- asp 调用web service 例子