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.

 

$@--目标文件,$^--所有的依赖文件,$<--第一个依赖文件.

mkf:mkf.o mytool1.o mytool2.o
        gcc -o $@ $^
mkf.o:mkf.c mytool1.h mytool2.h
        gcc -c $< -I.
mytool1.o:mytool1.c mytool1.h
        gcc -c $< -I.
mytool2.o:mytool2.c mytool2.h
        gcc -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的更多相关文章

  1. [Android]使用自定义JUnit Rules、annotations和Resources进行单元测试(翻译)

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5795091.html 使用自定义JUnit Rules.ann ...

  2. 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 ...

  3. Yii rules常用规则

    public function rules() {     return array(         //必须填写         array('email, username, password, ...

  4. 【Spring RCP】 RULES规则

    Rich Client 约束规则 1.Constraint 定义了一个约束接口,接口中只有1个方法 public boolean test(Object argument); //这个方法指对约束的检 ...

  5. 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 ...

  6. Table-3个属性的高级用法(colgroup和 frame和rules)

    之前我用表格的时候基本是caption.thead.tfoot.tbody.tr.th/td,以为是很完整的表格了,原来发现还有colgroup这东东,确实比直接在td里面colspan好用,另外ta ...

  7. YII rules常见规则

    public function rules() {     return array(         //必须填写         array('email, username, password, ...

  8. gcc警告: warning: dereferencing type-punned pointer will break strict-aliasing rules

    Q: 在高优化级别下,不同类型指针之间的强制类型转换可能会触发以下警告: warning: dereferencing type-punned pointer will break strict-al ...

  9. Yii CModel中rules验证 获取错误信息

    在model中定义 public function rules(){ return array( array('Name,Email','required'), array('Email','uniq ...

  10. Yii CModel中rules验证规则[转]

    array( array(‘username’, ‘required’), array(‘username’, ‘length’, ‘min’=>3, ‘max’=>12), array( ...

随机推荐

  1. PHP+jQuery 注册模块的改进之一:验证码存入SESSION

    /* ******* Date:2014-09-28 ******* Author:小dee ******* Blog:http://www.cnblogs.com/dee0912/*/ 对上一篇博文 ...

  2. LR中日志设置和日志函数

    LR中日志参数的设置与使用 1.Run-Time Setting日志参数的设置 在loadrunner的vuser菜单下的Run-Time Setting的General的LOG选项中可以对在执行脚本 ...

  3. MySQL字段之集合(set)枚举(enum)

    MySQL字段之集合(set)枚举(enum) (2008-12-23 13:51:23) 标签:it  分类:MySQL 集合 SET mysql> create table jihe(f1 ...

  4. mysqli_multi_query($link, $wsql)

    if (mysqli_multi_query($link, $wsql)) { do { if ($result = mysqli_store_result($link)) { mysqli_free ...

  5. Blender to XPS(blender 2.7x Internal materials)

    Things we are gonna need are Blender 2.7x www.blender.org/ XPS tools addon for Blender A model made ...

  6. qTip2 精致的jQuery提示信息插件

    qTip2 精致的jQuery提示信息插件    出处:http://www.cnblogs.com/lwme/archive/2012/02/16/qtip2-jquery-plugin.html ...

  7. asr,tts,vsr

    http://max.book118.com/html/2014/0814/9432056.shtm   ASR技术的基础主要是信号处理和概率模型. 信号处理技术 语音信号处理 谱分析   基于时间的 ...

  8. C/C++预处理和编译

    预处理器的作用 当我们对源代码进行编译时,第一个阶段就是进行预处理.以#开头的都是预处理指令,都会被预处理器处理掉. 也就是说:我们写的代码,不是直接被编译,而是先被预处理器进行修改.那么预处理器如何 ...

  9. SQL Server批量数据导出导入Bulk Insert使用

    简介 Bulk insert命令区别于BCP命令之处在于它是SQL server脚本语句,它可以将本地或远程的文件数据批量导入数据库,速度非常之快:远程文件必须共享才行, 文件路径须使用通用约定(UN ...

  10. JQuery源码之“对象的结构解析”

    吃完午饭,觉得有点发困,想起了以后我们的产品可能要做到各种浏览器的兼容于是乎不得不清醒起来!我们的web项目多数是依赖于Jquery的.据了解,在Jquery的2.0版本以后对IE的低端版本浏览器不再 ...