Annotation of gcc/Makefile, revision 1.1.1.3

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: 
                     42: # If you are compiling this with CC on HPUX, you need the following line:
                     43: # CLIB = alloca.o
                     44: # Get alloca.o from GNU Emacs.
                     45: 
                     46: # You must also change the line that uses `ranlib'.  See below.
                     47: 
1.1       root       48: 
                     49: # How to link with obstack
                     50: OBSTACK=obstack.o
                     51: # Dependency on obstack
                     52: OBSTACK1=obstack.o
                     53: 
                     54: LIBS = $(OBSTACK) $(CLIB)
                     55: DIR = ../gcc
                     56: 
1.1.1.2   root       57: OBJS = toplev.o version.o parse.tab.o tree.o print-tree.o \
1.1       root       58:  decl.o typecheck.o stor-layout.o fold-const.o \
1.1.1.2   root       59:  rtl.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
1.1       root       60:  symout.o dbxout.o emit-rtl.o insn-emit.o \
1.1.1.2   root       61:  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
                     62:  regclass.o local-alloc.o global-alloc.o reload.o reload1.o insn-peep.o \
1.1       root       63:  final.o recog.o insn-recog.o insn-extract.o insn-output.o
                     64: 
1.1.1.2   root       65: # Files to be copied away after each stage in building.
                     66: STAGE_GCC=gcc
                     67: STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
                     68:  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
                     69:  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
                     70:  cc1 cpp cccp
                     71: 
                     72: # Members of gnulib.
                     73: LIBFUNCS = va_end _eprintf \
                     74:    _umulsi3 _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
                     75:    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
                     76:    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 _cmpdf2 \
                     77:    _fixunsdfsi _fixunsdfdi _fixdfsi _fixdfdi \
                     78:    _floatsidf _floatdidf _truncdfsf2 _extendsfdf2 \
                     79:    _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3
                     80: 
1.1       root       81: # If you want to recompile everything, just do rm *.o.
                     82: # CONFIG_H = config.h tm.h
                     83: CONFIG_H =
                     84: RTL_H = rtl.h rtl.def machmode.def
                     85: TREE_H = tree.h tree.def machmode.def
                     86: 
1.1.1.2   root       87: all: gnulib gcc cc1 cpp
                     88: 
                     89: compilations: ${OBJS}
1.1       root       90: 
1.1.1.3 ! root       91: gcc: gcc.o version.o $(OBSTACK1)
        !            92:        $(CC) $(CFLAGS) -o gccnew gcc.o version.o $(LIBS)
1.1.1.2   root       93: # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
                     94:        mv gccnew gcc
1.1       root       95: 
1.1.1.2   root       96: gcc.o: gcc.c $(CONFIG_H)
                     97:        $(CC) $(CFLAGS) -c gcc.c
1.1       root       98: 
                     99: cc1: $(OBJS) $(OBSTACK1)
1.1.1.2   root      100:        $(CC) $(CFLAGS) -o cc1 $(OBJS) $(LIBS)
1.1       root      101: 
1.1.1.2   root      102: #Library of arithmetic subroutines
                    103: # Don't compile this with gcc!
                    104: gnulib: gnulib.c
                    105:        -mkdir libtemp
                    106:        cd libtemp; \
                    107:        rm -f gnulib; \
                    108:        for name in $(LIBFUNCS); \
                    109:        do \
                    110:          echo $${name}; \
                    111:          rm -f $${name}.c; \
                    112:          ln ../gnulib.c $${name}.c; \
                    113:          $(OLDCC) $(CCLIBFLAGS) -O -I.. -c -DL$${name} $${name}.c; \
                    114:          $(AR) qc gnulib $${name}.o; \
                    115:        done
                    116:        mv libtemp/gnulib .
                    117:        rm -rf libtemp
                    118:        ranlib gnulib
                    119: # On HPUX, if you are working with the GNU assembler and linker,
                    120: # the previous line must be replaced with
                    121: # No change is needed here if you are using the HPUX assembler and linker.
                    122: #      mv gnulib gnulib-hp
                    123: #      hpxt gnulib-hp gnulib
1.1       root      124: 
1.1.1.2   root      125: decl.o : decl.c $(CONFIG_H) $(TREE_H) flags.h c-tree.h parse.h
                    126: typecheck.o : typecheck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1.1       root      127: tree.o : tree.c $(CONFIG_H) $(TREE_H)
                    128: print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
                    129: stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H)
                    130: fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
1.1.1.2   root      131: toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h
1.1       root      132: 
1.1.1.2   root      133: parse.tab.o : parse.tab.c $(CONFIG_H) $(TREE_H) parse.h c-tree.h flags.h
1.1       root      134: 
                    135: parse.tab.c : parse.y
1.1.1.2   root      136:        $(BISON) -v parse.y
1.1       root      137: 
                    138: rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
                    139: 
