Skip to content
Search

Make:ExtensionRule

lastmod 2018-08-17created 2018-06-182 edits

A description of Make suffix rules.

About

A rule that looks at the extension of the input file and performs the appropriate operation accordingly. To register with the Makefile the extensions of files it should handle carefully, use .SUFFIXES.

.SUFFIXES : .c .o

A summary of the extensions and related macros associated with .SUFFIXES.

Compiler

Source

Object

Macro

Value

Flag macro

C compiler

*.c

*.o

$(CC)

cc

$(CFLAGS)

C Preprocessor

$(CPP)

$(CC) -E

$(CPPFLAGS)

C++ compilation

*.cc

*.o

$(CXX)

g++

$(CXXFLAGS)

Pascal compiler

*.p

*.o

$(PC)

pc

$(PFLAGS)

Fortran compiler

*.f

*.o

$(FC)

f77

$(FFLAGS)

Modula-2 compiler

*.def

*.sym

Assembly compiler

*.s

*.o

$(AS)

as

$(ASFLAGS)

Assembly preprocessor

*.S

*.s

Single object file link

*.o

*

YACC processor

*.y

*.o

$(YACC)

yacc

$(YFLAGS)

Lex compiler

*.l

*.o

$(LEX)

lex

$(LFLAGS)

Lint library generator

*.c

*.ln

TEX processor

*.tex

*.dvi

$(TEX)

tex

Texinfo file processor

*.texi

*.dvi

$(TEXI2DVI)

texi2dvi

Extracting file from RCS

RCS/*.v

*

$(CO)

co

$(COFLAGS)

SCCS file processor

SCCS/*.n

*

$(GET)

get

Archive maintaining program

$(AR)

ar

$(ARFLAGS)

Web file processor

$(WEAVE)

weave

Remove file

$(RM)

rm -f

Makefile

$(MAKE_COMMAND)

make

See also