Annotation of gcc/Makefile, revision 1.1.1.4

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

unix.superglobalmegacorp.com

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