In a project involving more than one executable (or other final products), the traditional makefile target for compiling all the executables is called
all. If the products are
all target will take the form
all: program1 program2 program2
# The above blank line is IMPORTANT!
This tells make
that in order to make the
target, all three
s have to be up-to-date, but that no further commands need to be performed. It is also possible to
some dummy indicator file, by saying
all: program1 program2 program3
# The above line MUST start with a TAB!
but this has no real advantages.
Generally, the all target is the first target in the makefile, so saying "
make" has the same effect as saying "