The make program uses a table of suffixes and a set of transformation rules to supply default dependency information and implied commands. The default suffix list (in order) is as follows:
See ``Summary of default transformation path'' for a summary of the default transformation paths. If there are two paths connecting a pair of suffixes, the longer one is used only if the intermediate file exists or is named in the makefile.
Summary of default transformation path
If the file x.o is needed and an x.c is found in the makefile directory, the x.c would be compiled. If there is an x.l and an x.c file and the x.l has been modified (that is, has a later modification date than the x.c), then make runs lex on the x.l file to re-create the x.c file. Otherwise, just the x.c file would be recompiled to produce the x.o file. However, if there is no x.c but there is an x.l, make uses the direct link as shown in ``Summary of default transformation path''
It is possible to change the names of some of the compilers used in the
default or the flag arguments with which they are invoked by knowing
the macro names used.
AS, CC, CCC, F77, YACC,
and LEX are the macro names of the compilers used by
make. By specifically changing a compiler macro, a programmer
can select which compiler is to be used. For example:
This causes the newcc command to be used instead of the
usual C language compiler.
The macros ASFLAGS, CFLAGS, CCFLAGS,
F77FLAGS, YFLAGS, and LFLAGS
can be set to cause these commands to be issued with optional flags.
This causes the cc command to include debugging information.