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. thinkphp模型层Model、Logic、Service讲解

    thinkphp模型层Model.Logic.Service讲解 时间:2014-08-24 15:54:56   编辑:一切随缘   文章来源:php教程网 已阅读:771 次       js特效 ...

  2. Web工程与RMI工程进行联调

    1.首先导出RMI工程中的Service和entity类 到web工程中,以jar包的形式 public class ServiceManagerImpl { private static Servi ...

  3. Jquery手册

    1.jQuery 选择器: 选择器 实例 选取 * $("*") 所有元素 #id $("#lastname") id="lastname" ...

  4. Difference Search Path

    1.Framework Search Path           where to search frameworks (.framework bundles) in addition to sys ...

  5. 【android学习4】Eclipse中Clean作用

    今天修改Servlet中代码,重启服务端程序之后发现没有启作用,于是Clean了一把,果然生效. 查阅资料得知,Eclipse中是根据时间戳去编译代码,如果某个类对应的时间戳没有发生改变就不会重新编译 ...

  6. String.format(转)

    转自:http://blog.csdn.net/lonely_fireworks/article/details/7962171 方便自己查阅. 常规类型的格式化 String类的format()方法 ...

  7. [LeetCode] Combination Sum (bfs)

    Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C wher ...

  8. iOS prototype Cells

    在storyboard这方面用到的很少,cell也没有用到.上个周五,汤老师快下班的时候说:你看,我的界面已经搭建完成了.而我这边还没有头绪.现在想把需求模拟一下,结果流程没有弄完,自己在这搭起界面来 ...

  9. Selenium2学习-015-WebUI自动化实战实例-013-通过 URL 关闭多余的已开浏览器窗口

    在日常的 WebUI 自动化测试脚本执行的过程中,经常会打开不同的网页,进行相应的操作,此时可能会打开很多的网页,当打开的网页过多时,无效的网页资源对运行脚本的机器造成了过多无效的资源浪费,因而在日常 ...

  10. Linq To Sql多表联合查询

    var pro = (from ps in db.ProductInfoes join pt in db.ProductTypees on ps.productType equals pt.pType ...