Make Rules
target: components ls
TAB rule
main:main.o mytool1.o mytool2.o
gcc -o main main.o mytool1.o mytool2.o
main.o:main.c mytool1.h mytool2.h
gcc -c main.c -I.
mytool1.o:mytool1.c mytool1.h
gcc -c mytool1.c -I.
mytool2.o:mytool2.c mytool2.h
gcc -c mytool2.c -I.
$@--目标文件,$^--所有的依赖文件,$<--第一个依赖文件.
这个规则表示所有的 .o文件都是依赖与其相应的.c文件的.例如mytool.o依赖于mytool.c
main:main.o mytool1.o mytool2.o
gcc -o $@ $^
.c.o:
gcc -c $< -I.;
CC 表示我们的编译器名称,缺省值为cc.
CFLAGS 表示我们想给编译器的编译选项
LDLIBS 表示我们的在编译的时候编译器的连接库选项.(我们的这个程序中还用不到这个
选项)
o
CC=gcc
CFLAGS=-g -Wall -O2 -I.
main:main.o mytool1.o mytool2.o
.c.o:
Make Rules的更多相关文章
- [Android]使用自定义JUnit Rules、annotations和Resources进行单元测试(翻译)
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5795091.html 使用自定义JUnit Rules.ann ...
- Favorites of top 10 rules for success
Dec. 31, 2015 Stayed up to last minute of 2015, 12:00am, watching a few of videos about top 10 rules ...
- Yii rules常用规则
public function rules() { return array( //必须填写 array('email, username, password, ...
- 【Spring RCP】 RULES规则
Rich Client 约束规则 1.Constraint 定义了一个约束接口,接口中只有1个方法 public boolean test(Object argument); //这个方法指对约束的检 ...
- The Nine Indispensable Rules for HW/SW Debugging 软硬件调试之9条军规
I read this book in the weekend, and decided to put the book on my nightstand. It's a short and funn ...
- Table-3个属性的高级用法(colgroup和 frame和rules)
之前我用表格的时候基本是caption.thead.tfoot.tbody.tr.th/td,以为是很完整的表格了,原来发现还有colgroup这东东,确实比直接在td里面colspan好用,另外ta ...
- YII rules常见规则
public function rules() { return array( //必须填写 array('email, username, password, ...
- gcc警告: warning: dereferencing type-punned pointer will break strict-aliasing rules
Q: 在高优化级别下,不同类型指针之间的强制类型转换可能会触发以下警告: warning: dereferencing type-punned pointer will break strict-al ...
- Yii CModel中rules验证 获取错误信息
在model中定义 public function rules(){ return array( array('Name,Email','required'), array('Email','uniq ...
- Yii CModel中rules验证规则[转]
array( array(‘username’, ‘required’), array(‘username’, ‘length’, ‘min’=>3, ‘max’=>12), array( ...
随机推荐
- CodeIgniter 发送邮件
1. 在config目录中增加email.php $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $config['protocol ...
- log4j常用配置以及日志文件保存位置
log4j.rootLogger=INFO,CONSOLE log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender ...
- CC2540 USB DONGLE 使用 BTool 调试BLE 说明
一.Btool软件界面介绍 首先您要将USBDONGLE插入电脑的USB口,然后打开双击打开Btool软件,打开后如下图所示: 在安装驱动的教程中,我们已经记住了我们的USB DONGLE的串口号,在 ...
- Charles辅助调试接口
http://blog.sina.com.cn/s/blog_6ae8b50d0102w7tw.html
- Qt 之 QQ系统表情(五)
http://blog.csdn.net/goforwardtostep/article/details/52456276
- .Net程序员安卓学习之路5:使用xutils注入View和事件以及图片的显示
xUtils注入和图片显示 一.xUtils注入 引用官方介绍: ViewUtils模块: •android中的ioc框架,完全注解方式就可以进行UI,资源和事件绑定: •新的事件绑定方式,使用混淆工 ...
- 算法训练 A+B Problem
算法训练 A+B Problem 时间限制:1.0s 内存限制:512.0MB 问题描述 输入A,B. 输出A+B. 输入格式 输入包含两个整数A,B,用一个空格分隔. 输出格式 ...
- LightOj1418 - Trees on My Island(Pick定理)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1418 题意:给你多边形中的顶点,n个点按顺时针或逆时针方向给出,然后求出多边形内部有多 ...
- MVC中Linq to sql创建数据模型
1.创建新的 SQL Server 数据库 点击”视图“-->“服务器资源管理器” ,打开 “服务器资源管理器” 窗口,如下图: 右键“数据连接”,选择“创建新的SQL Server 数据库”, ...
- iOS ARC环境下dealloc的使用
众所周知,iOS开发的时候,使用ARC的话,dealloc函数是不需要实现的,写了反而会出错. 但有些特殊的情况,dealloc函数还是需要的. 比如,在画面关闭的时候,需要把ViewControll ...