Annotation of gcc/Makefile, revision 1.1.1.6

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

unix.superglobalmegacorp.com

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