Annotation of gcc/Makefile, revision 1.1.1.7

1.1       root        1: # Makefile for GNU C compiler.
                      2: #   Copyright (C) 1987 Free Software Foundation, Inc.
                      3: 
                      4: #This file is part of GNU CC.
                      5: 
                      6: #GNU CC is distributed in the hope that it will be useful,
                      7: #but WITHOUT ANY WARRANTY.  No author or distributor
                      8: #accepts responsibility to anyone for the consequences of using it
                      9: #or for whether it serves any particular purpose or works at all,
                     10: #unless he says so in writing.  Refer to the GNU CC General Public
                     11: #License for full details.
                     12: 
                     13: #Everyone is granted permission to copy, modify and redistribute
                     14: #GNU CC, but only under the conditions described in the
                     15: #GNU CC General Public License.   A copy of this license is
                     16: #supposed to have been given to you along with GNU CC so you
                     17: #can know your rights and responsibilities.  It should be in a
                     18: #file named COPYING.  Among other things, the copyright notice
                     19: #and this notice must be preserved on all copies.
                     20: 
                     21: 
1.1.1.2   root       22: CFLAGS = -g
1.1       root       23: CC = cc
1.1.1.2   root       24: # OLDCC should not be the GNU C compiler.
                     25: OLDCC = cc
                     26: BISON = bison
                     27: AR = ar
                     28: SHELL = /bin/sh
                     29: 
                     30: bindir = /usr/local
                     31: libdir = /usr/local/lib
                     32: 
                     33: # These are what you would need on HPUX:
                     34: # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
                     35: # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
                     36: # bites whenever tree.def, rtl.def or machmode.def is included
                     37: # (ie., on every source file).
                     38: # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
                     39: # For CCLIBFLAGS you might want to specify the switch that
                     40: # forces only 68000 instructions to be used.
                     41: 
1.1.1.4   root       42: # If you are making gcc for the first time, and if you are compiling it with
                     43: # a non-gcc compiler, and if your system doesn't have a working alloca() in any
1.1.1.7 ! root       44: # of the standard libraries (as is true for HP/UX or Genix),
        !            45: # then get alloca.c from GNU Emacs and un-comment the following line:
        !            46: # ALLOCA = alloca.o
1.1.1.2   root       47: 
1.1.1.4   root       48: # If your system has alloca() in /lib/libPW.a, un-comment the following line:
1.1.1.7 ! root       49: # CLIB= -lPW
        !            50:   
        !            51: # If your system's malloc() routine fails for any reason (as it does on
        !            52: # certain versions of Genix), try getting the files
        !            53: # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
        !            54: # MALLOC = malloc.o
1.1       root       55: 
1.1.1.5   root       56: # If you are running GCC on an Apollo, you will need this:
                     57: # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
                     58: 
1.1.1.7 ! root       59: # Change this to a null string if obstacks are installed in the
        !            60: # system library.
1.1       root       61: OBSTACK=obstack.o
                     62: 
1.1.1.7 ! root       63: # Dependency on obstack, alloca, malloc or whatever library facilities
        !            64: # are not installed in the system libraries.
        !            65: LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
        !            66: 
        !            67: # How to link with both our special library facilities
        !            68: # and the system's installed libraries.
        !            69: LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
        !            70: 
1.1       root       71: DIR = ../gcc
                     72: 
1.1.1.7 ! root       73: # Object files of CC1.
        !            74: OBJS = toplev.o version.o c-parse.tab.o tree.o print-tree.o \
        !            75:  c-decl.o c-typeck.o c-convert.o stor-layout.o fold-const.o \
1.1.1.2   root       76:  rtl.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
1.1.1.4   root       77:  symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
1.1.1.2   root       78:  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
                     79:  regclass.o local-alloc.o global-alloc.o reload.o reload1.o insn-peep.o \
1.1       root       80:  final.o recog.o insn-recog.o insn-extract.o insn-output.o
                     81: 
1.1.1.2   root       82: # Files to be copied away after each stage in building.
                     83: STAGE_GCC=gcc
                     84: STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
                     85:  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
                     86:  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
                     87:  cc1 cpp cccp
                     88: 
                     89: # Members of gnulib.
1.1.1.4   root       90: LIBFUNCS = _eprintf \
1.1.1.2   root       91:    _umulsi3 _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
                     92:    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
                     93:    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 _cmpdf2 \
                     94:    _fixunsdfsi _fixunsdfdi _fixdfsi _fixdfdi \
                     95:    _floatsidf _floatdidf _truncdfsf2 _extendsfdf2 \
                     96:    _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3
                     97: 
