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