1 # UGH. GNU make comes with implicit rules.
2 # We don't want any of them, and can't force users to run
8 # `N.o' is made automatically from `N.c' with a command of the form
9 # `$(CC) -c $(CPPFLAGS) $(CFLAGS)'.
13 # Compiling C++ programs
14 # `N.o' is made automatically from `N.cc' or `N.C' with a command of
15 # the form `$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)'. We encourage you to
16 # use the suffix `.cc' for C++ source files instead of `.C'.
20 # Compiling Pascal programs
21 # `N.o' is made automatically from `N.p' with the command `$(PC) -c
26 # Compiling Fortran and Ratfor programs
27 # `N.o' is made automatically from `N.r', `N.F' or `N.f' by running
28 # the Fortran compiler. The precise command used is as follows:
31 # `$(FC) -c $(FFLAGS)'.
36 # `$(FC) -c $(FFLAGS) $(CPPFLAGS)'.
41 # `$(FC) -c $(FFLAGS) $(RFLAGS)'.
45 # Preprocessing Fortran and Ratfor programs
46 # `N.f' is made automatically from `N.r' or `N.F'. This rule runs
47 # just the preprocessor to convert a Ratfor or preprocessable
48 # Fortran program into a strict Fortran program. The precise
49 # command used is as follows:
52 # `$(FC) -F $(CPPFLAGS) $(FFLAGS)'.
57 # `$(FC) -F $(FFLAGS) $(RFLAGS)'.
61 # Compiling Modula-2 programs
62 # `N.sym' is made from `N.def' with a command of the form `$(M2C)
63 # $(M2FLAGS) $(DEFFLAGS)'. `N.o' is made from `N.mod'; the form is:
64 # `$(M2C) $(M2FLAGS) $(MODFLAGS)'.
69 # Assembling and preprocessing assembler programs
70 # `N.o' is made automatically from `N.s' by running the assembler,
71 # `as'. The precise command is `$(AS) $(ASFLAGS)'.
75 # `N.s' is made automatically from `N.S' by running the C
76 # preprocessor, `cpp'. The precise command is `$(CPP) $(CPPFLAGS)'.
80 # Linking a single object file
81 # `N' is made automatically from `N.o' by running the linker
82 # (usually called `ld') via the C compiler. The precise command
83 # used is `$(CC) $(LDFLAGS) N.o $(LOADLIBES) $(LDLIBS)'.
87 # This rule does the right thing for a simple program with only one
88 # source file. It will also do the right thing if there are multiple
89 # object files (presumably coming from various other source files),
90 # one of which has a name matching that of the executable file.
95 # when `x.c', `y.c' and `z.c' all exist will execute:
100 # cc x.o y.o z.o -o x
105 # In more complicated cases, such as when there is no object file
106 # whose name derives from the executable file name, you must write
107 # an explicit command for linking.
109 # Each kind of file automatically made into `.o' object files will
110 # be automatically linked by using the compiler (`$(CC)', `$(FC)' or
111 # `$(PC)'; the C compiler `$(CC)' is used to assemble `.s' files)
112 # without the `-c' option. This could be done by using the `.o'
113 # object files as intermediates, but it is faster to do the
114 # compiling and linking in one step, so that's how it's done.
116 # Yacc for C programs
117 # `N.c' is made automatically from `N.y' by running Yacc with the
118 # command `$(YACC) $(YFLAGS)'.
123 # `N.c' is made automatically from `N.l' by by running Lex. The
124 # actual command is `$(LEX) $(LFLAGS)'.
128 # Lex for Ratfor programs
129 # `N.r' is made automatically from `N.l' by by running Lex. The
130 # actual command is `$(LEX) $(LFLAGS)'.
134 # The convention of using the same suffix `.l' for all Lex files
135 # regardless of whether they produce C code or Ratfor code makes it
136 # impossible for `make' to determine automatically which of the two
137 # languages you are using in any particular case. If `make' is
138 # called upon to remake an object file from a `.l' file, it must
139 # guess which compiler to use. It will guess the C compiler, because
140 # that is more common. If you are using Ratfor, make sure `make'
141 # knows this by mentioning `N.r' in the makefile. Or, if you are
142 # using Ratfor exclusively, with no C files, remove `.c' from the
143 # list of implicit rule suffixes with:
146 # .SUFFIXES: .o .r .f .l ...
148 # Making Lint Libraries from C, Yacc, or Lex programs
149 # `N.ln' is made from `N.c' by running `lint'. The precise command
150 # is `$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i'. The same command is
151 # used on the C code produced from `N.y' or `N.l'.
156 # `N.dvi' is made from `N.tex' with the command `$(TEX)'. `N.tex'
157 # is made from `N.web' with `$(WEAVE)', or from `N.w' (and from
158 # `N.ch' if it exists or can be made) with `$(CWEAVE)'. `N.p' is
159 # made from `N.web' with `$(TANGLE)' and `N.c' is made from `N.w'
160 # (and from `N.ch' if it exists or can be made) with `$(CTANGLE)'.
171 # `N.dvi' is made from `N.texinfo', `N.texi', or `N.txinfo', with
172 # the command `$(TEXI2DVI) $(TEXI2DVI_FLAGS)'. `N.info' is made from
173 # `N.texinfo', `N.texi', or `N.txinfo', with the command
174 # `$(MAKEINFO) $(MAKEINFO_FLAGS)'.
185 # Any file `N' is extracted if necessary from an RCS file named
186 # either `N,v' or `RCS/N,v'. The precise command used is
187 # `$(CO) $(COFLAGS)'. `N' will not be extracted from RCS if it
188 # already exists, even if the RCS file is newer. The rules for RCS
189 # are terminal (*note Match-Anything Pattern Rules: Match-Anything
190 # Rules.), so RCS files cannot be generated from another source;
191 # they must actually exist.
197 # Any file `N' is extracted if necessary from an SCCS file named
198 # either `s.N' or `SCCS/s.N'. The precise command used is
199 # `$(GET) $(GFLAGS)'. The rules for SCCS are terminal (*note
200 # Match-Anything Pattern Rules: Match-Anything Rules.), so SCCS
201 # files cannot be generated from another source; they must actually
207 # For the benefit of SCCS, a file `N' is copied from `N.sh' and made
208 # executable (by everyone). This is for shell scripts that are
209 # checked into SCCS. Since RCS preserves the execution permission
210 # of a file, you do not need to use this feature with RCS.
214 # We recommend that you avoid using of SCCS. RCS is widely held to
215 # be superior, and is also free. By choosing free software in place
216 # of comparable (or inferior) proprietary software, you support the
217 # free software movement.
219 # Usually, you want to change only the variables listed in the table
220 # above, which are documented in the following section.
222 # However, the commands in built-in implicit rules actually use
223 # variables such as `COMPILE.c', `LINK.p', and `PREPROCESS.S', whose
224 # values contain the commands listed above.
226 # `make' follows the convention that the rule to compile a `.X' source
227 # file uses the variable `COMPILE.X'. Similarly, the rule to produce an
228 # executable from a `.X' file uses `LINK.X'; and the rule to preprocess a
229 # `.X' file uses `PREPROCESS.X'.
231 # Every rule that produces an object file uses the variable
232 # `OUTPUT_OPTION'. `make' defines this variable either to contain `-o
233 # $@', or to be empty, depending on a compile-time option. You need the
234 # `-o' option to ensure that the output goes into the right file when the
235 # source file is in a different directory, as when using `VPATH' (*note
236 # Directory Search::). However, compilers on some systems do not accept
237 # a `-o' switch for object files. If you use such a system, and use
238 # `VPATH', some compilations will put their output in the wrong place. A
239 # possible workaround for this problem is to give `OUTPUT_OPTION' the
240 # value `; mv $*.o $@'.