1.1       root       98: # If you want to recompile everything, just do rm *.o.
                     99: # CONFIG_H = config.h tm.h
                    100: CONFIG_H =
                    101: RTL_H = rtl.h rtl.def machmode.def
                    102: TREE_H = tree.h tree.def machmode.def
                    103: 
1.1.1.2   root      104: all: gnulib gcc cc1 cpp
                    105: 
1.1.1.4   root      106: doc: cpp.info internals
                    107: 
1.1.1.2   root      108: compilations: ${OBJS}
1.1       root      109: 
1.1.1.7 ! root      110: gcc: gcc.o version.o $(LIBDEPS)
1.1.1.6   root      111:        $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
1.1.1.2   root      112: # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
                    113:        mv gccnew gcc
1.1       root      114: 
1.1.1.2   root      115: gcc.o: gcc.c $(CONFIG_H)
1.1.1.4   root      116:        $(CC) $(CFLAGS) -c -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" gcc.c
1.1       root      117: 
1.1.1.7 ! root      118: cc1: $(OBJS) $(LIBDEPS)
1.1.1.6   root      119:        $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(OBJS) $(LIBS)
1.1       root      120: 
1.1.1.2   root      121: #Library of arithmetic subroutines
                    122: # Don't compile this with gcc!
                    123: gnulib: gnulib.c
                    124:        -mkdir libtemp
                    125:        cd libtemp; \
                    126:        rm -f gnulib; \
                    127:        for name in $(LIBFUNCS); \
                    128:        do \
                    129:          echo $${name}; \
                    130:          rm -f $${name}.c; \
                    131:          ln ../gnulib.c $${name}.c; \
                    132:          $(OLDCC) $(CCLIBFLAGS) -O -I.. -c -DL$${name} $${name}.c; \
                    133:          $(AR) qc gnulib $${name}.o; \
                    134:        done
                    135:        mv libtemp/gnulib .
                    136:        rm -rf libtemp
1.1.1.4   root      137:        if [ -f /usr/bin/ranlib ] ; then  ranlib gnulib ;fi
1.1.1.2   root      138: # On HPUX, if you are working with the GNU assembler and linker,
                    139: # the previous line must be replaced with
                    140: # No change is needed here if you are using the HPUX assembler and linker.
                    141: #      mv gnulib gnulib-hp
                    142: #      hpxt gnulib-hp gnulib
1.1       root      143: 
1.1.1.7 ! root      144: 
        !           145: # C-language specific files.
        !           146: 
        !           147: c-parse.tab.o : c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h
        !           148: c-parse.tab.c : c-parse.y
        !           149:        $(BISON) -v c-parse.y
        !           150: 
        !           151: c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
        !           152: c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
        !           153: c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
        !           154: 
        !           155: # Language-independent files.
        !           156: 
1.1       root      157: tree.o : tree.c $(CONFIG_H) $(TREE_H)
                    158: print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
                    159: stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H)
                    160: fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
1.1.1.2   root      161: toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h
1.1       root      162: 
                    163: rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
                    164: 
1.1.1.6   root      165: varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h insn-codes.h
1.1.1.2   root      166: stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
1.1.1.6   root      167:    insn-flags.h expr.h insn-config.h regs.h insn-codes.h
1.1.1.2   root      168: expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    169:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
                    170: expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    171:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
1.1.1.6   root      172: explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
1.1.1.2   root      173: optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    174:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
                    175: symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
1.1.1.7 ! root      176: dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h
1.1.1.4   root      177: sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h
1.1.1.2   root      178: 
                    179: emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h
1.1       root      180: 
1.1.1.6   root      181: integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
                    182:    insn-flags.h insn-codes.h
1.1       root      183: 
1.1.1.2   root      184: jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
                    185: stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
1.1       root      186: 
1.1.1.2   root      187: cse.o : cse.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h hard-reg-set.h
1.1       root      188: loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h recog.h
1.1.1.2   root      189: flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
                    190: combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
                    191:    insn-config.h regs.h basic-block.h recog.h
1.1.1.4   root      192: regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
                    193:    insn-config.h recog.h hard-reg-set.h
                    194: local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
                    195:    insn-config.h recog.h hard-reg-set.h
1.1.1.2   root      196: global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
                    197:    basic-block.h regs.h hard-reg-set.h insn-config.h
1.1       root      198: 
1.1.1.2   root      199: reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
                    200:    reload.h recog.h hard-reg-set.h insn-config.h regs.h
                    201: reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
                    202:    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