1.1.1.2   root      140: varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h
                    141: stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    142:    insn-flags.h expr.h insn-config.h regs.h 
                    143: expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    144:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
                    145: expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    146:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
                    147: explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h
                    148: optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    149:    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
                    150: symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
                    151: dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H)
                    152: 
                    153: emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h
1.1       root      154: 
1.1.1.2   root      155: integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-flags.h
1.1       root      156: 
1.1.1.2   root      157: jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
                    158: stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
1.1       root      159: 
1.1.1.2   root      160: cse.o : cse.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h hard-reg-set.h
1.1       root      161: loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h recog.h
1.1.1.2   root      162: flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
                    163: combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
                    164:    insn-config.h regs.h basic-block.h recog.h
                    165: regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h insn-config.h recog.h hard-reg-set.h
1.1       root      166: local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
1.1.1.2   root      167: global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
                    168:    basic-block.h regs.h hard-reg-set.h insn-config.h
1.1       root      169: 
1.1.1.2   root      170: reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
                    171:    reload.h recog.h hard-reg-set.h insn-config.h regs.h
                    172: reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
                    173:    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
                    174: final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h
                    175: recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
                    176:    regs.h recog.h hard-reg-set.h insn-config.h
1.1       root      177: 
                    178: # Now the source files that are generated from the machine description.
                    179: 
1.1.1.2   root      180: .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
                    181:   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
                    182: 
1.1       root      183: insn-config.h : md genconfig
1.1.1.2   root      184:        ./genconfig md > tmp-insn-config.h
                    185:        ./move-if-change tmp-insn-config.h insn-config.h
1.1       root      186: 
                    187: insn-flags.h : md genflags
1.1.1.2   root      188:        ./genflags md > tmp-insn-flags.h
                    189:        ./move-if-change tmp-insn-flags.h insn-flags.h
1.1       root      190: 
                    191: insn-codes.h : md gencodes
1.1.1.2   root      192:        ./gencodes md > tmp-insn-codes.h
                    193:        ./move-if-change tmp-insn-codes.h insn-codes.h
1.1       root      194: 
1.1.1.2   root      195: insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
                    196:        $(CC) $(CFLAGS) -c insn-emit.c
1.1       root      197: 
                    198: insn-emit.c : md genemit
1.1.1.2   root      199:        ./genemit md > tmp-insn-emit.c
                    200:        ./move-if-change tmp-insn-emit.c insn-emit.c
1.1       root      201: 
                    202: insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
1.1.1.2   root      203:        $(CC) $(CFLAGS) -c insn-recog.c
1.1       root      204: 
                    205: insn-recog.c : md genrecog
1.1.1.2   root      206:        ./genrecog md > tmp-insn-recog.c
                    207:        ./move-if-change tmp-insn-recog.c insn-recog.c
1.1       root      208: 
                    209: insn-extract.o : insn-extract.c $(RTL_H)
1.1.1.2   root      210:        $(CC) $(CFLAGS) -c insn-extract.c
1.1       root      211: 
                    212: insn-extract.c : md genextract
1.1.1.2   root      213:        ./genextract md > tmp-insn-extract.c
                    214:        ./move-if-change tmp-insn-extract.c insn-extract.c
1.1       root      215: 
1.1.1.2   root      216: insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
                    217:        $(CC) $(CFLAGS) -c insn-peep.c
                    218: 
                    219: insn-peep.c : md genpeep
                    220:        ./genpeep md > tmp-insn-peep.c
                    221:        ./move-if-change tmp-insn-peep.c insn-peep.c
                    222: 
                    223: 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
                    224:        $(CC) $(CFLAGS) -c insn-output.c
1.1       root      225: 
                    226: insn-output.c : md genoutput
1.1.1.2   root      227:        ./genoutput md > tmp-insn-output.c
                    228:        ./move-if-change tmp-insn-output.c insn-output.c
1.1       root      229: 
                    230: # Now the programs that generate those files.
                    231: 
