DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Managing file interactions with make

The null suffix

There are many programs that consist of a single source file. make handles this case by the null suffix rule. Thus, to maintain the SCO OpenServer system program cat, a rule in the makefile of the following form is needed:

   .c:
           $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
In fact, this .c: rule is internally defined so no makefile is necessary at all. The user only needs to enter
   $ make cat dd echo date
(these are all SCO OpenServer system single-file programs) and all four C language source files are passed through the above shell command line associated with the .c: rule. The internally defined single suffix rules are


.c:
.c~:
.s:
.s~:

.sh:
.sh~:
.f:

.f~:
.C:
.C~:

Others may be added in the makefile by the user.


Next topic: Included files
Previous topic: Source code control system file names

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005