Roland Ver. 4.5 Información técnica Pagina 124

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 212
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 123
114 GNU make
cc -c x.c -o x.o
cc -c y.c -o y.o
cc -c z.c -o z.o
cc x.o y.o z.o -o x
rm -f x.o
rm -f y.o
rm -f z.o
In more complicated cases, such as when there is no object file whose name
derives from the executable file name, you must write an explicit recipe for
linking.
Each kind of file automatically made into ‘.o object files will be automatically
linked by using the compiler (‘$(CC)’, ‘$(FC) or $(PC)’; the C compiler $(CC)
is used to assemble .s files) without the -c option. This could be done by
using the .o object files as intermediates, but it is faster to do the compiling
and linking in one step, so that’s how it’s done.
Yacc for C programs
n.c is made automatically from n.y by running Yacc with the recipe $(YACC)
$(YFLAGS)’.
Lex for C programs
n.c is made automatically from n.l by running Lex. The actual recipe is
$(LEX) $(LFLAGS)’.
Lex for Ratfor programs
n.r is made automatically from n.l by running Lex. The actual recipe is
$(LEX) $(LFLAGS)’.
The convention of using the same suffix .l for all Lex files regardless of whether
they produce C code or Ratfor code makes it impossible for make to determine
automatically which of the two languages you are using in any particular case. If
make is called upon to remake an object file from a ‘.l’ file, it must guess which
compiler to use. It will guess the C compiler, because that is more common.
If you are using Ratfor, make sure make knows this by mentioning n.r in the
makefile. Or, if you are using Ratfor exclusively, with no C files, remove .c
from the list of implicit rule suffixes with:
.SUFFIXES:
.SUFFIXES: .o .r .f .l ...
Making Lint Libraries from C, Yacc, or Lex programs
n.ln is made from n.c by running lint. The precise recipe is
$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i’. The same recipe is used on the C
code produced from n.y or n.l.
T
E
X and Web
n.dvi is made from n.tex with the recipe ‘$(TEX)’. n.tex is made from n.web
with $(WEAVE)’, or from n.w (and from n.ch if it exists or can be made) with
$(CWEAVE)’. n.p is made from n.web with $(TANGLE) and n.c is made from
n.w (and from n.ch if it exists or can be made) with $(CTANGLE)’.
Vista de pagina 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 211 212

Comentarios a estos manuales

Sin comentarios