1.1.1.6   root      203: final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h \
                    204:    insn-config.h
1.1.1.2   root      205: recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
                    206:    regs.h recog.h hard-reg-set.h insn-config.h
1.1       root      207: 
                    208: # Now the source files that are generated from the machine description.
                    209: 
1.1.1.2   root      210: .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
                    211:   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
                    212: 
1.1       root      213: insn-config.h : md genconfig
1.1.1.2   root      214:        ./genconfig md > tmp-insn-config.h
                    215:        ./move-if-change tmp-insn-config.h insn-config.h
1.1       root      216: 
                    217: insn-flags.h : md genflags
1.1.1.2   root      218:        ./genflags md > tmp-insn-flags.h
                    219:        ./move-if-change tmp-insn-flags.h insn-flags.h
1.1       root      220: 
                    221: insn-codes.h : md gencodes
1.1.1.2   root      222:        ./gencodes md > tmp-insn-codes.h
                    223:        ./move-if-change tmp-insn-codes.h insn-codes.h
1.1       root      224: 
1.1.1.2   root      225: insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
                    226:        $(CC) $(CFLAGS) -c insn-emit.c
1.1       root      227: 
                    228: insn-emit.c : md genemit
1.1.1.2   root      229:        ./genemit md > tmp-insn-emit.c
                    230:        ./move-if-change tmp-insn-emit.c insn-emit.c
1.1       root      231: 
                    232: insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
1.1.1.2   root      233:        $(CC) $(CFLAGS) -c insn-recog.c
1.1       root      234: 
                    235: insn-recog.c : md genrecog
1.1.1.2   root      236:        ./genrecog md > tmp-insn-recog.c
                    237:        ./move-if-change tmp-insn-recog.c insn-recog.c
1.1       root      238: 
                    239: insn-extract.o : insn-extract.c $(RTL_H)
1.1.1.2   root      240:        $(CC) $(CFLAGS) -c insn-extract.c
1.1       root      241: 
                    242: insn-extract.c : md genextract
1.1.1.2   root      243:        ./genextract md > tmp-insn-extract.c
                    244:        ./move-if-change tmp-insn-extract.c insn-extract.c
1.1       root      245: 
1.1.1.2   root      246: insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
                    247:        $(CC) $(CFLAGS) -c insn-peep.c
                    248: 
                    249: insn-peep.c : md genpeep
                    250:        ./genpeep md > tmp-insn-peep.c
                    251:        ./move-if-change tmp-insn-peep.c insn-peep.c
                    252: 
                    253: insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
                    254:        $(CC) $(CFLAGS) -c insn-output.c
1.1       root      255: 
                    256: insn-output.c : md genoutput
1.1.1.2   root      257:        ./genoutput md > tmp-insn-output.c
                    258:        ./move-if-change tmp-insn-output.c insn-output.c
1.1       root      259: 
                    260: # Now the programs that generate those files.
                    261: 
1.1.1.7 ! root      262: genconfig : genconfig.o rtl.o $(LIBDEPS)
1.1.1.6   root      263:        $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
1.1.1.2   root      264: 
                    265: genconfig.o : genconfig.c $(RTL_H)
                    266:        $(CC) $(CFLAGS) -c genconfig.c
1.1       root      267: 
1.1.1.7 ! root      268: genflags : genflags.o rtl.o $(LIBDEPS)
1.1.1.6   root      269:        $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
1.1       root      270: 
1.1.1.2   root      271: genflags.o : genflags.c $(RTL_H)
                    272:        $(CC) $(CFLAGS) -c genflags.c
1.1       root      273: 
1.1.1.7 ! root      274: gencodes : gencodes.o rtl.o $(LIBDEPS)
1.1.1.6   root      275:        $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
1.1       root      276: 
1.1.1.2   root      277: gencodes.o : gencodes.c $(RTL_H)
                    278:        $(CC) $(CFLAGS) -c gencodes.c
1.1       root      279: 
1.1.1.7 ! root      280: genemit : genemit.o rtl.o $(LIBDEPS)
1.1.1.6   root      281:        $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
1.1       root      282: 
1.1.1.2   root      283: genemit.o : genemit.c $(RTL_H)
                    284:        $(CC) $(CFLAGS) -c genemit.c
1.1       root      285: 
1.1.1.7 ! root      286: genrecog : genrecog.o rtl.o $(LIBDEPS)
1.1.1.6   root      287:        $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
1.1       root      288: 
1.1.1.2   root      289: genrecog.o : genrecog.c $(RTL_H)
                    290:        $(CC) $(CFLAGS) -c genrecog.c
