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