Annotation of gcc/Makefile, revision 1.1.1.5

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)
                    102:        $(CC) $(CFLAGS) -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.2   root      110:        $(CC) $(CFLAGS) -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.2   root      150: varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h
                    151: stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
                    152:    insn-flags.h expr.h insn-config.h regs.h 
                    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
                    157: explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h
                    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.2   root      166: integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-flags.h
1.1       root      167: 
1.1.1.2   root      168: jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
                    169: stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
1.1       root      170: 
1.1.1.2   root      171: cse.o : cse.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h hard-reg-set.h
1.1       root      172: loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h recog.h
1.1.1.2   root      173: flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
                    174: combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
                    175:    insn-config.h regs.h basic-block.h recog.h
1.1.1.4   root      176: regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
                    177:    insn-config.h recog.h hard-reg-set.h
                    178: local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
                    179:    insn-config.h recog.h hard-reg-set.h
1.1.1.2   root      180: global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
                    181:    basic-block.h regs.h hard-reg-set.h insn-config.h
1.1       root      182: 
1.1.1.2   root      183: reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
                    184:    reload.h recog.h hard-reg-set.h insn-config.h regs.h
                    185: reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
                    186:    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
                    187: final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h
                    188: recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
                    189:    regs.h recog.h hard-reg-set.h insn-config.h
1.1       root      190: 
                    191: # Now the source files that are generated from the machine description.
                    192: 
1.1.1.2   root      193: .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
                    194:   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
                    195: 
1.1       root      196: insn-config.h : md genconfig
1.1.1.2   root      197:        ./genconfig md > tmp-insn-config.h
                    198:        ./move-if-change tmp-insn-config.h insn-config.h
1.1       root      199: 
                    200: insn-flags.h : md genflags
1.1.1.2   root      201:        ./genflags md > tmp-insn-flags.h
                    202:        ./move-if-change tmp-insn-flags.h insn-flags.h
1.1       root      203: 
                    204: insn-codes.h : md gencodes
1.1.1.2   root      205:        ./gencodes md > tmp-insn-codes.h
                    206:        ./move-if-change tmp-insn-codes.h insn-codes.h
1.1       root      207: 
1.1.1.2   root      208: insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
                    209:        $(CC) $(CFLAGS) -c insn-emit.c
1.1       root      210: 
                    211: insn-emit.c : md genemit
1.1.1.2   root      212:        ./genemit md > tmp-insn-emit.c
                    213:        ./move-if-change tmp-insn-emit.c insn-emit.c
1.1       root      214: 
                    215: insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
1.1.1.2   root      216:        $(CC) $(CFLAGS) -c insn-recog.c
1.1       root      217: 
                    218: insn-recog.c : md genrecog
1.1.1.2   root      219:        ./genrecog md > tmp-insn-recog.c
                    220:        ./move-if-change tmp-insn-recog.c insn-recog.c
1.1       root      221: 
                    222: insn-extract.o : insn-extract.c $(RTL_H)
1.1.1.2   root      223:        $(CC) $(CFLAGS) -c insn-extract.c
1.1       root      224: 
                    225: insn-extract.c : md genextract
1.1.1.2   root      226:        ./genextract md > tmp-insn-extract.c
                    227:        ./move-if-change tmp-insn-extract.c insn-extract.c
1.1       root      228: 
1.1.1.2   root      229: insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
                    230:        $(CC) $(CFLAGS) -c insn-peep.c
                    231: 
                    232: insn-peep.c : md genpeep
                    233:        ./genpeep md > tmp-insn-peep.c
                    234:        ./move-if-change tmp-insn-peep.c insn-peep.c
                    235: 
                    236: 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
                    237:        $(CC) $(CFLAGS) -c insn-output.c
1.1       root      238: 
                    239: insn-output.c : md genoutput
1.1.1.2   root      240:        ./genoutput md > tmp-insn-output.c
                    241:        ./move-if-change tmp-insn-output.c insn-output.c
1.1       root      242: 
                    243: # Now the programs that generate those files.
                    244: 