1.1       root      291: 
1.1.1.7 ! root      292: genextract : genextract.o rtl.o $(LIBDEPS)
1.1.1.6   root      293:        $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
1.1       root      294: 
1.1.1.2   root      295: genextract.o : genextract.c $(RTL_H)
                    296:        $(CC) $(CFLAGS) -c genextract.c
1.1       root      297: 
1.1.1.7 ! root      298: genpeep : genpeep.o rtl.o $(LIBDEPS)
1.1.1.6   root      299:        $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
1.1       root      300: 
1.1.1.2   root      301: genpeep.o : genpeep.c $(RTL_H)
                    302:        $(CC) $(CFLAGS) -c genpeep.c
1.1       root      303: 
1.1.1.7 ! root      304: genoutput : genoutput.o rtl.o $(LIBDEPS)
1.1.1.6   root      305:        $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
1.1.1.2   root      306: 
                    307: genoutput.o : genoutput.c $(RTL_H)
                    308:        $(CC) $(CFLAGS) -c genoutput.c
1.1       root      309: 
                    310: # Making the preprocessor
                    311: cpp: cccp
                    312:        -rm -f cpp
                    313:        ln cccp cpp
1.1.1.7 ! root      314: cccp: cccp.o cexp.o version.o $(LIBDEPS)
        !           315:        $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
1.1.1.2   root      316: cexp.o: cexp.c
                    317: cexp.c: cexp.y
                    318:        $(BISON) cexp.y
                    319:        mv cexp.tab.c cexp.c
1.1       root      320: cccp.o: cccp.c
1.1.1.5   root      321:        $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
                    322:           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c
1.1       root      323: 
1.1.1.4   root      324: cpp.info: cpp.texinfo
                    325:        makeinfo $<
                    326: 
                    327: internals: internals.texinfo
                    328:        makeinfo $<
                    329: 
1.1.1.2   root      330: # gnulib is not deleted because deleting it would be inconvenient
                    331: # for most uses of this target.
1.1       root      332: clean:
1.1.1.2   root      333:        -rm -f $(STAGESTUFF) $(STAGE_GCC)
                    334:        -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
                    335:        -rm -f core
                    336: 
                    337: # Copy the files into directories where they will be run.
                    338: install: all
                    339:        install cc1 $(libdir)/gcc-cc1
                    340:        install -c -m 755 gnulib $(libdir)/gcc-gnulib
1.1.1.4   root      341:        if [ -f /usr/bin/ranlib ] ; then  ranlib $(libdir)/gcc-gnulib ;fi
1.1.1.2   root      342:        install cpp $(libdir)/gcc-cpp
                    343:        install gcc $(bindir)
1.1.1.6   root      344:        -mkdir $(libdir)/gcc-include
                    345:        cp stddef.h stdarg.h assert.h varargs.h limits.h $(libdir)/gcc-include
1.1       root      346: 
                    347: # do make -f ../gcc/Makefile maketest DIR=../gcc
                    348: # in the intended test directory to make it a suitable test directory.
                    349: maketest:
                    350:        ln -s $(DIR)/*.[chy] .
                    351:        ln -s $(DIR)/*.def .
                    352:        ln -s $(DIR)/*.md .
                    353:        ln -s $(DIR)/.gdbinit .
                    354:        -ln -s $(DIR)/bison.simple .
                    355:        ln -s $(DIR)/gcc .
1.1.1.2   root      356:        ln -s $(DIR)/move-if-change .
1.1       root      357:        ln -s $(DIR)/Makefile test-Makefile
                    358:        -rm tm.h aux-output.c
                    359:        make -f test-Makefile clean
1.1.1.2   root      360: # You must create the necessary links tm.h, md and aux-output.c
                    361: 
                    362: # Copy the object files from a particular stage into a subdirectory.
                    363: stage1: force
                    364:        -mkdir stage1
                    365:        mv $(STAGESTUFF) $(STAGE_GCC) stage1
                    366:        ln gnulib stage1
                    367: 
                    368: stage2: force
                    369:        -mkdir stage2
                    370:        mv $(STAGESTUFF) $(STAGE_GCC) stage2
                    371:        ln gnulib stage2
                    372: 
                    373: stage3: force
                    374:        -mkdir stage3
                    375:        mv $(STAGESTUFF) $(STAGE_GCC) stage3
                    376:        ln gnulib stage3
                    377: 
                    378: .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists.
                    379: force:
                    380: 
                    381: TAGS: force
                    382:        etags *.y *.h *.c
                    383: .PHONY: TAGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.