Makefile

1830阅读 0评论2012-12-11 firocu
分类:项目管理

== Structure ==
The make utility automatically determines which pieces of a large program need to be recompiled,
and issues commands to recompile them.
make 和Makefile的组合,实现了上述功能。
两方面make的运行,以及Makefile的语法。

== Understand ==
-- make --
GNU make does its work in two distinct phases. 
During the first phase it reads all the makefiles, included makefiles, etc. and internalizes all the variables and their values, implicit and explicit rules, and constructs a dependency graph of all the targets and their prerequisites. 

During the second phase, make uses these internal structures to determine what targets will need to be rebuilt and to invoke the rules necessary to do so.
make rad the fist target.

-- makefile --
Rule:
===

Variables
======
simplify the processes of listing prerequisites which maybe apppers multiplace in a makefile.
deffered expansion: used before declare

Directives
======
include
Conditional Parts 
Defining Multi-Line Variables
上一篇:Kernel —— Memory management
下一篇:Kernel —— The block I/O layer