1.1.1.2   root      245: genconfig : genconfig.o rtl.o $(OBSTACK1)
                    246:        $(CC) $(CFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
                    247: 
                    248: genconfig.o : genconfig.c $(RTL_H)
                    249:        $(CC) $(CFLAGS) -c genconfig.c
1.1       root      250: 
1.1.1.2   root      251: genflags : genflags.o rtl.o $(OBSTACK1)
                    252:        $(CC) $(CFLAGS) -o genflags genflags.o rtl.o $(LIBS)
1.1       root      253: 
1.1.1.2   root      254: genflags.o : genflags.c $(RTL_H)
                    255:        $(CC) $(CFLAGS) -c genflags.c
1.1       root      256: 
1.1.1.2   root      257: gencodes : gencodes.o rtl.o $(OBSTACK1)
                    258:        $(CC) $(CFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
1.1       root      259: 
1.1.1.2   root      260: gencodes.o : gencodes.c $(RTL_H)
                    261:        $(CC) $(CFLAGS) -c gencodes.c
1.1       root      262: 
1.1.1.2   root      263: genemit : genemit.o rtl.o $(OBSTACK1)
                    264:        $(CC) $(CFLAGS) -o genemit genemit.o rtl.o $(LIBS)
1.1       root      265: 
1.1.1.2   root      266: genemit.o : genemit.c $(RTL_H)
                    267:        $(CC) $(CFLAGS) -c genemit.c
1.1       root      268: 
1.1.1.2   root      269: genrecog : genrecog.o rtl.o $(OBSTACK1)
                    270:        $(CC) $(CFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
1.1       root      271: 
1.1.1.2   root      272: genrecog.o : genrecog.c $(RTL_H)
                    273:        $(CC) $(CFLAGS) -c genrecog.c
1.1       root      274: 
1.1.1.2   root      275: genextract : genextract.o rtl.o $(OBSTACK1)
                    276:        $(CC) $(CFLAGS) -o genextract genextract.o rtl.o $(LIBS)
1.1       root      277: 
1.1.1.2   root      278: genextract.o : genextract.c $(RTL_H)
                    279:        $(CC) $(CFLAGS) -c genextract.c
1.1       root      280: 
1.1.1.2   root      281: genpeep : genpeep.o rtl.o $(OBSTACK1)
                    282:        $(CC) $(CFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
1.1       root      283: 
1.1.1.2   root      284: genpeep.o : genpeep.c $(RTL_H)
                    285:        $(CC) $(CFLAGS) -c genpeep.c
1.1       root      286: 
1.1.1.2   root      287: genoutput : genoutput.o rtl.o $(OBSTACK1)
                    288:        $(CC) $(CFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
                    289: 
                    290: genoutput.o : genoutput.c $(RTL_H)
                    291:        $(CC) $(CFLAGS) -c genoutput.c
1.1       root      292: 
                    293: # Making the preprocessor
                    294: cpp: cccp
                    295:        -rm -f cpp
                    296:        ln cccp cpp
1.1.1.2   root      297: cccp: cccp.o cexp.o version.o
                    298:        $(CC) $(CFLAGS) -o cccp cccp.o cexp.o version.o $(CLIB)
                    299: cexp.o: cexp.c
                    300: cexp.c: cexp.y
                    301:        $(BISON) cexp.y
                    302:        mv cexp.tab.c cexp.c
1.1       root      303: cccp.o: cccp.c
1.1.1.5 ! root      304:        $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
        !           305:           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c
1.1       root      306: 
1.1.1.4   root      307: cpp.info: cpp.texinfo
                    308:        makeinfo $<
                    309: 
                    310: internals: internals.texinfo
                    311:        makeinfo $<
                    312: 
1.1.1.2   root      313: # gnulib is not deleted because deleting it would be inconvenient
                    314: # for most uses of this target.
1.1       root      315: clean:
1.1.1.2   root      316:        -rm -f $(STAGESTUFF) $(STAGE_GCC)
                    317:        -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
                    318:        -rm -f core
                    319: 
                    320: # Copy the files into directories where they will be run.
                    321: install: all
                    322:        install cc1 $(libdir)/gcc-cc1
                    323:        install -c -m 755 gnulib $(libdir)/gcc-gnulib
1.1.1.4   root      324:        if [ -f /usr/bin/ranlib ] ; then  ranlib $(libdir)/gcc-gnulib ;fi
1.1.1.2   root      325:        install cpp $(libdir)/gcc-cpp
                    326:        install gcc $(bindir)
1.1       root      327: 
                    328: # do make -f ../gcc/Makefile maketest DIR=../gcc
                    329: # in the intended test directory to make it a suitable test directory.
                    330: maketest:
                    331:        ln -s $(DIR)/*.[chy] .
                    332:        ln -s $(DIR)/*.def .
                    333:        ln -s $(DIR)/*.md .
                    334:        ln -s $(DIR)/.gdbinit .
                    335:        -ln -s $(DIR)/bison.simple .
                    336:        ln -s $(DIR)/gcc .
1.1.1.2   root      337:        ln -s $(DIR)/move-if-change .
1.1       root      338:        ln -s $(DIR)/Makefile test-Makefile
                    339:        -rm tm.h aux-output.c
                    340:        make -f test-Makefile clean
1.1.1.2   root      341: # You must create the necessary links tm.h, md and aux-output.c
                    342: 
                    343: # Copy the object files from a particular stage into a subdirectory.
                    344: stage1: force
                    345:        -mkdir stage1
                    346:        mv $(STAGESTUFF) $(STAGE_GCC) stage1
                    347:        ln gnulib stage1
                    348: 
                    349: stage2: force
                    350:        -mkdir stage2
                    351:        mv $(STAGESTUFF) $(STAGE_GCC) stage2
                    352:        ln gnulib stage2
                    353: 
                    354: stage3: force
                    355:        -mkdir stage3
                    356:        mv $(STAGESTUFF) $(STAGE_GCC) stage3
                    357:        ln gnulib stage3
                    358: 
                    359: .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists.
                    360: force:
                    361: 
                    362: TAGS: force
                    363:        etags *.y *.h *.c
                    364: .PHONY: TAGS

unix.superglobalmegacorp.com

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