<PREV> <INDEX> <NEXT>

Makefiles

Objectives:


Program structure:

project

graph -> makefile rules:

target(s): dependencies/prerequisites
<TAB>command(s)


makefile1
explicit rules, 2 passes, updates old targets only
makefile2
variables
makefile3

Implicit rules (old style)
makefile4

Shortcuts:
$@ - Full name of the current target
$? - List of out-of-date files for the current dependency
$< - The source file of the current (single) dependency

Implicit rules (new style)
makefile5

Phony targets:
makefile6

Other features:


The command:
make <options> <target>

Options: -f makefile
-j jobs
-d
-n

Documentation:

Manual: http://www.gnu.org/software/make/manual/make.html

Tutorials:

Alternatives:  ANT, jam
Automated building of makefiles: autoconf


Makefile.in
configure.in

configure

Automated dependencies: makedepend



<PREV> <INDEX> <NEXT>