|
|
1.1 ! root 1: # Makefile for GNU C compiler. ! 2: # Copyright (C) 1987, 1988, 1990, 1991 Free Software Foundation, Inc. ! 3: ! 4: #This file is part of GNU CC. ! 5: ! 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 2, or (at your option) ! 9: #any later version. ! 10: ! 11: #GNU CC is distributed in the hope that it will be useful, ! 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. ! 19: ! 20: # The targets for external use include: ! 21: # all, doc, proto, install, install-cross, install-cross-rest, ! 22: # uninstall, TAGS, mostlyclean, clean, cleanconfig, realclean, ! 23: # stage1, stage2, stage3, stage4. ! 24: ! 25: .NOEXPORT: # This tells GNU Make version 3 ! 26: # not to put all the variables in the environment. ! 27: ! 28: # Variables that exist for you to override. ! 29: # See below for how to change them for certain systems. ! 30: ! 31: # Selection of languages to be made. ! 32: LANGUAGES = c c++ objective-c proto ! 33: ! 34: ALLOCA = ! 35: ALLOCA_FLAGS = -S -Demacs ! 36: ALLOCA_FINISH = as -o alloca.o alloca.s ! 37: ! 38: # Various ways of specifying flags for compilations: ! 39: # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2. ! 40: # BOOT_CFLAGS is the value of CFLAGS to pass ! 41: # to the stage2 and stage3 compilations ! 42: # XCFLAGS is used for most compilations but not when using the GCC just built. ! 43: XCFLAGS = ! 44: CFLAGS = -g ! 45: BOOT_CFLAGS = -O $(CFLAGS) ! 46: # These exists to be overridden by the x-* and t-* files, respectively. ! 47: X_CFLAGS = ! 48: T_CFLAGS = ! 49: ! 50: X_CPPFLAGS = ! 51: T_CPPFLAGS = ! 52: ! 53: CC = cc ! 54: BISON = bison ! 55: BISONFLAGS = ! 56: AR = ar ! 57: OLDAR_FLAGS = qc ! 58: AR_FLAGS = rc ! 59: SHELL = /bin/sh ! 60: # on sysV, define this as cp. ! 61: INSTALL = install -c ! 62: # These permit overriding just for certain files. ! 63: INSTALL_PROGRAM = $(INSTALL) ! 64: INSTALL_DATA = $(INSTALL) ! 65: SYMLINK = ln -s ! 66: ! 67: # Define this as & to perform parallel make on a Sequent. ! 68: # Note that this has some bugs, and it seems currently necessary ! 69: # to compile all the gen* files first by hand to avoid erroneous results. ! 70: P = ! 71: ! 72: # How to invoke ranlib. ! 73: RANLIB = ranlib ! 74: # Test to use to see whether ranlib exists on the system. ! 75: RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ! 76: ! 77: # Compiler to use for compiling libgcc1.a. ! 78: # OLDCC should not be the GNU C compiler, ! 79: # since that would compile typical libgcc1.a functions such as mulsi3 ! 80: # into infinite recursions. ! 81: OLDCC = cc ! 82: ! 83: # CFLAGS for use with OLDCC, for compiling libgcc1.a. ! 84: # NOTE: -O does not work on some Unix systems! ! 85: CCLIBFLAGS = -O ! 86: ! 87: # Version of ar to use when compiling libgcc1.a. ! 88: OLDAR = ar ! 89: ! 90: # The GCC to use for compiling libgcc2.a. Usually the one we just built. ! 91: # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). ! 92: GCC_FOR_TARGET = ./gcc ! 93: ! 94: # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. ! 95: # It omits XCFLAGS, and specifies -B./. ! 96: GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./ ! 97: ! 98: # Special flags for compiling enquire. ! 99: # We disable optimization to make floating point more reliable. ! 100: ENQUIRE_CFLAGS = -DNO_SC -DNO_MEM -DNO_STDDEF -O0 ! 101: ENQUIRE_LDFLAGS = $(LDFLAGS) ! 102: ! 103: # Tools to use when building a cross-compiler. ! 104: # These are used because `configure' appends `cross-make' ! 105: # to the makefile when making a cross-compiler. ! 106: ! 107: TARGET_TOOLPREFIX = $(tooldir)/bin/ ! 108: AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar ! 109: AR_FOR_TARGET_FLAGS = rc ! 110: RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib ! 111: RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ] ! 112: CROSS_TOOLS = ! 113: ! 114: target= ... `configure' substitutes actual target name here. ! 115: xmake_file= ... `configure' substitutes actual x- file name here. ! 116: tmake_file= ... `configure' substitutes actual t- file name here. ! 117: version=`awk '{printf "%s", substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c` ! 118: ! 119: # Directory where sources are, from where we are. ! 120: srcdir = . ! 121: # Common prefix for installation directories. ! 122: # NOTE: This directory must exist when you start installation. ! 123: prefix = /usr/local ! 124: # Directory in which to put the executable for the command `gcc' ! 125: bindir = $(prefix)/bin ! 126: # Directory in which to put the directories used by the compiler. ! 127: libdir = $(prefix)/lib ! 128: # Directory in which the compiler finds executables, libraries, etc. ! 129: libsubdir = $(libdir)/gcc/$(target)/$(version) ! 130: # Extension (if any) to put in installed man-page filename. ! 131: manext = .1 ! 132: # Directory in which to put man pages. ! 133: mandir = $(prefix)/man/man1 ! 134: # Directory in which to find other cross-compilation tools and headers. ! 135: # Used in install-cross. ! 136: tooldir = $(prefix)/$(target) ! 137: ! 138: # Additional system libraries to link with. ! 139: CLIB= ! 140: ! 141: # Change this to a null string if obstacks are installed in the ! 142: # system library. ! 143: OBSTACK=obstack.o ! 144: ! 145: # Specify the rule for actually making libgcc1.a. ! 146: LIBGCC1 = libgcc1.a ! 147: ! 148: # Specify the rule for actually making libgcc2.a. ! 149: LIBGCC2 = libgcc2.a ! 150: ! 151: # Options to use when compiling libgcc2.a. ! 152: # -g1 causes output of debug info only for file-scope entities. ! 153: # we use this here because that should be enough, and also ! 154: # so that -g1 will be tested. ! 155: LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 ! 156: ! 157: # List of extra executables that should be compiled for this target machine ! 158: # that are used for compiling from source code to object code. ! 159: # The rules for compiling them should be in the t-* file for the machine. ! 160: EXTRA_PASSES = ! 161: ! 162: # List of extra executables that should be compiled for this target machine ! 163: # that are used for linking. ! 164: # The rules for compiling them should be in the t-* file for the machine. ! 165: EXTRA_PARTS = ! 166: ! 167: # List of extra object files that should be compiled and linked with ! 168: # compiler proper (cc1, cc1obj, cc1plus). ! 169: EXTRA_OBJS = ! 170: ! 171: # List of extra C and assembler files to add to libgcc1.a. ! 172: # Assembler files should have names ending in `.asm'. ! 173: LIB1FUNCS_EXTRA = ! 174: ! 175: # List of extra C and assembler files to add to libgcc2.a. ! 176: # Assembler files should have names ending in `.asm'. ! 177: LIB2FUNCS_EXTRA = ! 178: ! 179: # Program to convert libraries. ! 180: LIBCONVERT = ! 181: ! 182: # Control whether header files are installed. ! 183: # We will change this to install-fixincludes eventually. ! 184: # It would be useful for people to try this now. ! 185: INSTALL_HEADERS=install-headers ! 186: ! 187: # Select which version of fixincludes to use (I.E. regular versus SVR4) ! 188: FIXINCLUDES=fixincludes ! 189: ! 190: # List of things which should already be built whenever we try to use gcc ! 191: # to compile anything (without linking). ! 192: GCC_PASSES=gcc cc1 cpp $(EXTRA_PASSES) ! 193: ! 194: # List of things which should already be built whenever we try to use gcc ! 195: # to link anything. ! 196: GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PARTS) ! 197: ! 198: # Change this to empty to prevent installing limits.h. ! 199: # Actually, this currently has no effect, ! 200: # and if that causes no problems, it can be deleted. ! 201: # Otherwise, it must be replaced so as to control ! 202: # the actions of install-limits-h. ! 203: LIMITS_H = limits.h ! 204: ! 205: # Directory to link to, when using the target `maketest'. ! 206: DIR = ../gcc ! 207: ! 208: # Flags to use when cross-building GCC. ! 209: # Prefix to apply to names of object files when using them ! 210: # to run on the machine we are compiling on. ! 211: HOST_PREFIX= ! 212: # Prefix to apply to names of object files when compiling them ! 213: # to run on the machine we are compiling on. ! 214: # The default for this variable is chosen to keep these rules ! 215: # out of the way of the other rules for compiling the same source files. ! 216: HOST_PREFIX_1=loser- ! 217: HOST_CC=$(CC) ! 218: HOST_CFLAGS=$(ALL_CFLAGS) ! 219: HOST_CLIB=$(CLIB) ! 220: HOST_LDFLAGS=$(LDFLAGS) ! 221: HOST_CPPFLAGS=$(ALL_CPPFLAGS) ! 222: HOST_ALLOCA=$(ALLOCA) ! 223: HOST_MALLOC=$(MALLOC) ! 224: HOST_OBSTACK=$(OBSTACK) ! 225: ! 226: # Choose the real default target. ! 227: ALL=all.internal ! 228: ! 229: # Choose the real install target. ! 230: INSTALL_TARGET=install-native ! 231: ! 232: # End of variables for you to override. ! 233: ! 234: # Definition of `all' is here so that new rules inserted by sed ! 235: # do not specify the default target. ! 236: # The real definition is under `all.internal' (for native compilers) ! 237: # or `all.cross' (for cross compilers). ! 238: all: $(ALL) ! 239: ! 240: # sed inserts variable overrides after the following line. ! 241: #### ! 242: ! 243: # Now figure out from those variables how to compile and link. ! 244: ! 245: INTERNAL_CFLAGS = $(CROSS) ! 246: ! 247: # This is the variable actually used when we compile. ! 248: ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) ! 249: ! 250: # Likewise. ! 251: ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) ! 252: ! 253: # Even if ALLOCA is set, don't use it if compiling with GCC. ! 254: USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi` ! 255: USE_HOST_ALLOCA= `if [ x"${HOST_CC}" = x"${OLDCC}" -a x"${HOST_ALLOCA}" != x ] ; then echo ${HOST_PREFIX}${HOST_ALLOCA}; else true; fi` ! 256: USE_HOST_MALLOC= `if [ x"${HOST_MALLOC}" != x ] ; then echo ${HOST_PREFIX}${HOST_MALLOC}; else true; fi` ! 257: USE_HOST_OBSTACK= `if [ x"${HOST_OBSTACK}" != x ] ; then echo ${HOST_PREFIX}${HOST_OBSTACK}; else true; fi` ! 258: ! 259: # Dependency on obstack, alloca, malloc or whatever library facilities ! 260: # are not installed in the system libraries. ! 261: # We don't use USE_ALLOCA because backquote expansion doesn't work in deps. ! 262: LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) ! 263: ! 264: # Likewise, for use in the tools that must run on this machine ! 265: # even if we are cross-building GCC. ! 266: # We don't use USE_ALLOCA because backquote expansion doesn't work in deps. ! 267: HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) ! 268: ! 269: # How to link with both our special library facilities ! 270: # and the system's installed libraries. ! 271: LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB) ! 272: ! 273: # Likewise, for use in the tools that must run on this machine ! 274: # even if we are cross-building GCC. ! 275: HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \ ! 276: $(HOST_CLIB) ! 277: ! 278: HOST_RTL = $(HOST_PREFIX)rtl.o ! 279: HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o ! 280: ! 281: # Specify the directories to be searched for header files. ! 282: # Both . and srcdir are used, in that order, ! 283: # so that tm.h and config.h will be found in the compilation ! 284: # subdirectory rather than in the source directory. ! 285: INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config ! 286: SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config ! 287: ! 288: # Always use -I$(srcdir)/config when compiling. ! 289: .c.o: ! 290: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< ! 291: ! 292: # This tells GNU make version 3 not to export all the variables ! 293: # defined in this file into the environment. ! 294: .NOEXPORT: ! 295: ! 296: # Lists of files for various purposes. ! 297: ! 298: # A list of all the language-specific executables. ! 299: COMPILERS = cc1 cc1plus cc1obj ! 300: ! 301: # Language-specific object files for C. ! 302: C_OBJS = c-parse.o c-lang.o \ ! 303: c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o ! 304: ! 305: # Language-specific object files for Objectionable C. ! 306: OBJC_OBJS = objc-parse.o objc-actions.o \ ! 307: c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o ! 308: ! 309: # Language-specific object files for C++. ! 310: CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \ ! 311: cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \ ! 312: cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \ ! 313: cp-class.o cp-init.o cp-method.o cp-except.o \ ! 314: cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \ ! 315: $(CPLUS_INPUT) cp-spew.o c-common.o ! 316: ! 317: # Language-independent object files. ! 318: OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ ! 319: function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \ ! 320: rtl.o print-rtl.o rtlanal.o dbxout.o sdbout.o dwarfout.o emit-rtl.o \ ! 321: integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \ ! 322: regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \ ! 323: insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ ! 324: insn-recog.o insn-extract.o insn-output.o insn-emit.o \ ! 325: insn-attrtab.o aux-output.o $(EXTRA_OBJS) ! 326: ! 327: # GEN files are listed separately, so they can be built before doing parallel ! 328: # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load ! 329: # them before rtl.o is compiled. ! 330: GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep ! 331: ! 332: # Files to be copied away after each stage in building. ! 333: STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \ ! 334: insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ ! 335: insn-attr.h insn-attrtab.c \ ! 336: stamp-flags stamp-config stamp-codes \ ! 337: stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \ ! 338: stamp-attr stamp-attrtab \ ! 339: genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \ ! 340: genattrtab genattr \ ! 341: $(GCC_PASSES) $(EXTRA_PARTS) gcc-cross cccp cc1plus cc1obj enquire \ ! 342: protoize unprotoize specs collect2 ! 343: ! 344: # Members of libgcc1.a. ! 345: LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ ! 346: _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \ ! 347: _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ ! 348: _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ ! 349: _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \ ! 350: _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ ! 351: _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 ! 352: ! 353: # Library members defined in libgcc2.c. ! 354: LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ ! 355: _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 \ ! 356: _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ ! 357: _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ ! 358: _varargs _eprintf _builtin_new _builtin_New _builtin_del \ ! 359: _bb _shtab _clear_cache _trampoline __main _exit ! 360: ! 361: # Header files that are made available under the same name ! 362: # to programs compiled with gcc. ! 363: USER_H = assert.h va-hp800.h va-i860.h va-mips.h va-pyr.h va-sparc.h \ ! 364: va-spur.h va-m88k.h proto.h ! 365: ! 366: # All the header files that are installed for users from GCC itself. ! 367: INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h ! 368: ! 369: # The files that "belong" in CONFIG_H are deliberately omitted ! 370: # because having them there would not be useful in actual practice. ! 371: # All they would do is cause complete recompilation every time ! 372: # one of the machine description files is edited. ! 373: # That may or may not be what one wants to do. ! 374: # If it is, rm *.o is an easy way to do it. ! 375: # CONFIG_H = config.h tm.h ! 376: CONFIG_H = ! 377: RTL_H = rtl.h rtl.def machmode.h machmode.def ! 378: TREE_H = tree.h real.h tree.def machmode.h machmode.def ! 379: CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def ! 380: ! 381: # Avoid a lot of time thinking about remaking Makefile.in and *.def. ! 382: .SUFFIXES: .in .def ! 383: ! 384: Makefile: $(srcdir)/Makefile.in $(srcdir)/configure \ ! 385: $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) ! 386: sh config.status ! 387: ! 388: all.internal: start.encap rest.encap ! 389: # This is what to compile if making a cross-compiler. ! 390: all.cross: native gcc-cross ! 391: # This is what must be made before installing GCC and converting libraries. ! 392: start.encap: native gcc $(LIBGCC1_TARGET) ! 393: # Use this to make a GCC that will be used only to recompile GCC. ! 394: for-bootstrap: start.encap libgcc.a ! 395: # These can't be made, with COFF encapsulation, until after GCC can run. ! 396: rest.encap: libgcc.a float.h ! 397: # This is what is made with the host's compiler ! 398: # whether making a cross compiler or not. ! 399: native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PARTS) ! 400: ! 401: # Define the names for selecting languages in LANGUAGES. ! 402: C c: cc1 ! 403: C++ c++: cc1plus ! 404: OBJC objc: cc1obj ! 405: OBJECTIVE-C objective-c: cc1obj ! 406: PROTO: proto ! 407: ! 408: config.status: ! 409: @echo You must configure gcc. Look at the INSTALL file for details. ! 410: @false ! 411: ! 412: compilations: ${OBJS} ! 413: ! 414: gcc: gcc.o version.o $(LIBDEPS) ! 415: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS) ! 416: # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'. ! 417: mv -f gccnew gcc ! 418: # Dump a specs file to make -B./ read these specs over installed ones ! 419: ./gcc -dumpspecs > specs ! 420: ! 421: # We do want to create an executable named `gcc', so we can use it to ! 422: # compile libgcc2.a. ! 423: # Also create gcc-cross, so that install-common will install properly. ! 424: gcc-cross: gcc ! 425: cp gcc gcc-cross ! 426: ! 427: cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS) ! 428: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS) ! 429: ! 430: cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) ! 431: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS) ! 432: ! 433: cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS) ! 434: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS) ! 435: ! 436: float.h: enquire ! 437: -./enquire -f > tmp-float.h ! 438: mv tmp-float.h float.h ! 439: ! 440: # Used to compile enquire with standard cc, but have forgotten why. ! 441: # Let's try with GCC. ! 442: enquire: enquire.o $(GCC_PARTS) ! 443: $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@ ! 444: enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) ! 445: -cp $(srcdir)/enquire.c . > /dev/null 2>&1 ! 446: # Breaking this line caused a problem with one version of GNU make. ! 447: $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c enquire.c ! 448: ! 449: # Build libgcc.a. ! 450: # This is done in two parts because some functions, in libgcc1.c, ! 451: # must be compiled with something other than gcc, ! 452: # while the rest, in libgcc2.c, must be compiled with gcc. ! 453: # That means we can't do libgcc2.c until after gcc, cc1, etc. ! 454: ! 455: # Use this as value of LIBGCC1 to cause conversion to GNU library format. ! 456: # LIBCONVERT should put its output in libgcc1.conv. ! 457: libgcc1.conv: libgcc1.a ! 458: $(LIBCONVERT) libgcc1.a libgcc1.conv ! 459: ! 460: # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely. ! 461: # Make an empty file instead. ! 462: libgcc1.null: $(CROSS_TOOLS) $(GCC_PASSES) ! 463: echo "__foo () {}" > dummy.c ! 464: $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c ! 465: $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o ! 466: rm -f dummy.o dummy.c ! 467: ! 468: # Compile the library of arithmetic subroutines with the native compiler. ! 469: # Don't compile it with gcc! ! 470: # (That would cause most arithmetic functions to call themselves.) ! 471: libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status ! 472: -rm -f tmplibgcc1.a ! 473: # Actually build it in tmplibgcc1.a, then rename at end, ! 474: # so that libgcc1.a itself remains nonexistent if compilation is aborted. ! 475: # -e causes any failing command to make this rule fail. ! 476: # -e doesn't work in certain shells, so we test $$? as well. ! 477: set -e; \ ! 478: for name in $(LIB1FUNCS); \ ! 479: do \ ! 480: echo $${name}; \ ! 481: rm -f $${name}.o; \ ! 482: $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \ ! 483: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 484: mv libgcc1.o $${name}.o; \ ! 485: $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \ ! 486: rm -f $${name}.o; \ ! 487: done ! 488: # Some shells crash when a loop has no items. ! 489: # So make sure there is always at least one--`..'. ! 490: # Then ignore it. ! 491: # We don't use -e here because there are if statements ! 492: # that should not make the command give up when the if condition is false. ! 493: # Instead, we test for failure after each command where it matters. ! 494: for file in .. $(LIB1FUNCS_EXTRA); \ ! 495: do \ ! 496: if [ x$${file} != x.. ]; then \ ! 497: name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \ ! 498: echo $${name}; \ ! 499: if [ $${name}.asm = $${file} ]; then \ ! 500: cp $${file} $${name}.s; file=$${name}.s; \ ! 501: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 502: else true; fi; \ ! 503: $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \ ! 504: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 505: $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \ ! 506: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 507: rm -f $${name}.[so]; \ ! 508: else true; \ ! 509: fi; \ ! 510: done ! 511: mv tmplibgcc1.a libgcc1.a ! 512: ! 513: # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled. ! 514: # But recompiling cc1 should not force recompilation of libgcc2.a. ! 515: # If you want to force recompilation, delete libgcc2.a. ! 516: # Depend on install-cross-tools to make sure we set up properly ! 517: # to run the assembler before we try compiling anything. ! 518: # install-cross-tools does nothing if not cross compiling. ! 519: libgcc2.ready: $(GCC_PASSES) $(CROSS_TOOLS) ! 520: -if [ -f libgcc2.ready ] ; then \ ! 521: true; \ ! 522: else \ ! 523: touch libgcc2.ready; \ ! 524: fi ! 525: ! 526: libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \ ! 527: longlong.h gbl-ctors.h config.status ! 528: # Actually build it in tmplibgcc2.a, then rename at end, ! 529: # so that libgcc2.a itself remains nonexistent if compilation is aborted. ! 530: -rm -f tmplibgcc2.a ! 531: # -e causes any failing command to make this rule fail. ! 532: # -e doesn't work in certain shells, so we test $$? as well. ! 533: set -e; \ ! 534: for name in $(LIB2FUNCS); \ ! 535: do \ ! 536: echo $${name}; \ ! 537: $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \ ! 538: $(LIBGCC2_CFLAGS) -c -DL$${name} \ ! 539: $(srcdir)/libgcc2.c -o $${name}.o; \ ! 540: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 541: $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ ! 542: rm -f $${name}.o; \ ! 543: done ! 544: # Some shells crash when a loop has no items. ! 545: # So make sure there is always at least one--`..'. ! 546: # Then ignore it. ! 547: # We don't use -e here because there are if statements ! 548: # that should not make the command give up when the if condition is false. ! 549: # Instead, we test for failure after each command where it matters. ! 550: for file in .. $(LIB2FUNCS_EXTRA); \ ! 551: do \ ! 552: if [ x$${file} != x.. ]; then \ ! 553: name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \ ! 554: echo $${name}; \ ! 555: if [ $${name}.asm = $${file} ]; then \ ! 556: cp $${file} $${name}.s; file=$${name}.s; \ ! 557: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 558: else true; fi; \ ! 559: $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \ ! 560: $(LIBGCC2_CFLAGS) -c $${file}; \ ! 561: if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ! 562: $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ ! 563: rm -f $${name}.[so]; \ ! 564: else true; \ ! 565: fi; \ ! 566: done ! 567: mv tmplibgcc2.a libgcc2.a ! 568: # These lines were deleted from above the mv command ! 569: # because ranlibing libgcc.a itself should suffice. ! 570: # -if [ x${HPUX_GAS} = x ] ; then \ ! 571: # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \ ! 572: # else true; fi ! 573: ! 574: # Combine the various libraries into a single library, libgcc.a. ! 575: libgcc.a: $(LIBGCC1) $(LIBGCC2) ! 576: -rm -rf tmplibgcc.a libgcc.a tmpcopy ! 577: mkdir tmpcopy ! 578: (cd tmpcopy; $(AR) x ../$(LIBGCC1)) ! 579: (cd tmpcopy; $(AR) x ../$(LIBGCC2)) ! 580: (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o) ! 581: rm -rf tmpcopy ! 582: -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi ! 583: # Actually build it in tmplibgcc.a, then rename at end, ! 584: # so that libgcc.a itself remains nonexistent if compilation is aborted. ! 585: mv tmplibgcc.a libgcc.a ! 586: ! 587: ! 588: # Compile two additional files that are linked with every program ! 589: # linked using GCC on system V, for the sake of C++ constructors. ! 590: crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! 591: $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \ ! 592: -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c ! 593: mv crtstuff.o crtbegin.o ! 594: ! 595: crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h ! 596: $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \ ! 597: -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c ! 598: mv crtstuff.o crtend.o ! 599: ! 600: # Compiling object files from source files. ! 601: ! 602: # Note that dependencies on obstack.h are not written ! 603: # because that file is not part of GCC. ! 604: # Dependencies on gvarargs.h are not written ! 605: # because all that file does, when not compiling with GCC, ! 606: # is include the system varargs.h. ! 607: ! 608: # C language specific files. ! 609: ! 610: c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h ! 611: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c ! 612: $(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y ! 613: cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c ! 614: ! 615: c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h ! 616: c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h ! 617: c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H) ! 618: c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \ ! 619: input.h flags.h ! 620: c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h ! 621: c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h ! 622: ! 623: # C++ language specific files. ! 624: ! 625: cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 626: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 627: `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'` ! 628: ! 629: $(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y ! 630: @echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts ! 631: cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y ! 632: ! 633: cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \ ! 634: $(srcdir)/cp-parse.h flags.h ! 635: cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \ ! 636: $(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h ! 637: cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \ ! 638: cp-lex.h cp-decl.h stack.h ! 639: cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \ ! 640: cp-lex.h cp-decl.h ! 641: cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 642: cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 643: cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \ ! 644: cp-class.h flags.h ! 645: cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \ ! 646: flags.h ! 647: cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 648: cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H) ! 649: cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H) ! 650: cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h ! 651: cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 652: cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H) ! 653: cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 654: cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! 655: cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \ ! 656: expr.h insn-codes.h ! 657: cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h ! 658: cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H) ! 659: cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h ! 660: ! 661: collect2 : collect2.o version.o $(LIBDEPS) ! 662: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS) ! 663: ! 664: collect2.o : collect2.c $(CONFIG_H) gstab.h ! 665: ! 666: # Objectionable C language specific files. ! 667: ! 668: objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \ ! 669: c-tree.h input.h flags.h objc-actions.h ! 670: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c ! 671: $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y ! 672: cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c ! 673: ! 674: objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \ ! 675: flags.h objc-actions.h ! 676: ! 677: # A file used by all variants of C. ! 678: ! 679: c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h ! 680: ! 681: # Language-independent files. ! 682: ! 683: gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h ! 684: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 685: -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ ! 686: -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ ! 687: -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ ! 688: -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` ! 689: ! 690: dumpvers: dumpvers.c ! 691: ! 692: version.o: version.c ! 693: obstack.o: obstack.c ! 694: ! 695: tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h ! 696: print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) ! 697: stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h ! 698: fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h ! 699: toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h insn-attr.h ! 700: ! 701: rtl.o : rtl.c $(CONFIG_H) $(RTL_H) ! 702: ! 703: print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H) ! 704: rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H) ! 705: ! 706: varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \ ! 707: insn-codes.h expr.h hard-reg-set.h regs.h ! 708: function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ ! 709: insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ ! 710: recog.h output.h ! 711: stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ ! 712: insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h ! 713: expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h \ ! 714: insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h ! 715: calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \ ! 716: insn-flags.h ! 717: expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ ! 718: insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h ! 719: explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \ ! 720: insn-config.h expr.h recog.h insn-flags.h insn-codes.h ! 721: optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ ! 722: insn-flags.h insn-config.h insn-codes.h expr.h recog.h ! 723: dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \ ! 724: insn-config.h reload.h gstab.h ! 725: sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \ ! 726: insn-config.h reload.h ! 727: dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \ ! 728: insn-config.h reload.h output.h ! 729: emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h \ ! 730: regs.h insn-config.h insn-codes.h real.h expr.h ! 731: ! 732: integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \ ! 733: insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h ! 734: ! 735: jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \ ! 736: insn-config.h insn-flags.h insn-codes.h expr.h real.h ! 737: stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h ! 738: ! 739: cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \ ! 740: insn-config.h recog.h ! 741: loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \ ! 742: insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h ! 743: unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \ ! 744: integrate.h regs.h flags.h expr.h loop.h ! 745: flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \ ! 746: basic-block.h regs.h hard-reg-set.h output.h ! 747: combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h \ ! 748: insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \ ! 749: basic-block.h recog.h real.h ! 750: regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \ ! 751: basic-block.h regs.h insn-config.h recog.h ! 752: local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \ ! 753: regs.h hard-reg-set.h insn-config.h recog.h output.h ! 754: global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \ ! 755: basic-block.h regs.h hard-reg-set.h insn-config.h output.h ! 756: ! 757: reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \ ! 758: reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h ! 759: reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \ ! 760: reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \ ! 761: basic-block.h recog.h output.h ! 762: caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \ ! 763: regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h ! 764: reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \ ! 765: basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \ ! 766: flags.h output.h ! 767: sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \ ! 768: flags.h insn-config.h insn-attr.h ! 769: final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \ ! 770: recog.h conditions.h insn-config.h insn-attr.h real.h output.h \ ! 771: hard-reg-set.h insn-codes.h gstab.h ! 772: recog.o : recog.c $(CONFIG_H) $(RTL_H) \ ! 773: regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \ ! 774: insn-flags.h insn-codes.h real.h ! 775: reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \ ! 776: regs.h hard-reg-set.h flags.h insn-config.h ! 777: ! 778: aux-output.o : aux-output.c $(CONFIG_H) \ ! 779: $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \ ! 780: insn-flags.h output.h insn-attr.h insn-codes.h ! 781: ! 782: # Normally this target is not used; but it is used if you ! 783: # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c ! 784: # from the GNU Emacs distribution. ! 785: # Note some machines won't allow $(CC) without -S on this source file. ! 786: alloca.o: alloca.c ! 787: # sed is used to strip the comments from the assembler output. ! 788: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \ ! 789: `echo $(srcdir)/alloca.c | sed 's,^\./,,'` ! 790: $(ALLOCA_FINISH) ! 791: ! 792: # Generate header and source files from the machine description, ! 793: # and compile them. ! 794: ! 795: .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \ ! 796: insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ ! 797: insn-attr.h insn-attrtab.c ! 798: ! 799: # The following pair of rules has this effect: ! 800: # genconfig is run only if the md has changed since genconfig was last run; ! 801: # but the file insn-config.h is touched only when its contents actually change. ! 802: ! 803: # Each of the other insn-* files is handled by a similar pair of rules. ! 804: ! 805: # Each of the insn-*.[ch] rules has a semicolon at the end, ! 806: # for otherwise the system Make on SunOS 4.1 never tries ! 807: # to recompile insn-*.o. ! 808: ! 809: insn-config.h: stamp-config ; ! 810: stamp-config : md genconfig $(srcdir)/move-if-change ! 811: ./genconfig md > tmp-config.h ! 812: $(srcdir)/move-if-change tmp-config.h insn-config.h ! 813: touch stamp-config ! 814: ! 815: insn-flags.h: stamp-flags ; ! 816: stamp-flags : md genflags $(srcdir)/move-if-change ! 817: ./genflags md > tmp-flags.h ! 818: $(srcdir)/move-if-change tmp-flags.h insn-flags.h ! 819: touch stamp-flags ! 820: ! 821: insn-codes.h: stamp-codes ; ! 822: stamp-codes : md gencodes $(srcdir)/move-if-change ! 823: ./gencodes md > tmp-codes.h ! 824: $(srcdir)/move-if-change tmp-codes.h insn-codes.h ! 825: touch stamp-codes ! 826: ! 827: insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \ ! 828: insn-config.h insn-flags.h insn-codes.h ! 829: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c ! 830: ! 831: insn-emit.c: stamp-emit ; ! 832: stamp-emit : md genemit $(srcdir)/move-if-change ! 833: ./genemit md > tmp-emit.c ! 834: $(srcdir)/move-if-change tmp-emit.c insn-emit.c ! 835: touch stamp-emit ! 836: ! 837: insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \ ! 838: real.h output.h flags.h ! 839: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c ! 840: ! 841: insn-recog.c: stamp-recog ; ! 842: stamp-recog : md genrecog $(srcdir)/move-if-change ! 843: ./genrecog md > tmp-recog.c ! 844: $(srcdir)/move-if-change tmp-recog.c insn-recog.c ! 845: touch stamp-recog ! 846: ! 847: insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) ! 848: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c ! 849: ! 850: insn-extract.c: stamp-extract ; ! 851: stamp-extract : md genextract $(srcdir)/move-if-change ! 852: ./genextract md > tmp-extract.c ! 853: $(srcdir)/move-if-change tmp-extract.c insn-extract.c ! 854: touch stamp-extract ! 855: ! 856: insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h ! 857: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c ! 858: ! 859: insn-peep.c: stamp-peep ; ! 860: stamp-peep : md genpeep $(srcdir)/move-if-change ! 861: ./genpeep md > tmp-peep.c ! 862: $(srcdir)/move-if-change tmp-peep.c insn-peep.c ! 863: touch stamp-peep ! 864: ! 865: insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \ ! 866: insn-attr.h insn-config.h ! 867: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c ! 868: ! 869: insn-attr.h: stamp-attr ; ! 870: stamp-attr : md genattr $(srcdir)/move-if-change ! 871: ./genattr md > tmp-attr.h ! 872: $(srcdir)/move-if-change tmp-attr.h insn-attr.h ! 873: touch stamp-attr ! 874: ! 875: insn-attrtab.c: stamp-attrtab ; ! 876: stamp-attrtab : md genattrtab $(srcdir)/move-if-change ! 877: ./genattrtab md > tmp-attrtab.c ! 878: $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c ! 879: touch stamp-attrtab ! 880: ! 881: insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \ ! 882: hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \ ! 883: insn-codes.h ! 884: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c ! 885: ! 886: insn-output.c: stamp-output ; ! 887: stamp-output : md genoutput $(srcdir)/move-if-change ! 888: ./genoutput md > tmp-output.c ! 889: $(srcdir)/move-if-change tmp-output.c insn-output.c ! 890: touch stamp-output ! 891: ! 892: # Compile the programs that generate insn-* from the machine description. ! 893: # They are compiled with $(HOST_CC), and associated libraries, ! 894: # since they need to run on this machine ! 895: # even if GCC is being compiled to run on some other machine. ! 896: ! 897: # $(CONFIG_H) is omitted from the deps of the gen*.o ! 898: # because these programs don't really depend on anything ! 899: # about the target machine. They do depend on config.h itself, ! 900: # since that describes the host machine. ! 901: ! 902: genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS) ! 903: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \ ! 904: genconfig.o $(HOST_RTL) $(HOST_LIBS) ! 905: ! 906: genconfig.o : genconfig.c $(RTL_H) config.h ! 907: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c ! 908: ! 909: genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS) ! 910: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \ ! 911: genflags.o $(HOST_RTL) $(HOST_LIBS) ! 912: ! 913: genflags.o : genflags.c $(RTL_H) config.h ! 914: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c ! 915: ! 916: gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS) ! 917: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \ ! 918: gencodes.o $(HOST_RTL) $(HOST_LIBS) ! 919: ! 920: gencodes.o : gencodes.c $(RTL_H) config.h ! 921: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c ! 922: ! 923: genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS) ! 924: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \ ! 925: genemit.o $(HOST_RTL) $(HOST_LIBS) ! 926: ! 927: genemit.o : genemit.c $(RTL_H) config.h ! 928: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c ! 929: ! 930: genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS) ! 931: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \ ! 932: genrecog.o $(HOST_RTL) $(HOST_LIBS) ! 933: ! 934: genrecog.o : genrecog.c $(RTL_H) config.h ! 935: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c ! 936: ! 937: genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS) ! 938: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \ ! 939: genextract.o $(HOST_RTL) $(HOST_LIBS) ! 940: ! 941: genextract.o : genextract.c $(RTL_H) config.h ! 942: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c ! 943: ! 944: genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS) ! 945: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \ ! 946: genpeep.o $(HOST_RTL) $(HOST_LIBS) ! 947: ! 948: genpeep.o : genpeep.c $(RTL_H) config.h ! 949: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c ! 950: ! 951: genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS) ! 952: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \ ! 953: genattr.o $(HOST_RTL) $(HOST_LIBS) ! 954: ! 955: genattr.o : genattr.c $(RTL_H) config.h ! 956: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c ! 957: ! 958: genattrtab : genattrtab.o $(HOST_RTL) $(HOST_RTLANAL) $(HOST_LIBDEPS) ! 959: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \ ! 960: genattrtab.o $(HOST_RTL) $(HOST_RTLANAL) $(HOST_LIBS) ! 961: ! 962: genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h ! 963: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c ! 964: ! 965: genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS) ! 966: $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \ ! 967: genoutput.o $(HOST_RTL) $(HOST_LIBS) ! 968: ! 969: genoutput.o : genoutput.c $(RTL_H) config.h ! 970: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c ! 971: ! 972: # Compile the libraries to be used by gen*. ! 973: # If we are not cross-building, gen* use the same .o's that cc1 will use, ! 974: # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict ! 975: # with the rules for rtl.o, alloca.o, etc. ! 976: $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H) ! 977: rm -f $(HOST_PREFIX)rtl.c ! 978: cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c ! 979: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c ! 980: ! 981: $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H) ! 982: rm -f $(HOST_PREFIX)rtlanal.c ! 983: cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c ! 984: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c ! 985: ! 986: $(HOST_PREFIX_1)alloca.o: alloca.c ! 987: rm -f $(HOST_PREFIX)alloca.c ! 988: cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c ! 989: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c ! 990: ! 991: $(HOST_PREFIX_1)obstack.o: obstack.c ! 992: rm -f $(HOST_PREFIX)obstack.c ! 993: cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c ! 994: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c ! 995: ! 996: $(HOST_PREFIX_1)malloc.o: malloc.c ! 997: rm -f $(HOST_PREFIX)malloc.c ! 998: cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c ! 999: $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c ! 1000: ! 1001: # This satisfies the dependency that we get if you cross-compile a compiler ! 1002: # that does not need to compile alloca, malloc or whatever. ! 1003: $(HOST_PREFIX_1): ! 1004: touch $(HOST_PREFIX_1) ! 1005: ! 1006: # Remake cpp and protoize. ! 1007: ! 1008: # Making the preprocessor ! 1009: cpp: cccp ! 1010: -rm -f cpp ! 1011: ln cccp cpp ! 1012: cccp: cccp.o cexp.o version.o $(LIBDEPS) ! 1013: $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS) ! 1014: cexp.o: $(srcdir)/cexp.c $(CONFIG_H) ! 1015: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c ! 1016: $(srcdir)/cexp.c: $(srcdir)/cexp.y ! 1017: cd $(srcdir); $(BISON) -o cexp.c cexp.y ! 1018: cccp.o: cccp.c $(CONFIG_H) pcp.h version.c ! 1019: # The reason we use $(libdir)/g++-include rather than using libsubdir ! 1020: # is for compatibility with the current version of libg++. ! 1021: $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 1022: -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ! 1023: -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \ ! 1024: -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ ! 1025: -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ ! 1026: -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` ! 1027: ! 1028: proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1 ! 1029: ! 1030: protoize: protoize.o getopt.o getopt1.o version.o $(LIBDEPS) ! 1031: $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! 1032: protoize.o getopt.o getopt1.o version.o $(LIBS) -o $@ ! 1033: protoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) ! 1034: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 1035: -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ! 1036: -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \ ! 1037: -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ ! 1038: -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ ! 1039: -DSTD_PROTO_DIR=\"$(libsubdir)\" \ ! 1040: $(srcdir)/protoize.c ! 1041: ! 1042: unprotoize: unprotoize.o getopt.o getopt1.o version.o $(LIBDEPS) ! 1043: $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! 1044: unprotoize.o getopt.o getopt1.o version.o $(LIBS) -o $@ ! 1045: unprotoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) ! 1046: cp $(srcdir)/protoize.c unprotoize.c ! 1047: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 1048: -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ! 1049: -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \ ! 1050: -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ ! 1051: -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ ! 1052: -DSTD_PROTO_DIR=\"$(libsubdir)\" \ ! 1053: -DUNPROTOIZE unprotoize.c ! 1054: rm -f unprotoize.c ! 1055: ! 1056: getopt.o: $(srcdir)/getopt.c getopt.h ! 1057: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c ! 1058: getopt1.o: $(srcdir)/getopt1.c getopt.h ! 1059: $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c ! 1060: ! 1061: protoize.1: $(srcdir)/proto-man ./cpp ! 1062: ./cpp -traditional $(srcdir)/proto-man \ ! 1063: | grep -v '^#' \ ! 1064: | awk 'NF > 0 {print}' > tmp-proto.1 ! 1065: mv tmp-proto.1 protoize.1 ! 1066: ! 1067: unprotoize.1: $(srcdir)/proto-man ./cpp ! 1068: ./cpp -traditional -DUNPRO $(srcdir)/proto-man \ ! 1069: | grep -v '^#' \ ! 1070: | awk 'NF > 0 {print}' > tmp-unproto.1 ! 1071: mv tmp-unproto.1 unprotoize.1 ! 1072: ! 1073: # This info describes the target machine, so compile with GCC just built. ! 1074: SYSCALLS.c.X: SYSCALLS.c $(GCC_PASSES) ! 1075: $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! 1076: -fgen-aux-info -S -o /dev/null $(srcdir)/SYSCALLS.c ! 1077: ! 1078: # Remake the info files. ! 1079: ! 1080: doc: $(srcdir)/cpp.info $(srcdir)/gplus.info $(srcdir)/gcc.info ! 1081: ! 1082: $(srcdir)/cpp.info: $(srcdir)/cpp.texi ! 1083: makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'` ! 1084: ! 1085: $(srcdir)/gplus.info: $(srcdir)/gplus.texi ! 1086: makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'` ! 1087: ! 1088: $(srcdir)/gcc.info: $(srcdir)/gcc.texi ! 1089: makeinfo `echo $(srcdir)/gcc.texi | sed 's,^\./,,'` ! 1090: ! 1091: # Deletion of files made during compilation. ! 1092: # There are four levels of this: ! 1093: # `mostlyclean', `clean', `cleanconfig' and `realclean'. ! 1094: # `mostlyclean' is useful while working on a particular type of machine. ! 1095: # It does not delete libgcc.a or its parts, so it won't have to be recompiled. ! 1096: # `clean' deletes what you want to delete ordinarily to save space. ! 1097: # This is most, but not all, of the files made by compilation. ! 1098: # `cleanconfig' also deletes the files made by config. ! 1099: # `realclean' also deletes everything that could be regenerated automatically. ! 1100: ! 1101: mostlyclean: ! 1102: -rm -f $(STAGESTUFF) ! 1103: # Delete the temporary source copies for cross compilation. ! 1104: -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c ! 1105: -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c ! 1106: -rm -f $(HOST_PREFIX_1)obstack.c ! 1107: # Delete the temp files made in the course of building libgcc.a. ! 1108: -rm -f tmplibgcc.a* tmpcopy ! 1109: for name in $(LIB1FUNCS); do rm -f $${name}.c; done ! 1110: # Delete other temporary files. ! 1111: -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h ! 1112: # Delete the stamp files. ! 1113: -rm -f stamp-* tmp-* ! 1114: -rm -f *.s *.s[0-9] *.co ! 1115: -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop ! 1116: -rm -f *.dbr *.jump2 *.sched *.cse2 *.cpp *.sched2 *.stack ! 1117: -rm -f gccnew specs core float.h enquire SYSCALLS.c.X ! 1118: -rm -f collect collect2 ld mips-tfile mips-tdump ! 1119: -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg ! 1120: ! 1121: # delete all files made by compilation. ! 1122: clean: mostlyclean ! 1123: -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready ! 1124: -rm -fr stage1 stage2 stage3 stage4 ! 1125: ! 1126: # Like clean but also delete the links and files made to configure gcc. ! 1127: cleanconfig: clean ! 1128: -rm -f tm.h aux-output.c config.h md config.status tconfig.h ! 1129: -rm -f Makefile aux-output2.c ! 1130: ! 1131: # This is used to get rid of everything found in the source dir ! 1132: # that shouldn't be in the distribution. ! 1133: distclean: cleanconfig ! 1134: -rm -rf =* #* *~ config/#* config/*~ ! 1135: -rm -f *.dvi *.oaux patch* ! 1136: ! 1137: # Get rid of every file that's generated from some other file. ! 1138: # Most of these files ARE PRESENT in the GCC distribution. ! 1139: realclean: cleanconfig ! 1140: -rm -f cp-parse.c cp-parse.h cp-parse.output ! 1141: -rm -f objc-parse.c objc-parse.output ! 1142: -rm -f protoize.1 unprotoize.1 ! 1143: -rm -f c-parse.c c-parse.h c-parse.output ! 1144: -rm -f cexp.c cexp.output TAGS ! 1145: -rm -f cpp.info* cpp.??s cpp.*aux ! 1146: -rm -f gcc.info* gcc.??s gcc.*aux ! 1147: -rm -f gplus.info* gplus.??s gplus.*aux ! 1148: ! 1149: # Entry points `install' and `uninstall'. ! 1150: # Also temporarily `install-fixincludes' could replace `install-headers'. ! 1151: # Also use `install-collect2' to install collect2 when the config files don't. ! 1152: ! 1153: install: $(INSTALL_TARGET) ! 1154: ! 1155: # Copy the files of native compiler into directories where they will be run. ! 1156: install-native: install-common install-libgcc $(INSTALL_HEADERS) \ ! 1157: install-man install-proto ! 1158: ! 1159: # Copy the files of cross compiler into directories where they will be run. ! 1160: install-cross: install-common install-common-headers \ ! 1161: install-man install-cross-tools install-libgcc ! 1162: ! 1163: # Install the tools, libraries and header files for the target machine ! 1164: # where cross-compilation will look for them. ! 1165: # Use tooldir to find them. ! 1166: install-cross-tools: install-dir ! 1167: # The first if makes this a no-op except for a cross compiler. ! 1168: # The /. after the dirname causes test to follow symlinks. ! 1169: # Before making a link or an indirection script, ! 1170: # we verify the desired file does not already exist. ! 1171: # If a symlink does exist, then making a symlink would certainly fail, ! 1172: # leading us to overwrite the real file through the symlink. ! 1173: -if [ -f gcc-cross ] ; \ ! 1174: then \ ! 1175: if [ -d $(tooldir)/. ] ; \ ! 1176: then \ ! 1177: for file in as ld ar ranlib; do \ ! 1178: if [ -f $(libsubdir)/$$file ] ; \ ! 1179: then true; \ ! 1180: else \ ! 1181: $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \ ! 1182: || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \ ! 1183: fi; \ ! 1184: done; \ ! 1185: for file in $(tooldir)/lib/*; do \ ! 1186: if [ -f $$file ] ; \ ! 1187: then \ ! 1188: if [ -f $(libsubdir)/`basename $$file` ] ; \ ! 1189: then true; \ ! 1190: else \ ! 1191: $(SYMLINK) $$file $(libsubdir)/`basename $$file` \ ! 1192: || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \ ! 1193: fi; \ ! 1194: else true; \ ! 1195: fi; \ ! 1196: done; \ ! 1197: if [ -d $(tooldir)/include/. ] ; then \ ! 1198: $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \ ! 1199: || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \ ! 1200: cd $(tooldir)/include; tar cf - . | (cd $(libsubdir)/sys-include; tar xpf -)); \ ! 1201: else true; fi; \ ! 1202: else true; \ ! 1203: fi; \ ! 1204: else true; \ ! 1205: fi; ! 1206: ! 1207: # Run this on the target machine ! 1208: # to finish installation of cross compiler. ! 1209: install-cross-rest: install-float-h-cross ! 1210: ! 1211: # Install float.h for cross compiler. ! 1212: # Run this on the target machine! ! 1213: install-float-h-cross: ! 1214: if [ -f enquire ] ; then true; else false; done ! 1215: -./enquire -f > float.h ! 1216: -rm -f $(libsubdir)/include/float.h ! 1217: $(INSTALL_DATA) float.h $(libsubdir)/include/float.h ! 1218: chmod a-x $(libsubdir)/include/float.h ! 1219: ! 1220: # Create the installation directory. ! 1221: install-dir: ! 1222: if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi ! 1223: if [ -d $(libdir)/gcc ] ; then true ; else mkdir $(libdir)/gcc ; fi ! 1224: if [ -d $(libdir)/gcc/$(target) ] ; then true ; else mkdir $(libdir)/gcc/$(target) ; fi ! 1225: if [ -d $(libdir)/gcc/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc/$(target)/$(version) ; fi ! 1226: if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi ! 1227: # We don't use mkdir -p to create the parents of mandir, ! 1228: # because some systems don't support it. ! 1229: # Instead, we use this technique to create the immediate parent of mandir. ! 1230: parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \ ! 1231: if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ! 1232: -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi ! 1233: ! 1234: # Install the compiler executables built during cross compilation. ! 1235: install-common: native install-dir ! 1236: for file in $(COMPILERS); do \ ! 1237: if [ -f $$file ] ; then \ ! 1238: rm -f $(libsubdir)/$$file; \ ! 1239: $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ! 1240: else true; \ ! 1241: fi; \ ! 1242: done ! 1243: for file in $(EXTRA_PASSES) $(EXTRA_PARTS) ..; do \ ! 1244: if [ x"$$file" != x.. ]; then \ ! 1245: rm -f $(libsubdir)/$$file; \ ! 1246: $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ! 1247: else true; fi; \ ! 1248: done ! 1249: -rm -f $(libsubdir)/specs ! 1250: $(INSTALL_DATA) specs $(libsubdir)/specs ! 1251: # Install the driver program as gcc-$(target) ! 1252: # and also as either gcc (if native) or $(tooldir)/bin/gcc. ! 1253: -if [ -f gcc-cross ] ; then \ ! 1254: if [ -d $(tooldir)/bin/. ] ; then \ ! 1255: rm -f $(tooldir)/bin/gcc; \ ! 1256: $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ ! 1257: $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \ ! 1258: else true; fi; \ ! 1259: else \ ! 1260: rm -f $(bindir)/gcc; \ ! 1261: $(INSTALL_PROGRAM) gcc $(bindir)/gcc; \ ! 1262: rm -f $(bindir)/gcc-$(target)-1; \ ! 1263: ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \ ! 1264: mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \ ! 1265: fi ! 1266: $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++ ! 1267: $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++ ! 1268: -rm -f $(libsubdir)/cpp ! 1269: $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp ! 1270: ! 1271: # Install protoize. ! 1272: install-proto: proto install-dir ! 1273: -rm -f $(bindir)/protoize ! 1274: $(INSTALL_PROGRAM) protoize $(bindir)/protoize ! 1275: -rm -f $(bindir)/unprotoize ! 1276: $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize ! 1277: -rm -f $(libsubdir)/SYSCALLS.c.X ! 1278: $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X ! 1279: chmod a-x $(libsubdir)/SYSCALLS.c.X ! 1280: ! 1281: # Install the man pages. ! 1282: install-man: install-dir $(srcdir)/gcc.1 protoize.1 unprotoize.1 ! 1283: -rm -f $(mandir)/gcc$(manext) ! 1284: $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext) ! 1285: chmod a-x $(mandir)/gcc$(manext) ! 1286: -rm -f $(mandir)/protoize$(manext) ! 1287: $(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext) ! 1288: chmod a-x $(mandir)/protoize$(manext) ! 1289: -rm -f $(mandir)/unprotoize$(manext) ! 1290: $(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext) ! 1291: chmod a-x $(mandir)/unprotoize$(manext) ! 1292: ! 1293: # Install the library. ! 1294: install-libgcc: libgcc.a ! 1295: -if [ -f libgcc.a ] ; then \ ! 1296: rm -f $(libsubdir)/libgcc.a; \ ! 1297: $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \ ! 1298: if $(RANLIB_TEST) ; then \ ! 1299: (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \ ! 1300: chmod a-x $(libsubdir)/libgcc.a; \ ! 1301: else true; fi ! 1302: ! 1303: # Install all the header files for native compiler. ! 1304: install-headers: install-common-headers install-float-h install-limits-h ! 1305: ! 1306: # Install float.h for native compiler. ! 1307: install-float-h: float.h ! 1308: -rm -f $(libsubdir)/include/float.h ! 1309: $(INSTALL_DATA) float.h $(libsubdir)/include/float.h ! 1310: chmod a-x $(libsubdir)/include/float.h ! 1311: ! 1312: # Install limits.h, optionally inheriting from the standard system version. ! 1313: install-limits-h: limits.h limitx.h ! 1314: -rm -f $(libsubdir)/include/limits.h tmp-limits.h ! 1315: if [ -f /usr/include/limits.h ] ; then \ ! 1316: cat $(srcdir)/limitx.h $(srcdir)/limits.h > tmp-limits.h; \ ! 1317: else \ ! 1318: cat $(srcdir)/limits.h > tmp-limits.h; \ ! 1319: fi ! 1320: $(INSTALL_DATA) tmp-limits.h $(libsubdir)/include/limits.h ! 1321: chmod a-x $(libsubdir)/include/limits.h ! 1322: rm tmp-limits.h ! 1323: ! 1324: # Install the fixed headers that are the same for all machines. ! 1325: install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h ! 1326: if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi ! 1327: -chmod ugo+rx $(libsubdir)/include ! 1328: # Must compute $(libsubdir) before the cd; the awk script won't work after. ! 1329: shelllibsubdir=$(libsubdir); \ ! 1330: cd $(srcdir); \ ! 1331: for file in $(USER_H); do \ ! 1332: rm -f $$shelllibsubdir/include/`basename $$file`; \ ! 1333: $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \ ! 1334: chmod a-x $$shelllibsubdir/include/`basename $$file`; \ ! 1335: done ! 1336: -rm -f $(libsubdir)/include/varargs.h ! 1337: $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h ! 1338: chmod a-x $(libsubdir)/include/varargs.h ! 1339: -rm -f $(libsubdir)/include/stdarg.h ! 1340: $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h ! 1341: chmod a-x $(libsubdir)/include/stdarg.h ! 1342: -rm -f $(libsubdir)/include/stddef.h ! 1343: $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h ! 1344: chmod a-x $(libsubdir)/include/stddef.h ! 1345: # Copy byteorder.h into the object file directory ! 1346: # so that fixinc.svr4 can get at it if necessary. ! 1347: # If the dirs are the same, this won't do anything. ! 1348: -cp $(srcdir)/byteorder.h . ! 1349: ! 1350: # $(libsubdir)/include: ! 1351: # if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi ! 1352: # -chmod ugo+rx $(libsubdir)/include ! 1353: ! 1354: # This appears not to work. It isn't clear how to fix it. ! 1355: # $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/fixincludes ! 1356: # LIB=$(libsubdir)/include $(srcdir)/fixincludes ! 1357: # $(INSTALL_DATA) $(srcdir)/fixincludes-README $@ ! 1358: # chmod a-x $@ ! 1359: ! 1360: # Run fixincludes in the proper directory. ! 1361: install-fixincludes: install-headers ! 1362: rm -rf $(libsubdir)/tmp ! 1363: mkdir $(libsubdir)/tmp ! 1364: # Move aside the headers that come from GCC; delete all else. ! 1365: cd $(libsubdir)/include; mv $(INSTALLED_H) ../tmp; rm -rf * ! 1366: # Install fixed copies of system files. ! 1367: $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include ! 1368: # Bring back gcc's header files. ! 1369: cd $(libsubdir)/include; mv ../tmp/* .; rmdir ../tmp ! 1370: # Install the README ! 1371: $(INSTALL_DATA) $(srcdir)/README-fixinc $(libsubdir)/include/README ! 1372: chmod a-x $(libsubdir)/include/README ! 1373: ! 1374: # Use this target to install the program `collect2' under the name `ld'. ! 1375: install-collect2: collect2 ! 1376: $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld ! 1377: # Install the driver program as $(libsubdir)/gcc for collect2. ! 1378: -if [ -f gcc-cross ] ; then \ ! 1379: $(INSTALL_PROGRAM) gcc-cross $(libsubdir)/gcc; \ ! 1380: else \ ! 1381: $(INSTALL_PROGRAM) gcc $(libsubdir)/gcc; \ ! 1382: fi ! 1383: ! 1384: # Cancel installation by deleting the installed files. ! 1385: uninstall: ! 1386: -rm -rf $(libsubdir) ! 1387: -rm -rf $(bindir)/gcc ! 1388: -rm -rf $(mandir)/protoize$(manext) ! 1389: -rm -rf $(mandir)/unprotoize$(manext) ! 1390: -rm -rf $(bindir)/protoize ! 1391: -rm -rf $(bindir)/unprotoize ! 1392: -rm -rf $(mandir)/gcc$(manext) ! 1393: -rm -rf $(mandir)/protoize$(manext) ! 1394: -rm -rf $(mandir)/unprotoize$(manext) ! 1395: ! 1396: # These exist for maintenance purposes. ! 1397: ! 1398: # Update the tags table. ! 1399: TAGS: force ! 1400: cd $(srcdir); \ ! 1401: mkdir temp; \ ! 1402: mv -f c-parse.c c-parse.h cp-parse.c cp-parse.h objc-parse.c cexp.c temp; \ ! 1403: etags *.y *.h *.c; \ ! 1404: mv temp/* .; \ ! 1405: rmdir temp ! 1406: ! 1407: # Create the distribution tar file. ! 1408: #dist: gcc-$(version).tar.Z ! 1409: dist: gcc.xtar.Z ! 1410: ! 1411: gcc.xtar.Z: gcc.xtar ! 1412: compress < gcc.xtar > tmp-gcc.xtar.Z ! 1413: mv tmp-gcc.xtar.Z gcc.xtar.Z ! 1414: ! 1415: #gcc-$(version).tar.Z: gcc-$(version).tar ! 1416: # compress < gcc-$(version).tar > gcc-$(version).tar.Z ! 1417: ! 1418: #gcc-$(version).tar: ! 1419: gcc.xtar: ! 1420: -rm -rf gcc-$(version) tmp ! 1421: # Put all the files in a temporary subdirectory ! 1422: # which has the name that we want to have in the tar file. ! 1423: mkdir tmp ! 1424: mkdir tmp/config ! 1425: for file in *[0-9a-zA-Z+]; do \ ! 1426: ln $$file tmp || cp $$file tmp; \ ! 1427: done ! 1428: cd config; \ ! 1429: for file in *[0-9a-zA-Z+]; do \ ! 1430: ln $$file ../tmp/config || cp $$file ../tmp/config; \ ! 1431: done ! 1432: ln .gdbinit tmp ! 1433: mv tmp gcc-$(version) ! 1434: # Get rid of everything we don't want in the distribution. ! 1435: cd gcc-$(version); make -f Makefile.in distclean ! 1436: # Make the distribution. ! 1437: tar chf gcc.xtar gcc-$(version) ! 1438: # Get rid of the temporary directory. ! 1439: rm -rf gcc-$(version) ! 1440: ! 1441: # do make -f ../gcc/Makefile maketest DIR=../gcc ! 1442: # in the intended test directory to make it a suitable test directory. ! 1443: # THIS IS OBSOLETE; use the -srcdir operand in configure instead. ! 1444: maketest: ! 1445: ln -s $(DIR)/*.[chy] . ! 1446: ln -s $(DIR)/configure . ! 1447: ln -s $(DIR)/*.def . ! 1448: -rm -f =* ! 1449: ln -s $(DIR)/.gdbinit . ! 1450: ln -s $(DIR)/$(FIXINCLUDES) . ! 1451: -ln -s $(DIR)/bison.simple . ! 1452: ln -s $(DIR)/config . ! 1453: ln -s $(DIR)/move-if-change . ! 1454: # The then and else were swapped to avoid a problem on Ultrix. ! 1455: if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi ! 1456: -rm tm.h aux-output.c config.h md ! 1457: make clean ! 1458: # You must then run config to set up for compilation. ! 1459: ! 1460: bootstrap: all force ! 1461: $(MAKE) stage1 ! 1462: # This used to define ALLOCA as empty, but that would lead to bad results ! 1463: # for a subsequent `make install' since that would not have ALLOCA empty. ! 1464: # To prevent `make install' from compiling alloca.o and then relinking cc1 ! 1465: # because alloca.o is newer, we permit these recursive makes to compile ! 1466: # alloca.o. Then cc1 is newer, so it won't have to be relinked. ! 1467: $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ! 1468: $(MAKE) stage2 ! 1469: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ! 1470: ! 1471: bootstrap2: force ! 1472: $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ! 1473: $(MAKE) stage2 ! 1474: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ! 1475: ! 1476: bootstrap3: force ! 1477: $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ! 1478: ! 1479: # Copy the object files from a particular stage into a subdirectory. ! 1480: stage1: force ! 1481: if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi ! 1482: -mv $(STAGESTUFF) stage1 ! 1483: -rm -f stage1/libgcc.a ! 1484: -cp libgcc.a stage1 ! 1485: -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi ! 1486: ! 1487: stage2: force ! 1488: if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi ! 1489: -mv $(STAGESTUFF) stage2 ! 1490: -rm -f stage2/libgcc.a ! 1491: -cp libgcc.a stage2 ! 1492: -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi ! 1493: ! 1494: stage3: force ! 1495: if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi ! 1496: -mv $(STAGESTUFF) stage3 ! 1497: -rm -f stage3/libgcc.a ! 1498: -cp libgcc.a stage3 ! 1499: -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi ! 1500: ! 1501: stage4: force ! 1502: if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi ! 1503: -mv $(STAGESTUFF) stage4 ! 1504: -rm -f stage4/libgcc.a ! 1505: -cp libgcc.a stage4 ! 1506: -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi ! 1507: ! 1508: # Copy just the executable files from a particular stage into a subdirectory, ! 1509: # and delete the object files. Use this if you're just verifying a version ! 1510: # that is pretty sure to work, and you are short of disk space. ! 1511: risky-stage1: force ! 1512: if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi ! 1513: -mv cc1 cpp cccp gcc stage1 ! 1514: -rm -f stage1/libgcc.a ! 1515: -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a ! 1516: -make clean ! 1517: ! 1518: risky-stage2: force ! 1519: if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi ! 1520: -mv cc1 cpp cccp gcc stage2 ! 1521: -rm -f stage2/libgcc.a ! 1522: -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a ! 1523: -make clean ! 1524: ! 1525: risky-stage3: force ! 1526: if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi ! 1527: -mv cc1 cpp cccp gcc stage3 ! 1528: -rm -f stage3/libgcc.a ! 1529: -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a ! 1530: -make clean ! 1531: ! 1532: risky-stage4: force ! 1533: if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi ! 1534: -mv cc1 cpp cccp gcc stage4 ! 1535: -rm -f stage4/libgcc.a ! 1536: -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a ! 1537: -make clean ! 1538: ! 1539: #In GNU Make, ignore whether `stage*' exists. ! 1540: .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap ! 1541: .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 ! 1542: ! 1543: force:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.