home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / g__src3 / makefile.st < prev    next >
Encoding:
Makefile  |  1993-07-23  |  23.9 KB  |  662 lines

  1. # Makefile for GNU C++ compiler.
  2. #   Copyright (C) 1987, 1988 Free Software Foundation, Inc.
  3. #   Hacked by Michael Tiemann (tiemann@mcc.com)
  4. #
  5. #   This one's hacked up for use on the Atari ST
  6.  
  7. #This file is part of GNU CC.
  8.  
  9. #GNU CC is free software; you can redistribute it and/or modify
  10. #it under the terms of the GNU General Public License as published by
  11. #the Free Software Foundation; either version 1, or (at your option)
  12. #any later version.
  13.  
  14. #GNU CC is distributed in the hope that it will be useful,
  15. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. #GNU General Public License for more details.
  18.  
  19. #You should have received a copy of the GNU General Public License
  20. #along with GNU CC; see the file COPYING.  If not, write to
  21. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23.  
  24. # Variables you should change for certain systems:
  25.  
  26. # These are what you would need on HPUX:
  27. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300
  28. # If you are using the GNU assembler and linker on HPUX,
  29. # add -I../hp-include to CFLAGS.
  30. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  31. # bites whenever tree.def, rtl.def or machmode.def is included
  32. # (ie., on every source file).
  33. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  34. # For CCLIBFLAGS you might want to specify the switch that
  35. # forces only 68000 instructions to be used.
  36.  
  37. # If you are making gcc for the first time, and if you are compiling it with
  38. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  39. # of the standard libraries (as is true for HP/UX or Genix),
  40. # then get alloca.c from GNU Emacs and un-comment the following line:
  41. #
  42. # For atari ST, uncomment this for smaller (~32K) stacks; use the library
  43. # version with large (500K) stacks.  See stack.c
  44. ALLOCA = alloca.o
  45.  
  46. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  47. # CLIB= -lPW
  48.  
  49. # If your system's malloc() routine fails for any reason (as it does on
  50. # certain versions of Genix), try getting the files
  51. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  52. # MALLOC = malloc.o
  53.  
  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.  
  57.  
  58. # Variables that exist for you to override.
  59.  
  60. # CFLAGS = -g -DSOS -DESKIT
  61. CFLAGS = -O
  62. LDFLAGS = -s
  63. # CC = ../gcc/gcc -B../gcc/
  64. BISON = bison
  65. BISONFLAGS = -v -d
  66. AR = ar
  67. # SHELL = /bin/sh
  68. # on sysV, define this as cp.
  69. # INSTALL = install -c
  70. MAKE = make
  71.  
  72. # Compiler to use for compiling gnulib.
  73. # OLDCC should not be the GNU C compiler.
  74. OLDCC = cc
  75.  
  76. # CFLAGS for use with OLDCC, for compiling gnulib.
  77. CCLIBFLAGS=
  78.  
  79. # prefix = /home/sioux/mdt
  80.  
  81. # Directory in which to put the executable for the command `g++'
  82. # bindir = $(prefix)/usr/local/bin
  83. # Directory in which to put the subprograms used by the compiler.
  84. # libdir = $(prefix)/usr/local/lib
  85. # Directory in which to put the crt0+.o, crt1+.o, and other such files.
  86. # startdir = $(prefix)/usr/local/lib
  87. # Directory in which to put man pages.
  88. # mandir = $(prefix)/usr/local/man/man1
  89. # Number to put in man-page filename.
  90. # manext = 1
  91.  
  92. # Additional system libraries to link with.
  93. CLIB=
  94.  
  95. # Change this to a null string if obstacks are installed in the
  96. # system library.
  97. OBSTACK=obstack.o
  98.  
  99. # Dependency on obstack, alloca, malloc or whatever library facilities
  100. # are not installed in the system libraries.
  101. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  102.  
  103. # How to link with both our special library facilities
  104. # and the system's installed libraries.
  105. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  106.  
  107. # this is where GNU CC sources are
  108. DIR = ..\gcc-1.35
  109. # this is the GNU CC build directory
  110. # TDIR = ../gcc-test
  111.  
  112. # End of variables for you to override.
  113.  
  114. # Always use -Iconfig when compiling.
  115. .c.o:
  116.     $(CC) -c $(CFLAGS) $(CPPFLAGS) -Iconfig $<
  117.  
  118. # Language-specific object files for C.
  119. C_OBJS = c-parset.o c-decl.o c-typeck.o c-conver.o
  120.  
  121. # Language-specific object files for C++.
  122. CPLUS_OBJS = c+-parse.o cplus-de.o cplus-ty.o \
  123.  cplus-le.o cplus-cl.o cplus-in.o \
  124.  cplus-me.o cplus-cv.o cplus-se.o cplus-pt.o
  125.  
  126. # Language-independent object files.
  127. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  128.  rtl.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
  129.  symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
  130.  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
  131.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  132.  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o \
  133.  atarist.o
  134.  
  135. # Files to be copied away after each stage in building.
  136. #STAGE_GCC=gcc
  137. #STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  138. # insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  139. # genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  140. # cc1plus g++ ld++
  141.  
  142. # Header files that are made available to programs compiled with gcc.
  143. USER_H = stddef.h stdarg.h assert.h varargs.h va-*.h limits.h
  144.  
  145. # If you want to recompile everything, just do rm *.o.
  146. # CONFIG_H = config.h tm.h
  147. CONFIG_H =
  148. RTL_H = rtl.h rtl.def machmode.def
  149. TREE_H = tree.h real.h tree.def machmode.def
  150. CPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h
  151.  
  152. # gnulib is not a target because a proper installation of GNU CC
  153. # will place it where g++ can find it.  Same with cpp
  154. all: g++.ttp cc1plus.ttp crt0+.o crt1+.o ld++.ttp # collect
  155.  
  156. # doc: cpp.info g++.info
  157.  
  158. compilations: ${OBJS} ${CPLUS_OBJS}
  159.  
  160. g++.ttp : gcc.o $(LIBDEPS) version.o
  161.     $(CC) $(CFLAGS) $(LDFLAGS) -o g++.ttp gcc.o version.o $(LIBS)
  162.  
  163. # Note: If you have SunOS 4.0, you can't use GNU LD to link programs
  164. # which use shared libraries.  You could add -DNO_GNU_LD to this
  165. # command line, but be warned that collect is not really powerful
  166. # enough to do right by all C++ static constructors, and it would
  167. # be better if you could just add support to GNU LD to handle
  168. # shared libraries.
  169. #
  170. # later... -- jrd
  171. # gcc.o: gcc.c $(CONFIG_H)
  172. #    $(CC) $(CFLAGS) -c -Iconfig -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" \
  173. #    -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" $<
  174.  
  175. #newld.o: newld.c
  176. #    -if cmp -s tm.h config/tm-sun3+.h; then \
  177. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  178. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  179. #    elif cmp -s tm.h config/tm-sun3-fpa+.h; then \
  180. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  181. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  182. #    elif cmp -s tm.h config/tm-sun3-nfp+.h; then \
  183. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  184. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  185. #    elif cmp -s tm.h config/tm-sun2+.h; then \
  186. #        OPTS='-Dmc68010 -DSUN2=2 -DTARGET=SUN2'; \
  187. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  188. #    elif cmp -s tm.h config/tm-sun4os3+.h; then \
  189. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  190. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  191. #    elif cmp -s tm.h config/tm-sun4os4+.h; then \
  192. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  193. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  194. #    elif cmp -s tm.h config/tm-sparc+.h; then \
  195. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  196. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  197. #    elif cmp -s tm.h config/tm-encore.h; then \
  198. #        CRT0_OPTIONS='-DUMAX'; \
  199. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  200. #    elif cmp -s tm.h config/tm-altos3068.h; then \
  201. #        OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \
  202. #    elif cmp -s tm.h tm-i386gas+.h; then \
  203. #        OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \
  204. #    else \
  205. #        OPTS='-DTARGET=-1'; \
  206. #        DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  207. #    fi; \
  208. #    echo $$OPTS $$DFLTS; \
  209. #    if [ "$$DFLTS" = "" ] ; \
  210. #    then \
  211. #    $(CC) -c -v $$OPTS $(PROFILE) $(CFLAGS) $(CFLAGS) newld.c ; \
  212. #    else \
  213. #    $(CC) -c -v $$OPTS -DSTANDARD_SEARCH_DIRS="$$DFLTS" $(PROFILE) $(CFLAGS) $(CFLAGS) newld.c ; \
  214. #    fi
  215. #
  216. #ld.o: ld.c
  217. #    -if cmp -s tm.h config/tm-sun3+.h; then \
  218. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  219. #    elif cmp -s tm.h config/tm-sun3-fpa+.h; then \
  220. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  221. #    elif cmp -s tm.h config/tm-sun3-nfp+.h; then \
  222. #        OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  223. #    elif cmp -s tm.h config/tm-sun2+.h; then \
  224. #        OPTS='-Dmc68010 -DSUN2=2 -DTARGET=SUN2'; \
  225. #    elif cmp -s tm.h config/tm-sun4os3+.h; then \
  226. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  227. #    elif cmp -s tm.h config/tm-sun4os4+.h; then \
  228. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  229. #    elif cmp -s tm.h config/tm-sparc+.h; then \
  230. #        OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  231. #    elif cmp -s tm.h config/tm-encore.h; then \
  232. #        CRT0_OPTIONS='-DUMAX'; \
  233. #    elif cmp -s tm.h config/tm-altos3068.h; then \
  234. #        OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \
  235. #    elif cmp -s tm.h tm-i386gas+.h; then \
  236. #        OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \
  237. #    else \
  238. #        OPTS='-DTARGET=-1'; \
  239. #    fi; \
  240. #    echo $$OPTS; \
  241. #    $(CC) -c $$OPTS $(PROFILE) $(CFLAGS) -DDEFAULT_SEARCH_PREFIX=\"$(libdir)\" ld.c
  242.  
  243. # if newld.c does not work as well as ld.c does for you,
  244. # then change `newld' to `ld'.
  245.  
  246. ld++.ttp: newld.o
  247.     $(CC) -s -o ld++.ttp $(PROFILE) newld.o 
  248.  
  249. collect.o: collect.c config.h
  250.     -if cmp -s tm.h config/tm-encore.h; then \
  251.         COLLECT_OPTIONS='-DUMAX'; \
  252.     else \
  253.         COLLECT_OPTIONS=''; \
  254.     fi; \
  255.     $(CC) $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) -c $<
  256.  
  257. collect: collect.o $(LIBDEPS)
  258.     $(CC) -o collect $(PROFILE) collect.o -lg $(LIBS) -lc
  259.  
  260. #crt0+.o: crt0.c config.h
  261. #    -if cmp -s tm.h config/tm-vax.h; then \
  262. #        CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  263. #    elif cmp -s tm.h config/tm-vaxv.h; then \
  264. #        CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  265. #    elif cmp -s tm.h config/tm-vms.h; then \
  266. #        CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  267. #    elif cmp -s tm.h config/tm-hp9k320.h; then \
  268. #        CRT0_OPTIONS='-Umc68000'; \
  269. #    elif cmp -s tm.h config/tm-hp9k320g.h; then \
  270. #        CRT0_OPTIONS='-Umc68000'; \
  271. #    elif cmp -s tm.h config/tm-sequent.h; then \
  272. #        CRT0_OPTIONS='-DCRT0_DUMMIES= -DDOT_GLOBAL_START'; \
  273. #    elif cmp -s tm.h config/tm-altos3068.h; then \
  274. #        CRT0_OPTIONS='-DCRT0_DUMMIES= -Umc68000 -Um68k'; \
  275. #    elif cmp -s tm.h tm-i386gas+.h; then \
  276. #        CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \
  277. #    else \
  278. #        CRT0_OPTIONS=''; \
  279. #    fi; \
  280. #    echo $$CRT0_OPTIONS; \
  281. #    $(CC) -Um68k $$CRT0_OPTIONS $(CFLAGS) -c -Iconfig crt0.c
  282. #    mv crt0.o crt0+.o
  283.  
  284. crt0+.o : crt0.c config.h
  285.     $(CC) -c -O -Iconfig $< -o crt0+.o
  286.  
  287. #CRT1_COMMAND=$(CC) -Um68k -g -c -Iconfig crt1.c
  288.  
  289. #crt1+.o: crt1.c config.h
  290. #    $(CRT1_COMMAND)
  291. #    mv crt1.o crt1+.o
  292.  
  293. crt1+.o : crt1.c config.h
  294.     $(CC) -c -O -Iconfig $< -o crt1+.o
  295.  
  296. cc1plus.ttp: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) stack.o
  297.     $(CC) $(LDFLAGS) -o cc1plus.ttp $(CPLUS_OBJS) $(OBJS) stack.o $(LIBS)
  298.  
  299. cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cplus-parse.h
  300. cplus-typeck.o : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  301. cplus-class.o : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H)
  302. cplus-init.o : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H)
  303. cplus-method.o : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  304. cplus-cvt.o : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  305. cplus-search.o : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H)
  306. cplus-ptree.o : cplus-ptree.c $(CONFIG_H) $(TREE_H)
  307. new-cplus-method.o : new-cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  308.  
  309. #cplus-parse.tab.o : cplus-parse.tab.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-parse.h flags.h
  310. #    $(CC) -c $(CFLAGS) -Iconfig -DPARSE_OUTPUT=\"$(PWD)/cplus-parse.output\" $<
  311. c+-parse.o : c+-parse.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-pa.h flags.h
  312.     $(CC) -c $(CFLAGS) -Iconfig -DPARSE_OUTPUT="c+-parse.out" $<
  313.  
  314. #    @echo expect 41 shift/reduce conflicts and 4 reduce/reduce conflicts
  315. c+-parse.c : cplus-pa.y
  316.     $(BISON) $(BISONFLAGS) cplus-pa.y -o c+-parse.c
  317.  
  318. cplus-le.o : cplus-le.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-pa.h c+-parse.h
  319. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  320.  
  321. # Language-independent files.
  322.  
  323. tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h $(CPLUS_TREE_H)
  324. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  325. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) $(CPLUS_TREE_H)
  326. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
  327. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h
  328.     $(CC) -c $(CFLAGS) -Iconfig -DSORRY_EXIT_CODE=35 $<
  329.  
  330. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  331.  
  332. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h \
  333.    insn-codes.h hard-reg-set.h $(CPLUS_TREE_H)
  334. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  335.    insn-flags.h expr.h insn-config.h regs.h insn-codes.h
  336. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  337.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h $(CPLUS_TREE_H)
  338. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  339.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  340. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
  341. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  342.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  343. symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
  344. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h $(CPLUS_TREE_H)
  345. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h
  346.  
  347. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h real.h
  348.  
  349. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
  350.    insn-flags.h insn-codes.h
  351.  
  352. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
  353. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
  354.  
  355. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h
  356. loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  357.    regs.h recog.h flags.h expr.h
  358. flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
  359. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  360.    insn-config.h regs.h basic-block.h recog.h
  361. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
  362.    insn-config.h recog.h hard-reg-set.h
  363. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
  364.    insn-config.h recog.h hard-reg-set.h
  365. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  366.    basic-block.h regs.h hard-reg-set.h insn-config.h
  367.  
  368. reload.o : reload.c $(CONFIG_H) $(RTL_H)  \
  369.    reload.h recog.h hard-reg-set.h insn-config.h regs.h
  370. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
  371.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
  372. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  373.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  374. final.o : final.c $(CONFIG_H) $(RTL_H) regs.h recog.h conditions.h gdbfiles.h \
  375.    insn-config.h real.h
  376. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  377.    regs.h recog.h hard-reg-set.h insn-config.h
  378.  
  379. # Normally this target is not used; but it is used if you
  380. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  381. # from the GNU Emacs distribution.
  382. # Note some machines won't allow $(CC) without -S on this source file.
  383. alloca.o:    alloca.c
  384.     $(CC) $(CFLAGS) -S alloca.c
  385.     as alloca.s -o alloca.o
  386.  
  387. # Now the source files that are generated from the machine description.
  388.  
  389. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  390.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
  391.  
  392. # The following pair of rules has this effect:
  393. # genconfig is run only if the md has changed since genconfig was last run;
  394. # but the file insn-config.h is touched only when its contents actually change.
  395.  
  396. # Each of the other insn-* files is handled by a similar pair of rules.
  397.  
  398. #insn-config.h: stamp-config.h ;
  399. #stamp-config.h : md genconfig
  400. #    ./genconfig md > tmp-insn-config.h
  401. #    ./move-if-change tmp-insn-config.h insn-config.h
  402. #    touch stamp-config.h
  403. insn-con.h: insn-con.stm ;
  404. insn-con.stm : config\\md genconfi.ttp
  405.     stamp insn-con.stm
  406.     .\genconfi config\md > insn-con.h
  407.  
  408. #insn-flags.h: stamp-flags.h ;
  409. #stamp-flags.h : config\\md genflags
  410. #    ./genflags config\\md > tmp-insn-flags.h
  411. #    ./move-if-change tmp-insn-flags.h insn-flags.h
  412. #    touch stamp-flags.h
  413. insn-fla.h: insn-fla.stm ;
  414. insn-fla.stm : config\\md genflags.ttp
  415.     stamp insn-fla.stm
  416.     .\genflags config\md > insn-fla.h
  417.  
  418. #insn-codes.h: stamp-codes.h ;
  419. #stamp-codes.h : config\\md gencodes
  420. #    ./gencodes config\\md > tmp-insn-codes.h
  421. #    ./move-if-change tmp-insn-codes.h insn-codes.h
  422. #    touch stamp-codes.h
  423. insn-cod.h: insn-cod.stm ;
  424. insn-cod.stm : config\\md gencodes.ttp
  425.     stamp insn-cod.stm
  426.     .\gencodes config\md > insn-cod.h
  427.  
  428. insn-emi.o : insn-emi.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h real.h
  429.     $(CC) $(CFLAGS) -c insn-emi.c
  430.  
  431. #insn-emit.c: stamp-emit.c ;
  432. #stamp-emit.c : config\\md genemit
  433. #    ./genemit config\\md > tmp-insn-emit.c
  434. #    ./move-if-change tmp-insn-emit.c insn-emit.c
  435. #    touch stamp-emit.c
  436. insn-emi.c: insn-emi.stm ;
  437. insn-emi.stm : config\\md genemit.ttp
  438.     stamp insn-emi.stm
  439.     .\genemit config\md > insn-emi.c
  440.  
  441. insn-rec.o : insn-rec.c $(CONFIG_H) $(RTL_H) insn-con.h
  442.     $(CC) $(CFLAGS) -c insn-rec.c
  443.  
  444. #insn-recog.c: stamp-recog.c ;
  445. #stamp-recog.c : config\\md genrecog
  446. #    ./genrecog config\\md > tmp-insn-recog.c
  447. #    ./move-if-change tmp-insn-recog.c insn-recog.c
  448. #    touch stamp-recog.c
  449. insn-rec.c: insn-rec.stm ;
  450. insn-rec.stm : config\\md genrecog.ttp
  451.     stamp insn-rec.stm
  452.     .\genrecog config\md > insn-rec.c
  453.  
  454. insn-ext.o : insn-ext.c $(RTL_H)
  455.     $(CC) $(CFLAGS) -c insn-ext.c
  456.  
  457. #insn-extract.c: stamp-extract.c ;
  458. #stamp-extract.c : config\\md genextract
  459. #    ./genextract config\\md > tmp-insn-extract.c
  460. #    ./move-if-change tmp-insn-extract.c insn-extract.c
  461. #    touch stamp-extract.c
  462. insn-ext.c: insn-ext.stm ;
  463. insn-ext.stm : config\\md genextra.ttp
  464.     stamp insn-ext.stm
  465.     .\genextra config\md > insn-ext.c
  466.  
  467. insn-pee.o : insn-pee.c $(CONFIG_H) $(RTL_H) regs.h real.h
  468.     $(CC) $(CFLAGS) -c insn-pee.c
  469.  
  470. #insn-peep.c: stamp-peep.c ;
  471. #stamp-peep.c : config\\md genpeep
  472. #    ./genpeep config\\md > tmp-insn-peep.c
  473. #    ./move-if-change tmp-insn-peep.c insn-peep.c
  474. #    touch stamp-peep.c
  475. insn-pee.c: insn-pee.stm ;
  476. insn-pee.stm : config\\md genpeep.ttp
  477.     stamp insn-pee.stm
  478.     .\genpeep config\md > insn-pee.c
  479.  
  480. insn-out.o : insn-out.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  481.     insn-con.h insn-fla.h output.h aux-outp.c
  482.     $(CC) $(CFLAGS) -c -I$(srcdir)\config insn-out.c
  483.  
  484. #insn-output.c: stamp-output.c ;
  485. #stamp-output.c : config\\md genoutput
  486. #    ./genoutput config\\md > tmp-insn-output.c
  487. #    ./move-if-change tmp-insn-output.c insn-output.c
  488. #    touch stamp-output.c
  489. insn-out.c: insn-out.stm ;
  490. insn-out.stm : config\\md genoutpu.ttp
  491.     stamp insn-out.stm
  492.     .\genoutpu config\md > insn-out.c
  493.  
  494. ## Now the programs that generate those files.
  495. #
  496. #genconfig : genconfig.o rtl.o $(LIBDEPS)
  497. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  498. genconfi.ttp : genconfi.o rtl.o $(LIBDEPS)
  499.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfi.ttp genconfi.o rtl.o $(LIBS)
  500.  
  501. #genconfig.o : genconfig.c $(RTL_H)
  502. #    $(CC) $(CFLAGS) -c genconfig.c
  503. genconfi.o : genconfi.c $(RTL_H)
  504.     $(CC) $(CFLAGS) -c genconfi.c
  505.  
  506. #genflags : genflags.o rtl.o $(LIBDEPS)
  507. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  508. genflags.ttp : genflags.o rtl.o $(LIBDEPS)
  509.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags.ttp genflags.o rtl.o $(LIBS)
  510.  
  511. genflags.o : genflags.c $(RTL_H)
  512.     $(CC) $(CFLAGS) -c genflags.c
  513.  
  514. #gencodes : gencodes.o rtl.o $(LIBDEPS)
  515. #    $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  516. gencodes.ttp : gencodes.o rtl.o $(LIBDEPS)
  517.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes.ttp gencodes.o rtl.o $(LIBS)
  518.  
  519. gencodes.o : gencodes.c $(RTL_H)
  520.     $(CC) $(CFLAGS) -c gencodes.c
  521.  
  522. #genemit : genemit.o rtl.o $(LIBDEPS)
  523. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  524. genemit.ttp : genemit.o rtl.o $(LIBDEPS)
  525.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit.ttp genemit.o rtl.o $(LIBS)
  526.  
  527. genemit.o : genemit.c $(RTL_H)
  528.     $(CC) $(CFLAGS) -c genemit.c
  529.  
  530. #genrecog : genrecog.o rtl.o $(LIBDEPS)
  531. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  532. genrecog.ttp : genrecog.o rtl.o $(LIBDEPS)
  533.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog.ttp genrecog.o rtl.o $(LIBS)
  534.  
  535. genrecog.o : genrecog.c $(RTL_H)
  536.     $(CC) $(CFLAGS) -c genrecog.c
  537.  
  538. #genextract : genextract.o rtl.o $(LIBDEPS)
  539. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  540. genextra.ttp : genextra.o rtl.o $(LIBDEPS)
  541.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextra.ttp genextra.o rtl.o $(LIBS)
  542.  
  543. #genextract.o : genextract.c $(RTL_H)
  544. #    $(CC) $(CFLAGS) -c genextract.c
  545. genextra.o : genextra.c $(RTL_H)
  546.     $(CC) $(CFLAGS) -c genextra.c
  547.  
  548. #genpeep : genpeep.o rtl.o $(LIBDEPS)
  549. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  550. genpeep.ttp : genpeep.o rtl.o $(LIBDEPS)
  551.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep.ttp genpeep.o rtl.o $(LIBS)
  552.  
  553. genpeep.o : genpeep.c $(RTL_H)
  554.     $(CC) $(CFLAGS) -c genpeep.c
  555.  
  556. #genoutput : genoutput.o rtl.o $(LIBDEPS)
  557. #    $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  558. genoutpu.ttp : genoutpu.o rtl.o $(LIBDEPS)
  559.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutpu.ttp genoutpu.o rtl.o $(LIBS)
  560.  
  561. #genoutput.o : genoutput.c $(RTL_H)
  562. #    $(CC) $(CFLAGS) -c genoutput.c
  563. genoutpu.o : genoutpu.c $(RTL_H)
  564.     $(CC) $(CFLAGS) -c genoutpu.c
  565.  
  566.  
  567. # Making the preprocessor
  568. cpp: cccp
  569.     -rm -f cpp
  570.     ln cccp cpp
  571. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  572.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  573. cexp.o: cexp.c
  574. cexp.c: cexp.y
  575.     $(BISON) cexp.y -o cexp.c
  576.  
  577. #    mv cexp.tab.c cexp.c
  578.  
  579. cccp.o: cccp.c
  580.     $(CC) $(CFLAGS) -Iconfig -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
  581.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c
  582.  
  583. #cpp.info: cpp.texinfo
  584. #    makeinfo $<
  585. #
  586. #g++.info: g++.texinfo
  587. #    makeinfo $<
  588.  
  589. # gnulib is not deleted because deleting it would be inconvenient
  590. # for most uses of this target.
  591. clean:
  592.     -rm -f $(STAGESTUFF) $(STAGE_GCC)
  593.     -rm -f stamp-*.[ch]
  594.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  595.     -rm -f core
  596.  
  597. # Get rid of every file that's generated from some other file (except INSTALL).
  598. realclean: clean
  599.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  600.     -rm -f cplus-parse.tab.c cplus-parse.output cplus-parse.tab.h
  601.     -rm -f errs gnulib cexp.c TAGS tm-*+.h
  602.     -rm -f g++.info* g++.?? g++.??s g++.log g++.toc g++.*aux
  603.     -rm -f cccp cpp
  604.  
  605. # Like realclean but also delete the links made to configure gcc.
  606. cleanlinks: realclean
  607.     -rm -f tm.h aux-output.c config.h md config.status
  608.  
  609. # Copy the files into directories where they will be run.
  610. install: all
  611.     -mkdir $(libdir)
  612.     -mkdir $(bindir)
  613.     -mkdir $(startdir)
  614.     -if [ -f cc1plus  ] ; then $(INSTALL) cc1plus  $(libdir)/gcc-cc1plus ;fi
  615.     $(INSTALL) g++ $(bindir)
  616.     -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld++ ;fi
  617.     -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi
  618.     -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi
  619.     -mkdir $(libdir)/g++-include
  620.     chmod ugo+rx $(libdir)/g++-include
  621.  
  622. # do make -f Makefile maketest DIR=../gcc TDIR=../gcc-test
  623. # in the intended test directory to make it a suitable test directory.
  624. maketest:
  625.     -rm -f =*
  626.     -ln -s $(DIR)/.gdbinit .
  627.     -ln -s $(DIR)/bison.simple .
  628.     -ln -s $(DIR)/config.gcc .
  629.     -ln -s $(DIR)/move-if-change .
  630.     $(MAKE) clean
  631.     make-links.g++
  632.     -ln -s $(DIR)/gen*.c .
  633.     -ln -s $(TDIR)/obstack.o $(TDIR)/rtl.o $(TDIR)/emit-rtl.o \
  634.       $(TDIR)/insn-*.? $(TDIR)/jump.o $(TDIR)/cse.o \
  635.       $(TDIR)/loop.o $(TDIR)/flow.o $(TDIR)/stupid.o $(TDIR)/combine.o \
  636.       $(TDIR)/regclass.o $(TDIR)/local-alloc.o $(TDIR)/global-alloc.o \
  637.       $(TDIR)/reload.o $(TDIR)/reload1.o $(TDIR)/caller-save.o \
  638.       $(TDIR)/final.o $(TDIR)/recog.o $(TDIR)/gen*.o $(TDIR)/genemit \
  639.       $(TDIR)/genoutput $(TDIR)/genrecog $(TDIR)/genextract \
  640.       $(TDIR)/genflags $(TDIR)/gencodes $(TDIR)/genconfig \
  641.       $(TDIR)/genpeep .
  642.     -rm tm.h aux-output.c config.h md
  643. # You must then run config.g++ to set up for compilation.
  644.  
  645. bootstrap: all force
  646.     echo GNU C++ does not bootstrap itself
  647.  
  648. .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists.
  649. force:
  650.  
  651. TAGS: force
  652.     mkdir temp
  653.     -mv cplus-parse.tab.c cexp.c c-*.c temp
  654.     etags *.y *.h *.c
  655.     mv temp/* .
  656.     rmdir temp
  657.  
  658. #In GNU Make, ignore whether `stage*' exists.
  659. .PHONY: stage1 stage2 stage3 clean realclean TAGS bootstrap
  660.  
  661. force:
  662.