1.1.1.2   root      232: genconfig : genconfig.o rtl.o $(OBSTACK1)
                    233:        $(CC) $(CFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
                    234: 
                    235: genconfig.o : genconfig.c $(RTL_H)
                    236:        $(CC) $(CFLAGS) -c genconfig.c
1.1       root      237: 
1.1.1.2   root      238: genflags : genflags.o rtl.o $(OBSTACK1)
                    239:        $(CC) $(CFLAGS) -o genflags genflags.o rtl.o $(LIBS)
1.1       root      240: 
1.1.1.2   root      241: genflags.o : genflags.c $(RTL_H)
                    242:        $(CC) $(CFLAGS) -c genflags.c
1.1       root      243: 
1.1.1.2   root      244: gencodes : gencodes.o rtl.o $(OBSTACK1)
                    245:        $(CC) $(CFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
1.1       root      246: 
1.1.1.2   root      247: gencodes.o : gencodes.c $(RTL_H)
                    248:        $(CC) $(CFLAGS) -c gencodes.c
1.1       root      249: 
1.1.1.2   root      250: genemit : genemit.o rtl.o $(OBSTACK1)
                    251:        $(CC) $(CFLAGS) -o genemit genemit.o rtl.o $(LIBS)
1.1       root      252: 
1.1.1.2   root      253: genemit.o : genemit.c $(RTL_H)
                    254:        $(CC) $(CFLAGS) -c genemit.c
1.1       root      255: 
1.1.1.2   root      256: genrecog : genrecog.o rtl.o $(OBSTACK1)
                    257:        $(CC) $(CFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
1.1       root      258: 
1.1.1.2   root      259: genrecog.o : genrecog.c $(RTL_H)
                    260:        $(CC) $(CFLAGS) -c genrecog.c
1.1       root      261: 
1.1.1.2   root      262: genextract : genextract.o rtl.o $(OBSTACK1)
                    263:        $(CC) $(CFLAGS) -o genextract genextract.o rtl.o $(LIBS)
1.1       root      264: 
1.1.1.2   root      265: genextract.o : genextract.c $(RTL_H)
                    266:        $(CC) $(CFLAGS) -c genextract.c
1.1       root      267: 
1.1.1.2   root      268: genpeep : genpeep.o rtl.o $(OBSTACK1)
                    269:        $(CC) $(CFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
1.1       root      270: 
1.1.1.2   root      271: genpeep.o : genpeep.c $(RTL_H)
                    272:        $(CC) $(CFLAGS) -c genpeep.c
1.1       root      273: 
1.1.1.2   root      274: genoutput : genoutput.o rtl.o $(OBSTACK1)
                    275:        $(CC) $(CFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
                    276: 
                    277: genoutput.o : genoutput.c $(RTL_H)
                    278:        $(CC) $(CFLAGS) -c genoutput.c
1.1       root      279: 
                    280: # Making the preprocessor
                    281: cpp: cccp
                    282:        -rm -f cpp
                    283:        ln cccp cpp
1.1.1.2   root      284: cccp: cccp.o cexp.o version.o
                    285:        $(CC) $(CFLAGS) -o cccp cccp.o cexp.o version.o $(CLIB)
                    286: cexp.o: cexp.c
                    287: cexp.c: cexp.y
                    288:        $(BISON) cexp.y
                    289:        mv cexp.tab.c cexp.c
1.1       root      290: cccp.o: cccp.c
                    291: 
1.1.1.2   root      292: # gnulib is not deleted because deleting it would be inconvenient
                    293: # for most uses of this target.
1.1       root      294: clean:
1.1.1.2   root      295:        -rm -f $(STAGESTUFF) $(STAGE_GCC)
                    296:        -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
                    297:        -rm -f core
                    298: 
                    299: # Copy the files into directories where they will be run.
                    300: install: all
                    301:        install cc1 $(libdir)/gcc-cc1
                    302:        install -c -m 755 gnulib $(libdir)/gcc-gnulib
                    303:        ranlib $(libdir)/gcc-gnulib
                    304:        install cpp $(libdir)/gcc-cpp
                    305:        install gcc $(bindir)
1.1       root      306: 
                    307: # do make -f ../gcc/Makefile maketest DIR=../gcc
                    308: # in the intended test directory to make it a suitable test directory.
                    309: maketest:
                    310:        ln -s $(DIR)/*.[chy] .
                    311:        ln -s $(DIR)/*.def .
                    312:        ln -s $(DIR)/*.md .
                    313:        ln -s $(DIR)/.gdbinit .
                    314:        -ln -s $(DIR)/bison.simple .
                    315:        ln -s $(DIR)/gcc .
1.1.1.2   root      316:        ln -s $(DIR)/move-if-change .
1.1       root      317:        ln -s $(DIR)/Makefile test-Makefile
                    318:        -rm tm.h aux-output.c
                    319:        make -f test-Makefile clean
1.1.1.2   root      320: # You must create the necessary links tm.h, md and aux-output.c
                    321: 
                    322: # Copy the object files from a particular stage into a subdirectory.
                    323: stage1: force
                    324:        -mkdir stage1
                    325:        mv $(STAGESTUFF) $(STAGE_GCC) stage1
                    326:        ln gnulib stage1
                    327: 
                    328: stage2: force
                    329:        -mkdir stage2
                    330:        mv $(STAGESTUFF) $(STAGE_GCC) stage2
                    331:        ln gnulib stage2
                    332: 
                    333: stage3: force
                    334:        -mkdir stage3
                    335:        mv $(STAGESTUFF) $(STAGE_GCC) stage3
                    336:        ln gnulib stage3
                    337: 
                    338: .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists.
                    339: force:
                    340: 
                    341: TAGS: force
                    342:        etags *.y *.h *.c
                    343: .PHONY: TAGS

unix.superglobalmegacorp.com

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