home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / gccsrc3.lzh / GCCSRC3 / MAKEFILE.ST < prev    next >
Text File  |  1993-07-23  |  12KB  |  329 lines

  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.  
  22. CROSSINC = /dsrg/bammi/cross-gcc/include
  23. CFLAGS = -O -I$(CROSSINC) -I./config -I. -Datarist=1
  24. SUNCFLAGS = -O -I./config -I. -g
  25. CC = /dsrg/bammi/cross-gcc/bin/cgcc
  26. # hosts gcc
  27. SUNCC=/usr/local/bin/gcc
  28.  
  29. # OLDCC should not be the GNU C compiler.
  30. OLDCC = cc
  31. BISON = bison
  32. AR = ar
  33. SHELL = /bin/sh
  34.  
  35. bindir = 
  36. libdir = 
  37.  
  38. # These are what you would need on HPUX:
  39. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  40. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  41. # bites whenever tree.def, rtl.def or machmode.def is included
  42. # (ie., on every source file).
  43. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  44. # For CCLIBFLAGS you might want to specify the switch that
  45. # forces only 68000 instructions to be used.
  46.  
  47. # If you are making gcc for the first time, and if you are compiling it with
  48. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  49. # of the standard libraries (as is true for HP/UX or Genix),
  50. # then get alloca.c from GNU Emacs and un-comment the following line:
  51. # ALLOCA = alloca.o
  52.  
  53. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  54. # CLIB= -lPW
  55.   
  56. # If your system's malloc() routine fails for any reason (as it does on
  57. # certain versions of Genix), try getting the files
  58. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  59. # MALLOC = malloc.o
  60.  
  61. # If you are running GCC on an Apollo, you will need this:
  62. # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG
  63.  
  64. # Change this to a null string if obstacks are installed in the
  65. # system library.
  66. OBSTACK=obstack.o
  67. OBSTACK1=obstack.oo
  68.  
  69. # Dependency on obstack, alloca, malloc or whatever library facilities
  70. # are not installed in the system libraries.
  71. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  72. LIBDEPS1= $(OBSTACK1) $(ALLOCA) $(MALLOC)
  73.  
  74. # How to link with both our special library facilities
  75. # and the system's installed libraries.
  76. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  77. LIBS1 = $(OBSTACK1) $(ALLOCA) $(MALLOC) $(CLIB)
  78.  
  79. DIR = ../gcc
  80.  
  81. # Object files of CC1.
  82. OBJS = toplev.o version.o c-parse.tab.o tree.o print-tree.o \
  83.  c-decl.o c-typeck.o c-convert.o stor-layout.o fold-const.o \
  84.  rtl.o rtlanal.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
  85.  symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
  86.  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
  87.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  88.  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
  89.  
  90. # Files to be copied away after each stage in building.
  91. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  92.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  93.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  94.  cc1 cpp cccp # cc1plus
  95.  
  96. # Header files that are made available to programs compiled with gcc.
  97. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  98.  
  99. # If you want to recompile everything, just do rm *.o.
  100. # CONFIG_H = config.h tm.h
  101. CONFIG_H =
  102. RTL_H = rtl.h rtl.def machmode.def
  103. TREE_H = tree.h tree.def machmode.def
  104.  
  105. ALL =  gcc.ttp gcc-cc1.ttp gcc-cpp.ttp
  106.  
  107. all : $(ALL)
  108.  
  109. compilations: ${OBJS}
  110.  
  111. gcc.ttp: gcc.o version.o $(LIBDEPS)
  112.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc.ttp gcc.o version.o $(LIBS)
  113.  
  114. gcc.o: gcc.c $(CONFIG_H)
  115.     $(CC) $(CFLAGS) -c gcc.c
  116.  
  117. gcc-cc1.ttp: $(OBJS) $(LIBDEPS)
  118.     $(CC) $(CFLAGS) $(LDFLAGS) -o gcc-cc1.ttp $(OBJS) $(LIBS)
  119.  
  120. # C-language specific files.
  121.  
  122. c-parse.tab.o : c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h
  123. c-parse.tab.c : c-parse.y
  124.     $(BISON) -v c-parse.y
  125.  
  126. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
  127. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  128. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
  129.  
  130. # Language-independent files.
  131.  
  132. tree.o : tree.c $(CONFIG_H) $(TREE_H)
  133. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  134. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H)
  135. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
  136. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h
  137.  
  138. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  139. rtl.oo : rtl.c $(CONFIG_H) $(RTL_H)
  140.     $(SUNCC) $(SUNCFLAGS) -c rtl.c -o rtl.oo
  141.  
  142. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  143.  
  144. obstack.oo : obstack.c
  145.     $(SUNCC) $(SUNCFLAGS) -c obstack.c -o obstack.oo
  146.  
  147. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h insn-codes.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 insn-codes.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 insn-codes.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) flags.h
  159. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h
  160.  
  161. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h
  162.  
  163. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
  164.    insn-flags.h insn-codes.h
  165.  
  166. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
  167. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
  168.  
  169. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  170. loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h regs.h recog.h
  171. flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
  172. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  173.    insn-config.h regs.h basic-block.h recog.h
  174. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
  175.    insn-config.h recog.h hard-reg-set.h
  176. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
  177.    insn-config.h recog.h hard-reg-set.h
  178. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  179.    basic-block.h regs.h hard-reg-set.h insn-config.h
  180.  
  181. reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
  182.    reload.h recog.h hard-reg-set.h insn-config.h regs.h
  183. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
  184.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
  185. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  186.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  187. final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h \
  188.    insn-config.h
  189. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  190.    regs.h recog.h hard-reg-set.h insn-config.h
  191.  
  192. # Now the source files that are generated from the machine description.
  193.  
  194. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  195.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
  196.  
  197. insn-config.h : md genconfig
  198.     ./genconfig md > tmp-insn-config.h
  199.     ./move-if-change tmp-insn-config.h insn-config.h
  200.  
  201. insn-flags.h : md genflags
  202.     ./genflags md > tmp-insn-flags.h
  203.     ./move-if-change tmp-insn-flags.h insn-flags.h
  204.  
  205. insn-codes.h : md gencodes
  206.     ./gencodes md > tmp-insn-codes.h
  207.     ./move-if-change tmp-insn-codes.h insn-codes.h
  208.  
  209. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  210.     $(CC) $(CFLAGS) -c insn-emit.c
  211.  
  212. insn-emit.c : md genemit
  213.     ./genemit md > tmp-insn-emit.c
  214.     ./move-if-change tmp-insn-emit.c insn-emit.c
  215.  
  216. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  217.     $(CC) $(CFLAGS) -c insn-recog.c
  218.  
  219. insn-recog.c : md genrecog
  220.     ./genrecog md > tmp-insn-recog.c
  221.     ./move-if-change tmp-insn-recog.c insn-recog.c
  222.  
  223. insn-extract.o : insn-extract.c $(RTL_H)
  224.     $(CC) $(CFLAGS) -c insn-extract.c
  225.  
  226. insn-extract.c : md genextract
  227.     ./genextract md > tmp-insn-extract.c
  228.     ./move-if-change tmp-insn-extract.c insn-extract.c
  229.  
  230. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  231.     $(CC) $(CFLAGS) -c insn-peep.c
  232.  
  233. insn-peep.c : md genpeep
  234.     ./genpeep md > tmp-insn-peep.c
  235.     ./move-if-change tmp-insn-peep.c insn-peep.c
  236.  
  237. 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
  238.     $(CC) $(CFLAGS) -c insn-output.c
  239.  
  240. insn-output.c : md genoutput
  241.     ./genoutput md > tmp-insn-output.c
  242.     ./move-if-change tmp-insn-output.c insn-output.c
  243.  
  244. # Now the programs that generate those files.
  245.  
  246. genconfig : genconfig.oo rtl.oo $(LIBDEPS1)
  247.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genconfig genconfig.oo rtl.oo $(LIBS1)
  248.  
  249. genconfig.oo : genconfig.c $(RTL_H)
  250.     $(SUNCC) $(SUNCFLAGS) -c genconfig.c -o genconfig.oo
  251.  
  252. genflags : genflags.oo rtl.oo $(LIBDEPS1)
  253.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genflags genflags.oo rtl.oo $(LIBS1)
  254.  
  255. genflags.oo : genflags.c $(RTL_H)
  256.     $(SUNCC) $(SUNCFLAGS) -c genflags.c -o genflags.oo
  257.  
  258. gencodes : gencodes.oo rtl.oo $(LIBDEPS1)
  259.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o gencodes gencodes.oo rtl.oo $(LIBS1)
  260.  
  261. gencodes.oo : gencodes.c $(RTL_H)
  262.     $(SUNCC) $(SUNCFLAGS) -c gencodes.c -o gencodes.oo
  263.  
  264. genemit : genemit.oo rtl.oo $(LIBDEPS1)
  265.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genemit genemit.oo rtl.oo $(LIBS1)
  266.  
  267. genemit.oo : genemit.c $(RTL_H)
  268.     $(SUNCC) $(SUNCFLAGS) -c genemit.c -o genemit.oo
  269.  
  270. genrecog : genrecog.oo rtl.oo $(LIBDEPS1)
  271.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genrecog genrecog.oo rtl.oo $(LIBS1)
  272.  
  273. genrecog.oo : genrecog.c $(RTL_H)
  274.     $(SUNCC) $(SUNCFLAGS) -c genrecog.c -o genrecog.oo
  275.  
  276. genextract : genextract.oo rtl.oo $(LIBDEPS1)
  277.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genextract genextract.oo rtl.oo $(LIBS1)
  278.  
  279. genextract.oo : genextract.c $(RTL_H)
  280.     $(SUNCC) $(SUNCFLAGS) -c genextract.c -o genextract.oo
  281.  
  282. genpeep : genpeep.oo rtl.oo $(LIBDEPS1)
  283.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genpeep genpeep.oo rtl.oo $(LIBS1)
  284.  
  285. genpeep.oo : genpeep.c $(RTL_H)
  286.     $(SUNCC) $(SUNCFLAGS) -c genpeep.c -o genpeep.oo
  287.  
  288. genoutput : genoutput.oo rtl.oo $(LIBDEPS1)
  289.     $(SUNCC) $(SUNCFLAGS) $(LDFLAGS) -o genoutput genoutput.oo rtl.oo $(LIBS1)
  290.  
  291. genoutput.oo : genoutput.c $(RTL_H)
  292.     $(SUNCC) $(SUNCFLAGS) -c genoutput.c -o genoutput.oo
  293.  
  294. # Making the preprocessor
  295. gcc-cpp.ttp: cccp
  296.     -rm -f gcc-cpp.ttp
  297.     ln cccp gcc-cpp.ttp
  298.  
  299. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  300.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  301. cexp.o: cexp.c
  302. cexp.c: cexp.y
  303.     $(BISON) cexp.y
  304.     mv cexp.tab.c cexp.c
  305. cccp.o: cccp.c
  306.  
  307. # gnulib is not deleted because deleting it would be inconvenient
  308. # for most uses of this target.
  309. clean:
  310.     -rm -f *.o *.oo $(ALL) $(STAGESTUFF)
  311.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  312.     -rm -f core
  313.  
  314. # Get rid of every file that's generated from some other file (except INSTALL).
  315. realclean: clean
  316.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  317.     -rm -f errs gnulib TAGS 
  318.  
  319. # Copy the files into directories where they will be run.
  320. #install: all
  321. #    install cc1 $(libdir)/gcc-cc1
  322. #    install cpp $(libdir)/gcc-cpp
  323. #    install gcc $(bindir)
  324.  
  325. force:
  326.  
  327. #In GNU Make, ignore whether `stage*' exists.
  328. .PHONY: clean realclean
  329.