|
|
1.1 root 1: # Makefile for GNU C compiler.
1.1.1.12 root 2: # Copyright (C) 1987, 1988 Free Software Foundation, Inc.
1.1 root 3:
4: #This file is part of GNU CC.
5:
1.1.1.14 root 6: #GNU CC is free software; you can redistribute it and/or modify
7: #it under the terms of the GNU General Public License as published by
8: #the Free Software Foundation; either version 1, or (at your option)
9: #any later version.
10:
1.1 root 11: #GNU CC is distributed in the hope that it will be useful,
1.1.1.14 root 12: #but WITHOUT ANY WARRANTY; without even the implied warranty of
13: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: #GNU General Public License for more details.
15:
16: #You should have received a copy of the GNU General Public License
17: #along with GNU CC; see the file COPYING. If not, write to
18: #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
1.1 root 19:
20:
1.1.1.15 root 21: # Variables that exist for you to override.
1.1.1.16 root 22: # See below for how to change them for certain systems.
1.1.1.15 root 23:
1.1.1.17 root 24: CFLAGS = -g $(XCFLAGS)
25: CC = cc
1.1.1.15 root 26: BISON = bison
27: BISONFLAGS = -v
1.1.1.18! root 28: # This should be the version of ar to use with output from GCC.
1.1.1.15 root 29: AR = ar
30: SHELL = /bin/sh
31: # on sysV, define this as cp.
32: INSTALL = install -c
1.1.1.18! root 33: # Directory not specified here so that, if a GNU ranlib
! 34: # is earlier in the path, it will be used.
! 35: # That is likely to be true on systems that have the GNU ar
! 36: # installed earlier in the path.
! 37: RANLIB = ranlib
1.1.1.15 root 38:
39: # Compiler to use for compiling gnulib.
40: # OLDCC should not be the GNU C compiler.
41: OLDCC = cc
42:
43: # CFLAGS for use with OLDCC, for compiling gnulib.
1.1.1.16 root 44: # NOTE: -O does not work on some Unix systems!
1.1.1.17 root 45: # On them, you must take it out.
46: CCLIBFLAGS=-O
47:
1.1.1.18! root 48: # This should be the version of ar to use with output from $(OLDCC).
! 49: OLDAR = ar
! 50:
1.1.1.17 root 51: # CFLAGS for use with OLDCC, for compiling hard-params.
52: HARD_PARAMS_FLAGS=
1.1.1.15 root 53:
54: # Directory where sources are, from where we are.
55: srcdir = .
56: # Directory in which to put the executable for the command `gcc'
57: bindir = $(prefix)/usr/local/bin
58: # Directory in which to put the subprograms used by the compiler.
59: libdir = $(prefix)/usr/local/lib
60: # Directory in which to put man pages.
61: mandir = $(prefix)/usr/local/man/man1
62: # Number to put in man-page filename.
63: manext = 1
64:
65: # Additional system libraries to link with.
66: CLIB=
1.1.1.5 root 67:
1.1.1.7 root 68: # Change this to a null string if obstacks are installed in the
69: # system library.
1.1 root 70: OBSTACK=obstack.o
71:
1.1.1.16 root 72: # Directory to link to, when using the target `maketest'.
73: DIR = ../gcc
74:
75: # End of variables for you to override.
76:
77:
78: # Variables you should change for certain systems.
79:
80: # These are what you would need on HPUX:
81: # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300
82: # If you are using the GNU assembler and linker on HPUX,
83: # add -I../hp-include to CFLAGS.
84: # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
85: # bites whenever tree.def, rtl.def or machmode.def is included
86: # (ie., on every source file).
87: # If you have a floating point accelerator, you might want -lsetjmp as well.
1.1.1.17 root 88: # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -O
89: # HARD_PARAMS_FLAGS = -Wc,-Ns2000 -Wc,-Ne700
1.1.1.18! root 90: # INSTALL = cp
1.1.1.16 root 91: # For CCLIBFLAGS you might want to specify the switch that
92: # forces only 68000 instructions to be used.
1.1.1.18! root 93: # If using the GNU assembler and linker, set AR to the GNU ar program,
! 94: # wherever that is.
! 95: # To get a working alloca, you may need to get alloca.s from Emacs
! 96: # and assemble it into alloca.o rather than using alloca.c.
1.1.1.16 root 97:
1.1.1.17 root 98: # On the Sequent, you may need to set CCLIBFLAG to empty.
99:
100: # On the 3b1, this line may help you compile gnulib
101: # if you already have a prior version of gcc installed.
102: # CCLIBFLAGS = -B/usr/local/lib/gcc- -tp -Wp,-traditional
103:
1.1.1.18! root 104: # On SysV from SCO, uncomment these lines as well as those for SysV in general.
! 105: # You might also want to remove limits.h from the definition of USER_H,
! 106: # since the one that comes with the system is good for POSIX.
! 107: # RANLIB = :
! 108: # CC = rcc
! 109: # OLDCC = rcc
! 110:
1.1.1.16 root 111: # If you are making gcc for the first time, and if you are compiling it with
112: # a non-gcc compiler, and if your system doesn't have a working alloca() in any
113: # of the standard libraries (as is true for HP/UX or Genix),
1.1.1.18! root 114: # then un-comment the following line when compiling with the system's cc:
1.1.1.16 root 115: # ALLOCA = alloca.o
116: # But don't do that if compiling using GCC.
117:
1.1.1.18! root 118: # If your system has a working alloca in /lib/libPW.a,
! 119: # un-comment the following line. Note that -lPW doesn't work on HPUX or IRIX.
1.1.1.16 root 120: # CLIB= -lPW
121:
1.1.1.18! root 122: # On SysV R4, when compiling with PCC, you can get alloca as follows:
! 123: # CLIB = -lc /usr/ucblib/libucb.a
! 124: # -lc is needed because if libucb.a were searched before libc.a,
! 125: # you would get an incompatible stdio package that won't work.
! 126:
! 127: # On the NCR Tower 32 running SVR3, says [email protected] :
! 128: # Do *not* enable optimization in CFLAGS when using the native cc, because:
! 129: # a) The optimizer seems to loop when invoked with -O2.
! 130: # b) The -O1 level does stack/frame pointer optimizations that make the
! 131: # assembler alloca in libPW.a fail, and the C alloca eats *lots* of memory.
! 132: # c) gcc will eventually be recompiled with itself, so all this doesn't matter.
! 133: # CFLAGS = -g -O0
! 134: # HARD_PARAMS_FLAGS = -O0
! 135: # CCLIBFLAGS = -O2
! 136: # CLIB = -lmalloc -lPW
! 137:
1.1.1.16 root 138: # On a pyramid, you need to uncomment the following line:
1.1.1.17 root 139: # CLIB = -lc /usr/.attlib/libPW.a
1.1.1.16 root 140:
141: # If your system's malloc() routine fails for any reason (as it does on
142: # certain versions of Genix), try getting the files
143: # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
144: # MALLOC = malloc.o
145:
1.1.1.18! root 146: # To build gcc for Apollo 68K machines you must be running at least SR10.2
! 147: # with the 6.7 version of the C compiler. Use 'apollo68' as the argument to
! 148: # config.gcc, then go into a bsd4.3 environment and use this:
! 149: # CFLAGS = -g -O -Acpu,3000 -Arun,bsd4.3 -Asys,any -Anansi $(XCFLAGS)
! 150: # CCLIBFLAGS = -O -Acpu,3000 -Arun,bsd4.3 -Asys,any -Anansi
! 151: # HARD_PARAMS_FLAGS= -Anansi
1.1.1.16 root 152: # (Says [email protected].)
153:
154:
1.1.1.7 root 155: # Dependency on obstack, alloca, malloc or whatever library facilities
156: # are not installed in the system libraries.
157: LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
158:
159: # How to link with both our special library facilities
160: # and the system's installed libraries.
161: LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
162:
1.1.1.16 root 163: # Specify the directories to be searched for header files.
164: # Both . and srcdir are used, in that order,
165: # so that tm.h and config.h will be found in the compilation
166: # subdirectory rather than in the source directory.
167: INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
168: SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
1.1.1.15 root 169:
170: # Always use -I$(srcdir)/config when compiling.
171: .c.o:
1.1.1.16 root 172: $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
1.1.1.15 root 173:
1.1.1.12 root 174: # Language-specific object files for C.
175: C_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-convert.o
176:
177: # Language-specific object files for C++.
178: # (These are not yet released.)
179: CPLUS_OBJS = cplus-parse.o cplus-decl.o cplus-typeck.o \
180: cplus-cvt.o cplus-search.o cplus-lex.o \
181: cplus-class.o cplus-init.o cplus-method.o
182:
183: # Language-independent object files.
184: OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
1.1.1.16 root 185: rtl.o rtlanal.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
1.1.1.4 root 186: symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
1.1.1.2 root 187: integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
1.1.1.14 root 188: regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
189: insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
1.1 root 190:
1.1.1.2 root 191: # Files to be copied away after each stage in building.
192: STAGE_GCC=gcc
193: STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
194: insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
1.1.1.18! root 195: stamp-flags stamp-config stamp-codes \
! 196: stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
1.1.1.2 root 197: genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
1.1.1.12 root 198: cc1 cpp cccp # cc1plus
1.1.1.2 root 199:
200: # Members of gnulib.
1.1.1.18! root 201: LIBFUNCS = _eprintf _builtin_new _builtin_New _builtin_del _bb \
1.1.1.2 root 202: _umulsi3 _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
1.1.1.16 root 203: _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
1.1.1.2 root 204: _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 _cmpdf2 \
1.1.1.16 root 205: _fixunsdfsi _fixdfsi _floatsidf _truncdfsf2 _extendsfdf2 \
1.1.1.17 root 206: _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3
1.1.1.2 root 207:
1.1.1.15 root 208: # Library members defined in gnulib2.c.
209: LIB2FUNCS = _adddi3 _subdi3 _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
1.1.1.16 root 210: _anddi3 _iordi3 _xordi3 _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _one_cmpldi2 \
1.1.1.17 root 211: _bdiv _cmpdi2 _ucmpdi2 _fixunsdfdi _fixdfdi _floatdidf _varargs
1.1.1.15 root 212:
1.1.1.8 root 213: # Header files that are made available to programs compiled with gcc.
1.1.1.18! root 214: USER_H = stddef.h assert.h va-i860.h va-mips.h va-pyr.h va-sparc.h \
! 215: va-spur.h limits.h proto.h
1.1.1.8 root 216:
1.1.1.16 root 217: # The files that "belong" in CONFIG_H are deliberately omitted
218: # because having them there would not be useful in actual practice.
219: # All they would do is cause complete recompilation every time
220: # one of the machine description files is edited.
221: # That may or may not be what one wants to do.
222: # If it is, rm *.o is an easy way to do it.
1.1 root 223: # CONFIG_H = config.h tm.h
224: CONFIG_H =
225: RTL_H = rtl.h rtl.def machmode.def
1.1.1.13 root 226: TREE_H = tree.h real.h tree.def machmode.def
1.1.1.12 root 227: CPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h
1.1 root 228:
1.1.1.16 root 229: # Note that dependencies on obstack.h are not written
230: # because that file is not part of GCC.
231: # Dependencies on gvarargs.h are not written
232: # because all that file does, when not compiling with GCC,
233: # is include the system varargs.h.
234:
1.1.1.18! root 235: all: config.status gnulib gcc cc1 cpp float.h gnulib2 libg # cc1plus
1.1.1.16 root 236:
1.1.1.18! root 237: lang-c: config.status gnulib gcc cc1 cpp gnulib2 libg
! 238: # lang-cplus: config.status gnulib gcc cc1plus cpp gnulib2 libg
1.1.1.16 root 239:
240: config.status:
241: @echo You must configure gcc. Look at the INSTALL file for details.
242: @false
1.1.1.2 root 243:
1.1.1.16 root 244: doc: $(srcdir)/cpp.info $(srcdir)/gplus.info $(srcdir)/gcc.info
1.1.1.4 root 245:
1.1.1.2 root 246: compilations: ${OBJS}
1.1 root 247:
1.1.1.7 root 248: gcc: gcc.o version.o $(LIBDEPS)
1.1.1.6 root 249: $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
1.1.1.2 root 250: # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
251: mv gccnew gcc
1.1 root 252:
1.1.1.12 root 253: cc1: $(C_OBJS) $(OBJS) $(LIBDEPS)
254: $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
255:
256: cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
257: $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
1.1 root 258:
1.1.1.18! root 259: # Make sure there is some libg.a to be found,
! 260: # in case compiling with a GCC that was built but not installed.
! 261: libg:
! 262: if [ ! -f /lib/libg.a -a ! -f /usr/lib/libg.a ]; \
! 263: then ar rc libg.a; else true; fi
! 264:
1.1.1.2 root 265: #Library of arithmetic subroutines
266: # Don't compile this with gcc!
1.1.1.15 root 267: # (That would cause most arithmetic functions to call themselves.)
1.1.1.16 root 268: gnulib: gnulib.c $(CONFIG_H)
269: -rm -f stamp-gnulib2
270: rm -f tmpgnulib gnulib; \
1.1.1.2 root 271: for name in $(LIBFUNCS); \
272: do \
273: echo $${name}; \
274: rm -f $${name}.c; \
1.1.1.16 root 275: cp $(srcdir)/gnulib.c $${name}.c; \
1.1.1.17 root 276: $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $${name}.c; \
1.1.1.18! root 277: $(OLDAR) qc tmpgnulib $${name}.o; \
1.1.1.16 root 278: rm -f $${name}.[co]; \
1.1.1.2 root 279: done
1.1.1.18! root 280: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ;then $(RANLIB) tmpgnulib; else true; fi
1.1.1.16 root 281: # Actually build it in tmpgnulib above, then rename now,
282: # so that gnulib itself remains nonexistent if compilation is aborted.
283: mv tmpgnulib gnulib
1.1.1.2 root 284: # On HPUX, if you are working with the GNU assembler and linker,
1.1.1.17 root 285: # the previous two command lines must be replaced with the following line.
1.1.1.2 root 286: # No change is needed here if you are using the HPUX assembler and linker.
1.1.1.17 root 287: # ../hp-bin/hpxt tmpgnulib gnulib
1.1 root 288:
1.1.1.16 root 289: gnulib2: stamp-gnulib2;
290: stamp-gnulib2: gnulib2.c gnulib cc1 gcc cpp $(CONFIG_H)
1.1.1.15 root 291: for name in $(LIB2FUNCS); \
292: do \
293: echo $${name}; \
1.1.1.16 root 294: ./gcc -B./ -fstrength-reduce -O $(INCLUDES) $(GNULIB2_CFLAGS) -c -DL$${name} $(srcdir)/gnulib2.c -o $${name}.o; \
295: $(AR) rc gnulib $${name}.o; \
296: rm -f $${name}.o; \
1.1.1.15 root 297: done
1.1.1.18! root 298: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then $(RANLIB) gnulib; else true; fi
1.1.1.16 root 299: # On HPUX, if you are working with the GNU assembler and linker,
300: # the previous line must be commented out.
301: # No change is needed here if you are using the HPUX assembler and linker.
1.1.1.15 root 302: touch stamp-gnulib2
1.1.1.16 root 303:
304: float.h:
305: # Originally, we used `make' rather than $(MAKE), to avoid propagating
306: # a CC=gcc command option. However, since hard-params is now made
307: # with $(OLDCC) explicitly, this is no longer important.
308: # However, $(MAKE) fails on some systems where it isn't defined.
309: # `make' has the disadvantage of sometimes running the system's make,
310: # instead of GNU make. And the system's make might not support VPATH.
311: # However, the compilation of hard-params should not need to use VPATH,
312: # due to the explicit use of `$(srcdir)'.
313: make hard-params
314: -./hard-params -f > float.h
315:
316: # Compile hard-params with standard cc. It avoids some headaches.
317: hard-params: hard-params.o
1.1.1.17 root 318: $(OLDCC) $(HARD_PARAMS_FLAGS) $(LDFLAGS) hard-params.o -o $@
1.1.1.16 root 319: hard-params.o: $(srcdir)/hard-params.c
320: -cp $(srcdir)/hard-params.c . > /dev/null 2>&1
1.1.1.17 root 321: $(OLDCC) $(HARD_PARAMS_FLAGS) $(CPPFLAGS) -DNO_SC -c hard-params.c
1.1.1.7 root 322:
1.1.1.12 root 323: # C language specific files.
1.1.1.7 root 324:
1.1.1.16 root 325: c-parse.tab.o : $(srcdir)/c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h input.h
1.1.1.17 root 326: $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.tab.c
1.1.1.16 root 327: $(srcdir)/c-parse.tab.c : $(srcdir)/c-parse.y
328: $(BISON) $(BISONFLAGS) $(srcdir)/c-parse.y -o $@
1.1.1.7 root 329:
330: c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
331: c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
332: c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
333:
1.1.1.12 root 334: # C++ language specific files.
335:
1.1.1.16 root 336: cplus-parse.o : $(srcdir)/cplus-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
337: $(CC) -c $(CFLAGS) $(INCLUDES) \
338: -DPARSE_OUTPUT=\"$(PWD)/cplus-parse.output\" \
339: `echo $(srcdir)/cplus-parse.c | sed 's,^\./,,'`
1.1.1.12 root 340:
1.1.1.16 root 341: $(srcdir)/cplus-parse.h $(srcdir)/cplus-parse.c : $(srcdir)/cplus-parse.y
1.1.1.12 root 342: @echo expect 49 shift/reduce conflicts and 4 reduce/reduce conflicts
1.1.1.16 root 343: $(BISON) $(BISONFLAGS) -d -o $(srcdir)/cplus-parse.c $(srcdir)/cplus-parse.y
1.1.1.12 root 344:
1.1.1.16 root 345: cplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) $(srcdir)/cplus-parse.h
1.1.1.12 root 346: cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
347: cplus-typeck.o : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
348: cplus-class.o : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H)
349: cplus-init.o : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H)
350: cplus-method.o : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
351: cplus-cvt.o : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
352: cplus-search.o : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H)
353: new-method.o : new-method.c $(CONFIG_H) $(CPLUS_TREE_H)
354:
1.1.1.7 root 355: # Language-independent files.
356:
1.1.1.18! root 357: gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
1.1.1.16 root 358: $(CC) $(CFLAGS) $(INCLUDES) \
359: -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
360: -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c \
361: `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
362:
363: version.o: version.c
364: obstack.o: obstack.c
365:
1.1.1.15 root 366: tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h
1.1 root 367: print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1.1.1.16 root 368: stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) $(RTL_H)
1.1 root 369: fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
1.1.1.18! root 370: toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h
1.1 root 371:
372: rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
373:
1.1.1.16 root 374: rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
375:
1.1.1.13 root 376: varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h \
377: insn-codes.h hard-reg-set.h
1.1.1.2 root 378: stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1.1.1.17 root 379: insn-flags.h insn-config.h insn-codes.h expr.h regs.h hard-reg-set.h recog.h
1.1.1.2 root 380: expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1.1.1.18! root 381: insn-flags.h insn-codes.h expr.h insn-config.h recog.h typeclass.h
1.1.1.2 root 382: expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
383: insn-flags.h insn-codes.h expr.h insn-config.h recog.h
1.1.1.6 root 384: explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
1.1.1.2 root 385: optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
386: insn-flags.h insn-codes.h expr.h insn-config.h recog.h
387: symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
1.1.1.7 root 388: dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h
1.1.1.16 root 389: sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H)
1.1.1.2 root 390:
1.1.1.13 root 391: emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h real.h
1.1 root 392:
1.1.1.6 root 393: integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
394: insn-flags.h insn-codes.h
1.1 root 395:
1.1.1.2 root 396: jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
397: stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
1.1 root 398:
1.1.1.13 root 399: cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h
400: loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1.1.1.16 root 401: regs.h hard-reg-set.h recog.h flags.h expr.h
1.1.1.2 root 402: flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
403: combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
404: insn-config.h regs.h basic-block.h recog.h
1.1.1.16 root 405: regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
406: basic-block.h regs.h insn-config.h recog.h
407: local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h regs.h \
408: hard-reg-set.h insn-config.h recog.h
1.1.1.2 root 409: global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \
410: basic-block.h regs.h hard-reg-set.h insn-config.h
1.1 root 411:
1.1.1.16 root 412: reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
1.1.1.2 root 413: reload.h recog.h hard-reg-set.h insn-config.h regs.h
414: reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h \
1.1.1.16 root 415: reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
1.1.1.14 root 416: caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
417: reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
1.1.1.16 root 418: final.o : final.c $(CONFIG_H) $(RTL_H) flags.h regs.h recog.h conditions.h \
419: gdbfiles.h insn-config.h real.h output.h
1.1.1.2 root 420: recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1.1.1.16 root 421: regs.h recog.h hard-reg-set.h insn-config.h real.h
1.1 root 422:
1.1.1.12 root 423: # Normally this target is not used; but it is used if you
424: # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
425: # from the GNU Emacs distribution.
426: # Note some machines won't allow $(CC) without -S on this source file.
427: alloca.o: alloca.c
1.1.1.16 root 428: $(CC) $(CFLAGS) -S `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1.1.1.12 root 429: as alloca.s -o alloca.o
430:
1.1 root 431: # Now the source files that are generated from the machine description.
432:
1.1.1.2 root 433: .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
434: insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
435:
1.1.1.12 root 436: # The following pair of rules has this effect:
437: # genconfig is run only if the md has changed since genconfig was last run;
438: # but the file insn-config.h is touched only when its contents actually change.
439:
440: # Each of the other insn-* files is handled by a similar pair of rules.
441:
1.1.1.18! root 442: insn-config.h: stamp-config ;
! 443: stamp-config : md genconfig $(srcdir)/move-if-change
1.1.1.17 root 444: ./genconfig md > tmp-config.h
445: $(srcdir)/move-if-change tmp-config.h insn-config.h
1.1.1.18! root 446: touch stamp-config
1.1 root 447:
1.1.1.18! root 448: insn-flags.h: stamp-flags ;
! 449: stamp-flags : md genflags $(srcdir)/move-if-change
1.1.1.17 root 450: ./genflags md > tmp-flags.h
451: $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1.1.1.18! root 452: touch stamp-flags
1.1 root 453:
1.1.1.18! root 454: insn-codes.h: stamp-codes ;
! 455: stamp-codes : md gencodes $(srcdir)/move-if-change
1.1.1.17 root 456: ./gencodes md > tmp-codes.h
457: $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1.1.1.18! root 458: touch stamp-codes
1.1 root 459:
1.1.1.16 root 460: insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h insn-codes.h \
461: insn-config.h insn-flags.h
462: $(CC) $(CFLAGS) $(INCLUDES) -c insn-emit.c
1.1 root 463:
1.1.1.18! root 464: insn-emit.c: stamp-emit ;
! 465: stamp-emit : md genemit $(srcdir)/move-if-change
1.1.1.17 root 466: ./genemit md > tmp-emit.c
467: $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1.1.1.18! root 468: touch stamp-emit
1.1 root 469:
1.1.1.16 root 470: insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h real.h recog.h
471: $(CC) $(CFLAGS) $(INCLUDES) -c insn-recog.c
1.1 root 472:
1.1.1.18! root 473: insn-recog.c: stamp-recog ;
! 474: stamp-recog : md genrecog $(srcdir)/move-if-change
1.1.1.17 root 475: ./genrecog md > tmp-recog.c
476: $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1.1.1.18! root 477: touch stamp-recog
1.1 root 478:
1.1.1.16 root 479: insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
480: $(CC) $(CFLAGS) $(INCLUDES) -c insn-extract.c
1.1 root 481:
1.1.1.18! root 482: insn-extract.c: stamp-extract ;
! 483: stamp-extract : md genextract $(srcdir)/move-if-change
1.1.1.17 root 484: ./genextract md > tmp-extract.c
485: $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1.1.1.18! root 486: touch stamp-extract
1.1 root 487:
1.1.1.13 root 488: insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h
1.1.1.16 root 489: $(CC) $(CFLAGS) $(INCLUDES) -c insn-peep.c
1.1.1.2 root 490:
1.1.1.18! root 491: insn-peep.c: stamp-peep ;
! 492: stamp-peep : md genpeep $(srcdir)/move-if-change
1.1.1.17 root 493: ./genpeep md > tmp-peep.c
494: $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1.1.1.18! root 495: touch stamp-peep
1.1.1.2 root 496:
1.1.1.13 root 497: insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1.1.1.15 root 498: hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c
1.1.1.16 root 499: $(CC) $(CFLAGS) $(INCLUDES) -c insn-output.c
1.1 root 500:
1.1.1.18! root 501: insn-output.c: stamp-output ;
! 502: stamp-output : md genoutput $(srcdir)/move-if-change
1.1.1.17 root 503: ./genoutput md > tmp-output.c
504: $(srcdir)/move-if-change tmp-output.c insn-output.c
1.1.1.18! root 505: touch stamp-output
1.1 root 506:
507: # Now the programs that generate those files.
1.1.1.16 root 508: # $(CONFIG_H) is omitted from the deps of the gen*.o
509: # because these programs don't really depend on anything
510: # about the target machine. They do depend on config.h itself,
511: # since that describes the host machine.
1.1 root 512:
1.1.1.7 root 513: genconfig : genconfig.o rtl.o $(LIBDEPS)
1.1.1.6 root 514: $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
1.1.1.2 root 515:
1.1.1.16 root 516: genconfig.o : genconfig.c $(RTL_H) config.h
1.1 root 517:
1.1.1.7 root 518: genflags : genflags.o rtl.o $(LIBDEPS)
1.1.1.6 root 519: $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
1.1 root 520:
1.1.1.16 root 521: genflags.o : genflags.c $(RTL_H) config.h
1.1 root 522:
1.1.1.7 root 523: gencodes : gencodes.o rtl.o $(LIBDEPS)
1.1.1.6 root 524: $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
1.1 root 525:
1.1.1.16 root 526: gencodes.o : gencodes.c $(RTL_H) config.h
1.1 root 527:
1.1.1.7 root 528: genemit : genemit.o rtl.o $(LIBDEPS)
1.1.1.6 root 529: $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
1.1 root 530:
1.1.1.16 root 531: genemit.o : genemit.c $(RTL_H) config.h
1.1 root 532:
1.1.1.7 root 533: genrecog : genrecog.o rtl.o $(LIBDEPS)
1.1.1.6 root 534: $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
1.1 root 535:
1.1.1.16 root 536: genrecog.o : genrecog.c $(RTL_H) config.h
1.1 root 537:
1.1.1.7 root 538: genextract : genextract.o rtl.o $(LIBDEPS)
1.1.1.6 root 539: $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
1.1 root 540:
1.1.1.16 root 541: genextract.o : genextract.c $(RTL_H) config.h
1.1 root 542:
1.1.1.7 root 543: genpeep : genpeep.o rtl.o $(LIBDEPS)
1.1.1.6 root 544: $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
1.1 root 545:
1.1.1.16 root 546: genpeep.o : genpeep.c $(RTL_H) config.h
1.1 root 547:
1.1.1.7 root 548: genoutput : genoutput.o rtl.o $(LIBDEPS)
1.1.1.6 root 549: $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
1.1.1.2 root 550:
1.1.1.16 root 551: genoutput.o : genoutput.c $(RTL_H) config.h
1.1 root 552:
553: # Making the preprocessor
554: cpp: cccp
555: -rm -f cpp
556: ln cccp cpp
1.1.1.7 root 557: cccp: cccp.o cexp.o version.o $(LIBDEPS)
558: $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
1.1.1.16 root 559: cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1.1.1.17 root 560: $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1.1.1.16 root 561: $(srcdir)/cexp.c: $(srcdir)/cexp.y
562: $(BISON) -o $(srcdir)/cexp.c $(srcdir)/cexp.y
563: cccp.o: cccp.c $(CONFIG_H)
564: $(CC) $(CFLAGS) $(INCLUDES) \
1.1.1.15 root 565: -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
1.1.1.16 root 566: -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
567: -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1.1 root 568:
1.1.1.16 root 569: $(srcdir)/cpp.info: $(srcdir)/cpp.texinfo
570: makeinfo `echo $(srcdir)/cpp.texinfo | sed 's,^\./,,'`
1.1.1.4 root 571:
1.1.1.16 root 572: $(srcdir)/gplus.info: $(srcdir)/gplus.texinfo
573: makeinfo `echo $(srcdir)/gplus.texinfo | sed 's,^\./,,'`
1.1.1.12 root 574:
1.1.1.16 root 575: $(srcdir)/gcc.info: $(srcdir)/gcc.texinfo
576: makeinfo `echo $(srcdir)/gcc.texinfo | sed 's,^\./,,'`
1.1.1.4 root 577:
1.1.1.2 root 578: # gnulib is not deleted because deleting it would be inconvenient
579: # for most uses of this target.
1.1 root 580: clean:
1.1.1.2 root 581: -rm -f $(STAGESTUFF) $(STAGE_GCC)
1.1.1.16 root 582: # Delete the temp files made in the course of building gnulib.
583: -rm -f tmpgnulib
584: for name in $(LIBFUNCS); do rm -f $${name}.c; done
1.1.1.17 root 585: -rm -f stamp-*.[ch] tmp-*
1.1.1.16 root 586: -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop *.dbr *.jump2
587: -rm -f core float.h hard-params
1.1.1.2 root 588:
1.1.1.15 root 589: # Like clean but also delete the links made to configure gcc.
1.1.1.16 root 590: # Also removes gnulib, since that is desirable if you are changing cpus.
591: cleanconfig: clean
592: -rm -f tm.h aux-output.c config.h md config.status gnulib stamp-gnulib2
1.1.1.15 root 593:
1.1.1.8 root 594: # Get rid of every file that's generated from some other file (except INSTALL).
1.1.1.16 root 595: realclean: cleanconfig
1.1.1.8 root 596: -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
1.1.1.15 root 597: # -rm -f cplus-parse.tab.c cplus-parse.output
1.1.1.16 root 598: -rm -f c-parse.tab.c c-parse.output c-parse.tab.output
1.1.1.15 root 599: -rm -f gnulib cexp.c TAGS
600: -rm -f cpp.info* cpp.?? cpp.??s cpp.log cpp.toc cpp.*aux
1.1.1.12 root 601: -rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux
602: -rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux
1.1.1.15 root 603: -rm -f *.dvi
1.1.1.8 root 604:
1.1.1.2 root 605: # Copy the files into directories where they will be run.
1.1.1.18! root 606: install: all $(USER_H) float.h gvarargs.h gstdarg.h gcc.1
1.1.1.13 root 607: -mkdir $(libdir)
1.1.1.18! root 608: -if [ -f cc1 ] ; then $(INSTALL) cc1 $(libdir)/gcc-cc1 ; else true; fi
! 609: -if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(libdir)/gcc-cc1plus ; else true; fi
1.1.1.12 root 610: $(INSTALL) gnulib $(libdir)/gcc-gnulib
1.1.1.18! root 611: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then (cd $(libdir); $(RANLIB) gcc-gnulib) ; else true; fi
1.1.1.12 root 612: $(INSTALL) cpp $(libdir)/gcc-cpp
613: $(INSTALL) gcc $(bindir)
1.1.1.6 root 614: -mkdir $(libdir)/gcc-include
1.1.1.16 root 615: -chmod ugo+rx $(libdir)/gcc-include
1.1.1.17 root 616: for file in $(USER_H); do \
617: for eachfile in $(srcdir)/$${file} ; do \
1.1.1.18! root 618: $(INSTALL) $${eachfile} $(libdir)/gcc-include/`basename $${eachfile}`; \
1.1.1.17 root 619: done ; done
1.1.1.16 root 620: $(INSTALL) float.h $(libdir)/gcc-include/float.h
621: $(INSTALL) $(srcdir)/gvarargs.h $(libdir)/gcc-include/varargs.h
1.1.1.18! root 622: $(INSTALL) $(srcdir)/gstdarg.h $(libdir)/gcc-include/stdarg.h
! 623: -chmod a-x $(libdir)/gcc-include/*.h
1.1.1.16 root 624: $(INSTALL) $(srcdir)/gcc.1 $(mandir)/gcc.$(manext)
1.1.1.18! root 625: -chmod a-x $(mandir)/gcc.$(manext)
! 626: # Make sure -lg won't get an error message from the linker:
! 627: # create a library libg.a if there isn't one.
! 628: -if [ -f /lib/libg.a -o -f /usr/lib/libg.a ]; then \
! 629: : ; \
! 630: else \
! 631: echo Installing a dummy libg.a into /usr/lib; \
! 632: echo "_no_libg(){}" > _no_libg.c; \
! 633: ./gcc -B./ -c _no_libg.c; \
! 634: $(AR) rc libg.a _no_libg.o; \
! 635: $(INSTALL) libg.a /usr/lib/libg.a; \
! 636: if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then (cd /usr/lib; $(RANLIB) libg.a) ; else true; fi; \
! 637: rm -f _no_libg.[co] libg.a; \
! 638: fi
1.1 root 639:
640: # do make -f ../gcc/Makefile maketest DIR=../gcc
641: # in the intended test directory to make it a suitable test directory.
642: maketest:
643: ln -s $(DIR)/*.[chy] .
1.1.1.16 root 644: ln -s $(DIR)/config .
1.1 root 645: ln -s $(DIR)/*.def .
1.1.1.11 root 646: -rm -f =*
1.1 root 647: ln -s $(DIR)/.gdbinit .
648: -ln -s $(DIR)/bison.simple .
1.1.1.11 root 649: ln -s $(DIR)/config.gcc .
1.1.1.2 root 650: ln -s $(DIR)/move-if-change .
1.1.1.16 root 651: # The then and else were swapped to avoid a problem on Ultrix.
652: if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile . ; else false; fi
1.1.1.11 root 653: -rm tm.h aux-output.c config.h md
654: make clean
655: # You must then run config.gcc to set up for compilation.
1.1.1.2 root 656:
1.1.1.10 root 657: bootstrap: all force
658: $(MAKE) stage1
1.1.1.16 root 659: $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir)
1.1.1.10 root 660: $(MAKE) stage2
1.1.1.16 root 661: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir)
1.1.1.10 root 662:
1.1.1.13 root 663: bootstrap2: force
1.1.1.16 root 664: $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir)
1.1.1.13 root 665: $(MAKE) stage2
1.1.1.16 root 666: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir)
1.1.1.13 root 667:
668: bootstrap3: force
1.1.1.16 root 669: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir)
1.1.1.13 root 670:
1.1.1.2 root 671: # Copy the object files from a particular stage into a subdirectory.
672: stage1: force
673: -mkdir stage1
1.1.1.12 root 674: -mv $(STAGESTUFF) $(STAGE_GCC) stage1
1.1.1.10 root 675: -rm -f stage1/gnulib
1.1.1.18! root 676: -ln gnulib stage1 || cp gnulib stage1
! 677: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then $(RANLIB) stage1/gnulib; else true; fi
1.1.1.2 root 678:
679: stage2: force
680: -mkdir stage2
1.1.1.12 root 681: -mv $(STAGESTUFF) $(STAGE_GCC) stage2
1.1.1.10 root 682: -rm -f stage2/gnulib
1.1.1.18! root 683: -ln gnulib stage2 || cp gnulib stage2
! 684: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then $(RANLIB) stage2/gnulib; else true; fi
1.1.1.2 root 685:
686: stage3: force
687: -mkdir stage3
1.1.1.12 root 688: -mv $(STAGESTUFF) $(STAGE_GCC) stage3
1.1.1.10 root 689: -rm -f stage3/gnulib
1.1.1.18! root 690: -ln gnulib stage3 || cp gnulib stage3
! 691: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then $(RANLIB) stage3/gnulib; else true; fi
1.1.1.8 root 692:
1.1.1.16 root 693: stage4: force
694: -mkdir stage4
695: -mv $(STAGESTUFF) $(STAGE_GCC) stage4
696: -rm -f stage4/gnulib
1.1.1.18! root 697: -ln gnulib stage4 || cp gnulib stage4
! 698: -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then $(RANLIB) stage4/gnulib; else true; fi
1.1.1.16 root 699:
1.1.1.2 root 700: TAGS: force
1.1.1.9 root 701: mkdir temp
1.1.1.12 root 702: -mv c-parse.tab.c cplus-parse.c cplus-parse.h cexp.c temp
1.1.1.2 root 703: etags *.y *.h *.c
1.1.1.9 root 704: mv temp/* .
705: rmdir temp
706:
1.1.1.16 root 707: includes: force
1.1.1.18! root 708: export LIB; LIB=$(libdir)/gcc-include ./fixincludes
1.1.1.16 root 709:
1.1.1.9 root 710: #In GNU Make, ignore whether `stage*' exists.
1.1.1.16 root 711: .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
1.1.1.10 root 712:
713: force:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.