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.

[email protected]目标文件,$^--所有的依赖文件,$<--第一个依赖文件.

mkf:mkf.o mytool1.o mytool2.o

gcc -o [email protected] $^

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 [email protected] $^

.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,布布扣,bubuko.com

时间: 2024-10-23 09:52:27

Make Rules的相关文章

UDEV SCSI Rules Configuration for ASM in Oracle Linux 5 and 6

UDEV SCSI Rules Configuration for ASM in Oracle Linux 5 and 6 For Oracle Automatic Storage Manager (ASM) to use disks, it needs to be able to identify the devices consistently and for them to have the correct ownership and permissions. In Linux you c

【NetApp】在Cmode中使用NetApp powershell SDK工具导入ExportPolicy Rules

1)得到 Export Policy信息: $export_policy = Get-NcExportPolicy -Name testPolicy -VserverContext SVMDes 2)得到Export Rules信息: $export_rules = Get-NcExportRule -Policy testPolicy -VserverContext SVMDes 此处,如果使用$export_policy变量,只能获得defualt Policy的rules信息.如果需要得到

[原]ubuntu14.04 网卡逻辑修改没有文件/etc/udev/rules.d/70-persistent-net.rules

-----问题出现------ 在新装的ubuntu14.04系统中没有发现文件/etc/udev/rule.d/70-persistent-net.rules, 无法修改网络的逻辑名称(即把第一张网卡的名字改为改为eth0,第二张网卡的名字改为eth0) ----------思路----- 1.由于未发现有/etc/udev/rule.d/70-persistent-net.rules文件,重启:重启后也未发现此文件 2.手动执行/lib/udev/write_net_rules;提示缺少变量

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 funny book, clear insight and good stories, strongly recommend entry even senior engineers to read it. Introduction This book tells you how to find out wh

[PATCH] ARM: add dtbImage.&lt;dt&gt; and dtbuImage.&lt;dt&gt; rules

转载: http://permalink.gmane.org/gmane.linux.kbuild.devel/8755 This rules are useful for appended device tree conforming to the CONFIG_ARM_APPENDED_DTB kernel option. The rule dtbImage.<dt> is actually just a: cat zImage <dt>.dtb > dtbImage.&

rules of work

it will be more interesting if I can record my feeding about my work rules after reading some books related with the work. walk your talk I like this tip so much since it is what I am short of . Always I take much notice of how others think of me, my

[AngularFire 2] Protect Write Access Using Security Rules

We cannot allow un-auth user to change the database data as they want, for Firebase, it is easy just need to overwirte the rules: { "rules": { ".read": "true", ".write": "auth != null", "courses"

CSS Float nine rules

CSS Float nine rules w3 css float nine rules CSS Float Rule1 CSS Float Rule2 CSS Float Rule3 CSS Float Rule4 CSS Float Rule5 CSS Float Rule6 CSS Float Rule7 CSS Float Rule8 CSS Float Rule9 finally 参考文章 注:本文是对众多博客的学习和总结,可能存在理解错误.请带着怀疑的眼光,同时如果有错误希望能指出.

Jersey(1.19.1) - Rules of Injection

Previous sections have presented examples of annotated types, mostly annotated method parameters but also annotated fields of a class, for the injection of values onto those types. This section presents the rules of injection of values on annotated t