home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / gcc-257 / makefile < prev    next >
Encoding:
Makefile  |  1993-12-15  |  84.4 KB  |  2,198 lines

  1. # Makefile generated by "configure.bat"
  2. all.dos: cccp cc1 cc1plus cc1obj xgcc
  3. # Makefile for GNU C compiler.
  4. #   Copyright (C) 1987, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
  5.  
  6. #This file is part of GNU CC.
  7.  
  8. #GNU CC is free software; you can redistribute it and/or modify
  9. #it under the terms of the GNU General Public License as published by
  10. #the Free Software Foundation; either version 2, or (at your option)
  11. #any later version.
  12.  
  13. #GNU CC is distributed in the hope that it will be useful,
  14. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #GNU General Public License for more details.
  17.  
  18. #You should have received a copy of the GNU General Public License
  19. #along with GNU CC; see the file COPYING.  If not, write to
  20. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. # The targets for external use include:
  23. # all, doc, proto, install, install-cross, install-cross-rest,
  24. # uninstall, TAGS, mostlyclean, clean, distclean, realclean,
  25. # stage1, stage2, stage3, stage4.
  26.  
  27. # Suppress smart makes who think they know how to automake Yacc files
  28. .y.c:
  29.  
  30. # Variables that exist for you to override.
  31. # See below for how to change them for certain systems.
  32.  
  33. # Selection of languages to be made.
  34. LANGUAGES = c c++ objective-c proto
  35.  
  36. ALLOCA =
  37. ALLOCA_FLAGS =
  38. ALLOCA_FINISH = true
  39.  
  40. # Various ways of specifying flags for compilations:  
  41. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
  42. # BOOT_CFLAGS is the value of CFLAGS to pass
  43. # to the stage2 and stage3 compilations
  44. # XCFLAGS is used for most compilations but not when using the GCC just built.
  45. XCFLAGS =
  46. CFLAGS = -g
  47. BOOT_CFLAGS = -O $(CFLAGS)
  48. # These exists to be overridden by the x-* and t-* files, respectively.
  49. X_CFLAGS =
  50. T_CFLAGS =
  51.  
  52. X_CPPFLAGS =
  53. T_CPPFLAGS =
  54.  
  55. CC = gcc
  56. BISON = bison
  57. BISONFLAGS =
  58. AR = ar
  59. OLDAR_FLAGS = qc
  60. AR_FLAGS = rc
  61. SHELL = /bin/sh
  62. # on sysV, define this as cp.
  63. INSTALL = install -c
  64. # These permit overriding just for certain files.
  65. INSTALL_PROGRAM = $(INSTALL)
  66. INSTALL_DATA = $(INSTALL)
  67. SYMLINK = ln -s
  68. MAKEINFO = makeinfo
  69. TEXI2DVI = texi2dvi
  70.  
  71. # Define this as & to perform parallel make on a Sequent.
  72. # Note that this has some bugs, and it seems currently necessary 
  73. # to compile all the gen* files first by hand to avoid erroneous results.
  74. P =
  75.  
  76. # How to invoke ranlib.
  77. RANLIB = ranlib
  78. # Test to use to see whether ranlib exists on the system.
  79. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  80.  
  81. # Compiler to use for compiling libgcc1.a.
  82. # OLDCC should not be the GNU C compiler,
  83. # since that would compile typical libgcc1.a functions such as mulsi3
  84. # into infinite recursions.
  85. OLDCC = gcc
  86.  
  87. # CFLAGS for use with OLDCC, for compiling libgcc1.a.
  88. # NOTE: -O does not work on some Unix systems!
  89. CCLIBFLAGS = -O
  90.  
  91. # Version of ar to use when compiling libgcc1.a.
  92. OLDAR = ar
  93.  
  94. # Target to use when installing include directory.  Either
  95. # install-headers-tar or install-headers-cpio.
  96. INSTALL_HEADERS_DIR = install-headers-tar
  97.  
  98. # The GCC to use for compiling libgcc2.a, enquire, and cross-test.
  99. # Usually the one we just built.
  100. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  101. GCC_FOR_TARGET = gcc
  102.  
  103. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  104. # It omits XCFLAGS, and specifies -B./.
  105. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
  106. GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
  107.  
  108. # Special flags for compiling enquire.
  109. # We disable optimization to make floating point more reliable.
  110. ENQUIRE_CFLAGS = -DNO_MEM -DNO_STDDEF -DNO_LONG_DOUBLE_IO -O0
  111. ENQUIRE_LDFLAGS = $(LDFLAGS)
  112.  
  113. # Tools to use when building a cross-compiler.
  114. # These are used because `configure' appends `cross-make'
  115. # to the makefile when making a cross-compiler.
  116.  
  117. TARGET_TOOLPREFIX = $(tooldir)/bin/
  118. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  119. AR_FOR_TARGET_FLAGS = rc
  120. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  121. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  122.  
  123. # Dir to search for system headers.  Overridden by cross-make.
  124. SYSTEM_HEADER_DIR = /usr/include
  125.  
  126. # Control whether to run fixproto.
  127. STMP_FIXPROTO = st-fixproto
  128.  
  129. # There may be a premade insn-attrtab.c for this machine.
  130. # (You could rebuild it with genattrtab as usual, but it takes a long time.)
  131. # PREMADE_ATTRTAB is the file name of the file to use.
  132. # PREMADE_ATTRTAB_MD is the md file it corresponds to.
  133. PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
  134. PREMADE_ATTRTAB = 
  135.  
  136. target=go32
  137. xmake_file= ... `configure' substitutes actual x- file name here.
  138. tmake_file= ... `configure' substitutes actual t- file name here.
  139. version=2.5.7
  140. mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)\version.c`
  141.  
  142. # Directory where sources are, from where we are.
  143. srcdir = .
  144. # Common prefix for installation directories.
  145. # NOTE: This directory must exist when you start installation.
  146. prefix = /usr/local
  147. # Directory in which to put localized header files. On the systems with
  148. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  149. # `/usr'.
  150. # NOTE: local_prefix *should not* default from prefix.
  151. local_prefix = /usr/local
  152. # Directory in which to put host dependent programs and libraries
  153. exec_prefix = $(prefix)
  154. # Directory in which to put the executable for the command `gcc'
  155. bindir = $(exec_prefix)/bin
  156. # Directory in which to put the directories used by the compiler.
  157. libdir = $(exec_prefix)/lib
  158. # Directory in which the compiler finds executables, libraries, etc.
  159. libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  160. # Directory to search for site-specific includes.
  161. includedir = $(local_prefix)/include
  162. # assertdir is overridden in cross-make.
  163. # (But this currently agrees with what is in cross-make.)
  164. assertdir = $(tooldir)/include
  165. # where the info files go
  166. infodir = $(prefix)/info
  167. # Extension (if any) to put in installed man-page filename.
  168. manext = .1
  169. # Directory in which to put man pages.
  170. mandir = $(prefix)/man/man1
  171. # Directory in which to find other cross-compilation tools and headers.
  172. # Used in install-cross.
  173. tooldir = $(exec_prefix)/$(target)
  174. # Dir for temp files.
  175. tmpdir = /tmp
  176.  
  177. # Additional system libraries to link with.
  178. CLIB=
  179.  
  180. # Change this to a null string if obstacks are installed in the
  181. # system library.
  182. OBSTACK=obstack.o
  183.  
  184. # Specify the rule for actually making libgcc.a,
  185. LIBGCC = libgcc.a
  186. # and the rule for installing it.
  187. INSTALL_LIBGCC = install-libgcc
  188.  
  189. # Specify the rule for actually making libgcc1.a.
  190. # The value may be empty; that means to do absolutely nothing
  191. # with or for libgcc1.a.
  192. LIBGCC1 = libgcc1.a
  193.  
  194. # Specify the rule for making libgcc1.a for a cross-compiler.
  195. # The default rule assumes that libgcc1.a is supplied by the user.
  196. CROSS_LIBGCC1 = libgcc1.cross
  197.  
  198. # Specify the rule for actually making libgcc2.a.
  199. LIBGCC2 = libgcc2.a
  200.  
  201. # Options to use when compiling libgcc2.a.
  202. # -g1 causes output of debug info only for file-scope entities.
  203. # we use this here because that should be enough, and also
  204. # so that -g1 will be tested.
  205. LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1
  206.  
  207. # Additional options to use when compiling libgcc2.a.
  208. # Some targets override this to -Iinclude
  209. LIBGCC2_INCLUDES =
  210.  
  211. # Things which must be built before building libgcc2.a.
  212. # Some targets override this to st-int-hdrs
  213. LIBGCC2_DEPS =
  214.  
  215. # Enquire target (This is a variable so that a target can choose not to
  216. # build it.)
  217. ENQUIRE = enquire
  218.  
  219. # Cross-test target (must also be overridable for a target)
  220. CROSS_TEST = cross-test
  221.  
  222. # List of extra executables that should be compiled for this target machine
  223. # that are used for compiling from source code to object code.
  224. # The rules for compiling them should be in the t-* file for the machine.
  225. EXTRA_PASSES =
  226.  
  227. # Like EXTRA_PASSES, but these are used when linking.
  228. EXTRA_PROGRAMS = 
  229.  
  230. # List of extra object files that should be compiled for this target machine.
  231. # The rules for compiling them should be in the t-* file for the machine.
  232. EXTRA_PARTS =
  233.  
  234. # List of extra object files that should be compiled and linked with
  235. # compiler proper (cc1, cc1obj, cc1plus).
  236. EXTRA_OBJS =
  237.  
  238. # List of additional header files to install.
  239. # Often this is edited directly by `configure'.
  240. EXTRA_HEADERS =
  241.  
  242. # Set this to `ld' to enable use of collect2.
  243. # USE_COLLECT2 =
  244. # It is convenient for configure to add the assignment at the beginning,
  245. # so don't override it here.
  246.  
  247. # List of extra C and assembler files to add to libgcc1.a.
  248. # Assembler files should have names ending in `.asm'.
  249. LIB1FUNCS_EXTRA = 
  250.  
  251. # List of extra C and assembler files to add to libgcc2.a.
  252. # Assembler files should have names ending in `.asm'.
  253. LIB2FUNCS_EXTRA = 
  254.  
  255. # Default float.h source to use for cross-compiler.
  256. CROSS_FLOAT_H=float.h-cross
  257.  
  258. # Program to convert libraries.
  259. LIBCONVERT = 
  260.  
  261. # Control whether header files are installed.
  262. INSTALL_HEADERS=install-headers
  263.  
  264. # Options for tar when copying trees.  So HPUX can override it.
  265. TAROUTOPTS = xpBf
  266.  
  267. # Select which version of fixincludes to use (I.E. regular versus SVR4)
  268. # This value is overridden directly by configure.
  269. FIXINCLUDES=fixincludes
  270.  
  271. # Additional directories of header files to run fixincludes on.
  272. # These should be directories searched automatically by default
  273. # just as /usr/include is.
  274. # *Do not* use this for directories that happen to contain 
  275. # header files, but are not searched automatically by default.
  276. # On most systems, this is empty.
  277. OTHER_FIXINCLUDES_DIRS=
  278.  
  279. # List of things which should already be built whenever we try to use xgcc
  280. # to compile anything (without linking).
  281. GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
  282.  
  283. # List of things which should already be built whenever we try to use xgcc
  284. # to link anything.
  285. GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  286.  
  287. # Directory to link to, when using the target `maketest'.
  288. DIR = ../gcc
  289.  
  290. # Guaranteed to not exist when not passing md through cpp.
  291. MD_FILE = md-cpp-not-used
  292.  
  293. # Flags to use when cross-building GCC.
  294. # Prefix to apply to names of object files when using them
  295. # to run on the machine we are compiling on.
  296. HOST_PREFIX=
  297. # Prefix to apply to names of object files when compiling them
  298. # to run on the machine we are compiling on.
  299. # The default for this variable is chosen to keep these rules 
  300. # out of the way of the other rules for compiling the same source files.
  301. HOST_PREFIX_1=loser-
  302. HOST_CC=$(CC)
  303. HOST_CFLAGS=$(ALL_CFLAGS)
  304. HOST_CLIB=$(CLIB)
  305. HOST_LDFLAGS=$(LDFLAGS)
  306. HOST_CPPFLAGS=$(ALL_CPPFLAGS)
  307. HOST_ALLOCA=$(ALLOCA)
  308. HOST_MALLOC=$(MALLOC)
  309. HOST_OBSTACK=$(OBSTACK)
  310.  
  311. # Choose the real default target.
  312. ALL=all.internal
  313.  
  314. # Choose the real install target.
  315. INSTALL_TARGET=install-normal
  316.  
  317. # Source for float.h.  Overridden by cross-make.
  318. FLOAT_H=float.h-nat
  319.  
  320. # End of variables for you to override.
  321.  
  322. # Definition of `all' is here so that new rules inserted by sed
  323. # do not specify the default target.
  324. # The real definition is under `all.internal' (for native compilers)
  325. # or `all.cross' (for cross compilers).
  326. all: all.indirect
  327.  
  328. # This tells GNU Make version 3 not to put all variables in the environment.
  329. .NOEXPORT:
  330.  
  331. # sed inserts variable overrides after the following line.
  332. ####target overrides
  333. ####host overrides
  334. ####cross overrides
  335. ####build overrides
  336.  
  337. # Now figure out from those variables how to compile and link.
  338.  
  339. all.indirect: $(ALL)
  340.  
  341. # IN_GCC tells obstack.h to use gstddef.h.
  342. INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
  343.  
  344. # This is the variable actually used when we compile.
  345. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
  346.  
  347. # Likewise.
  348. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
  349.  
  350. # Even if ALLOCA is set, don't use it if compiling with GCC.
  351. # USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac `
  352. # USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
  353. # USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
  354. USE_HOST_OBSTACK=obstack.o
  355. # USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
  356.  
  357. # Dependency on obstack, alloca, malloc or whatever library facilities
  358. # are not installed in the system libraries.
  359. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  360. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  361.  
  362. # Likewise, for use in the tools that must run on this machine
  363. # even if we are cross-building GCC.
  364. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  365. HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
  366.  
  367. # How to link with both our special library facilities
  368. # and the system's installed libraries.
  369. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
  370.  
  371. # Likewise, for use in the tools that must run on this machine
  372. # even if we are cross-building GCC.
  373. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
  374.         $(HOST_CLIB)
  375.  
  376. HOST_RTL = $(HOST_PREFIX)rtl.o
  377. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  378. HOST_PRINT = $(HOST_PREFIX)print-rtl.o
  379.  
  380. # Specify the directories to be searched for header files.
  381. # Both . and srcdir are used, in that order,
  382. # so that tm.h and config.h will be found in the compilation
  383. # subdirectory rather than in the source directory.
  384. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  385. SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
  386.  
  387. # Always use -I$(srcdir)/config when compiling.
  388. .c.o:
  389.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  390.  
  391. # This tells GNU make version 3 not to export all the variables
  392. # defined in this file into the environment.
  393. .NOEXPORT:
  394.  
  395. # Lists of files for various purposes.
  396.  
  397. # A list of all the language-specific executables.
  398. COMPILERS = cc1 cc1plus cc1obj
  399.  
  400. # Language-specific object files for C.
  401. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  402.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  403.  
  404. # Language-specific object files for Objective C.
  405. OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
  406.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  407.  
  408. # Language-specific object files for C++.
  409. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  410.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  411.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  412.    cp-class.o cp-init.o cp-method.o cp-except.o \
  413.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  414.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  415.  
  416. # Files specific to the C interpreter bytecode compiler(s).
  417. BC_OBJS = bc-emit.o bc-optab.o
  418.  
  419. # Language-independent object files.
  420. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  421.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  422.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  423.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  424.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  425.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  426.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  427.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  428.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  429.  
  430. # GEN files are listed separately, so they can be built before doing parallel
  431. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  432. #  them before rtl.o is compiled.
  433. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  434.  
  435. # Files to be copied away after each stage in building.
  436. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  437.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  438.  insn-attr.h insn-attrtab.c insn-opinit.c \
  439.  s-flags s-config s-codes \
  440.  s-output s-recog s-emit s-extract s-peep \
  441.  s-attr s-attrtab s-opinit s-proto \
  442.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  443.  genattrtab genattr genopinit \
  444.  bc-arity.h bc-opcode.h bc-opname.h \
  445.  s-bcarity s-bcopcode s-bcopname \
  446.  bi-arity bi-opcode bi-opname \
  447.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  448.  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
  449.  
  450. # Members of libgcc1.a.
  451. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  452.    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
  453.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  454.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  455.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  456.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  457.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  458.  
  459. # Library members defined in libgcc2.c.
  460. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  461.      _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _ffsdi2 \
  462.     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  463.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  464.     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
  465.     _fixtfdi _fixunstfdi _floatditf \
  466.     __gcc_bcmp _varargs _eprintf _op_new _new_handler _op_delete \
  467.     _bb _shtab _clear_cache _trampoline __main _exit _ctors
  468.  
  469. # Header files that are made available under the same name
  470. # to programs compiled with GCC.
  471. USER_H = va-alpha.h va-h8300.h va-i860.h va-i960.h va-mips.h va-m88k.h \
  472.     va-pa.h va-pyr.h va-sparc.h va-clipper.h va-spur.h proto.h $(EXTRA_HEADERS)
  473.  
  474. # The files that "belong" in CONFIG_H are deliberately omitted
  475. # because having them there would not be useful in actual practice.
  476. # All they would do is cause complete recompilation every time
  477. # one of the machine description files is edited.
  478. # That may or may not be what one wants to do.
  479. # If it is, rm *.o is an easy way to do it.
  480. # CONFIG_H = config.h tm.h
  481. CONFIG_H =
  482. RTL_H = rtl.h rtl.def machmode.h machmode.def
  483. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  484. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  485. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  486.  
  487. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
  488. .SUFFIXES: .in .def
  489.  
  490. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
  491.    $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file)
  492.     sh config.status
  493.  
  494. all.internal: start.encap rest.encap
  495. # This is what to compile if making a cross-compiler.
  496. # Note that we can compile enquire using the cross-compiler just build,
  497. # although we can't run it on this machine.
  498. all.cross: native gcc-cross g++-cross specs $(LIBGCC) st-headers $(STMP_FIXPROTO) $(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS)
  499. # This is what to compile if making gcc with a cross-compiler.
  500. all.build: native xgcc g++ $(EXTRA_PARTS)
  501. # This is what must be made before installing GCC and converting libraries.
  502. start.encap: native xgcc g++ specs $(LIBGCC1) xlimits.h
  503. # Use this to make a GCC that will be used only to recompile GCC.
  504. for-bootstrap: start.encap $(LIBGCC)
  505. # These can't be made, with COFF encapsulation, until after GCC can run.
  506. rest.encap: $(LIBGCC) st-headers $(STMP_FIXPROTO) $(EXTRA_PARTS)
  507. # This is what is made with the host's compiler
  508. # whether making a cross compiler or not.
  509. native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
  510.  
  511. # Define the names for selecting languages in LANGUAGES.
  512. # Note that it would be nice to move the dependency on g++
  513. # into the C++ rule, but that needs a little bit of work
  514. # to do the right thing within all.cross.
  515. C c: cc1
  516. C++ c++: cc1plus
  517. # The next two ought to depend on objc-runtime, but that doesn't work yet.
  518. OBJC objc: cc1obj
  519. OBJECTIVE-C objective-c: cc1obj
  520. PROTO: proto
  521.  
  522. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  523. # a target to build even if it is up-to-date.  So we must verify that
  524. # config.status does not exist before failing.
  525. config.status:
  526.     @if [ ! -f config.status ] ; then \
  527.       echo You must configure gcc.  Look at the INSTALL file for details.; \
  528.       false; \
  529.     else \
  530.       true; \
  531.     fi
  532.  
  533. # On the target machine, finish building a cross compiler.
  534. # This does the things that can't be done on the host machine.
  535. rest.cross: $(LIBGCC) gfloat.h specs
  536.  
  537. # Verify that it works to compile and link cross-test.
  538. # If it does, then there are sufficient replacements for libgcc1.a.
  539. cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS)
  540.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
  541. cross-test.o: cross-test.c native gcc-cross
  542.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
  543.  
  544. # Recompile all the language-independent object files.
  545. # This is used only if the user explicitly asks for it.
  546. compilations: ${OBJS}
  547.  
  548. # We call this executable `xgcc' rather than `gcc'
  549. # to avoid confusion if the current directory is in the path
  550. # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
  551. xgcc: gcc.o version.o $(LIBDEPS)
  552.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgcc gcc.o version.o $(LIBS)
  553.  
  554. # Dump a specs file to make -B./ read these specs over installed ones.
  555. specs: xgcc
  556.     $(GCC_FOR_TARGET) -dumpspecs > specs
  557.  
  558. # Create the compiler driver for g++.
  559. g++: g++.o $(LIBDEPS)
  560.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o g++ g++.o $(LIBS)
  561.  
  562. # We do want to create an executable named `xgcc', so we can use it to
  563. # compile libgcc2.a.
  564. # Also create gcc-cross, so that install-common will install properly.
  565. gcc-cross: xgcc
  566.     cp xgcc gcc-cross
  567.  
  568. # Create a version of the g++ driver which calls the cross-compiler.
  569. g++-cross: $(srcdir)/g++.c
  570.     $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
  571.        -DGCC_NAME=\"$(target)-gcc\" $(srcdir)/g++.c version.o $(LIBS)
  572.  
  573. cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  574.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  575.  
  576. cc1plus: $(P) $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  577.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(BC_OBJS) $(OBJS) $(LIBS)
  578.  
  579. cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  580.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  581.  
  582. # Copy float.h from its source.
  583. gfloat.h: $(FLOAT_H)
  584.     cp $(FLOAT_H) gfloat.h
  585.  
  586. # Create float.h source for the native machine.
  587. float.h-nat: enquire
  588.     -./enquire -f > t-float.h
  589.     mv t-float.h float.h-nat
  590.  
  591. # Create a dummy float.h source for a cross-compiler.
  592. float.h-cross:
  593.     echo "#error float.h values not known for cross-compiler" > float.h-cross
  594.  
  595. # Used to compile enquire with standard cc, but have forgotten why.
  596. # Let's try with GCC.
  597. enquire: enquire.o 
  598.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
  599. enquire.o: $(srcdir)/enquire.c 
  600. #    -if [ "$(srcdir)" != "." ]; then rm -f ./enquire.c; else true; fi
  601. #    -cp $(srcdir)/enquire.c . > /dev/null 2>&1
  602. # Breaking this line caused a problem with one version of GNU make.
  603.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
  604.  
  605. # Build the version of limits.h that we will install.
  606. xlimits.h: glimits.h limitx.h limity.h
  607.     if [ -f $(SYSTEM_HEADER_DIR)/limits.h ] ; then \
  608.       cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > xlimits.h; \
  609.     else \
  610.       cat $(srcdir)/glimits.h > xlimits.h; \
  611.     fi
  612.  
  613. # Build libgcc.a.
  614. # This is done in two parts because some functions, in libgcc1.c,
  615. # must be compiled with something other than GCC,
  616. # while the rest, in libgcc2.c, must be compiled with xgcc.
  617. # That means we can't do libgcc2.c until after xgcc, cc1, etc.
  618.  
  619. # Use this as value of LIBGCC1 to cause conversion to GNU library format.
  620. # LIBCONVERT should put its output in libgcc1.conv.
  621. libgcc1.conv: libgcc1.a
  622.     $(LIBCONVERT) libgcc1.a libgcc1.conv
  623.  
  624. # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
  625. # Make an empty file instead.
  626. libgcc1.null: $(GCC_PASSES)
  627.     echo "__foo () {}" > dummy.c
  628.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
  629.     $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
  630.     rm -f dummy.o dummy.c
  631.  
  632. # This is $(LIBGCC1) for a cross-compiler.
  633. # We have no automatic way of building libgcc1.a, 
  634. # so it's up to the installer to find a way to do that.
  635. # This rule deliberately does not depend on libgcc1.a
  636. # so that it will fail if the installer hasn't provided it.
  637. libgcc1.cross:
  638.     mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
  639.  
  640. # Compile the library of arithmetic subroutines with the native compiler.
  641. # Don't compile it with GCC!
  642. # (That would cause most arithmetic functions to call themselves.)
  643. libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
  644.     -rm -f tmplibgcc1.a
  645. # Actually build it in tmplibgcc1.a, then rename at end,
  646. # so that libgcc1.a itself remains nonexistent if compilation is aborted.
  647. # -e causes any failing command to make this rule fail.
  648. # -e doesn't work in certain shells, so we test $$? as well.
  649. # lynx has a broken ar, it always complains when the initial library is
  650. # empty, thus this command works only if we don't do -e
  651. # There is a trailing backslash (\) deleted from the following line.
  652. #    set -e;
  653.     for name in $(LIB1FUNCS); \
  654.     do \
  655.       echo $${name}; \
  656.       rm -f $${name}.o; \
  657.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
  658.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  659.       mv libgcc1.o $${name}.o; \
  660.       $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
  661.       rm -f $${name}.o; \
  662.     done
  663. # Some shells crash when a loop has no items.
  664. # So make sure there is always at least one--`..'.
  665. # Then ignore it.
  666. # We don't use -e here because there are if statements
  667. # that should not make the command give up when the if condition is false.
  668. # Instead, we test for failure after each command where it matters.
  669.     -for file in .. $(LIB1FUNCS_EXTRA); \
  670.     do \
  671.       if [ x$${file} != x.. ]; then \
  672.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  673.         echo $${name}; \
  674.         if [ $${name}.asm = $${file} ]; then \
  675.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  676.         else true; fi; \
  677.         $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  678.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  679.         $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
  680.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  681.         rm -f $${name}.[so]; \
  682.       else true; \
  683.       fi; \
  684.     done
  685.     mv tmplibgcc1.a libgcc1.a
  686.  
  687. # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
  688. # But recompiling cc1 should not force recompilation of libgcc2.a.
  689. # If you want to force recompilation, delete libgcc2.a.
  690. libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS)
  691.     -if [ -f libgcc2.ready ] ; then \
  692.         true; \
  693.     else \
  694.         touch libgcc2.ready; \
  695.     fi
  696.  
  697. libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
  698.    machmode.h longlong.h gbl-ctors.h config.status
  699. # Actually build it in tmplibgcc2.a, then rename at end,
  700. # so that libgcc2.a itself remains nonexistent if compilation is aborted.
  701.     -rm -f tmplibgcc2.a
  702. # -e causes any failing command to make this rule fail.
  703. # -e doesn't work in certain shells, so we test $$? as well.
  704. # lynx has a broken ar, it always complains when the initial library is
  705. # empty, thus this command works only if we don't do -e
  706. # There is a trailing backslash (\) deleted from the following line.
  707. #    set -e;
  708.     for name in $(LIB2FUNCS); \
  709.     do \
  710.       echo $${name}; \
  711.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  712.           $(srcdir)/libgcc2.c -o $${name}.o; \
  713.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  714.       $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
  715.       rm -f $${name}.o; \
  716.     done
  717. # Some shells crash when a loop has no items.
  718. # So make sure there is always at least one--`..'.
  719. # Then ignore it.
  720. # We don't use -e here because there are if statements
  721. # that should not make the command give up when the if condition is false.
  722. # Instead, we test for failure after each command where it matters.
  723.     -for file in .. $(LIB2FUNCS_EXTRA); \
  724.     do \
  725.       if [ x$${file} != x.. ]; then \
  726.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  727.         echo $${name}; \
  728.         if [ $${name}.asm = $${file} ]; then \
  729.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  730.         else true; fi; \
  731.         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  732.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  733.         $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
  734.         rm -f $${name}.[so]; \
  735.       else true; \
  736.       fi; \
  737.     done
  738.     mv tmplibgcc2.a libgcc2.a
  739. # These lines were deleted from above the mv command
  740. # because ranlibing libgcc.a itself should suffice.
  741. #    -if [ x${HPUX_GAS} = x ] ; then \
  742. #      if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
  743. #    else true; fi
  744.  
  745. # Combine the various libraries into a single library, libgcc.a.
  746. libgcc.a: $(LIBGCC1) $(LIBGCC2)
  747.     -rm -rf tmplibgcc.a libgcc.a tmpcopy
  748.     mkdir tmpcopy
  749.     -if [ x$(LIBGCC1) != x ];            \
  750.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  751.     else true;                    \
  752.     fi
  753. # Some versions of ar (specifically the one in RISC/os 5.x), create an
  754. # unwritable table of contents file, and then print an error message when
  755. # the second ar command tries to overwrite this file.  To avoid the error
  756. # message from ar, we make sure all files are writable.
  757.     (cd tmpcopy; chmod +w * > /dev/null 2>&1)
  758.     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  759.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  760.     rm -rf tmpcopy
  761.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  762. # Actually build it in tmplibgcc.a, then rename at end,
  763. # so that libgcc.a itself remains nonexistent if compilation is aborted.
  764.     mv tmplibgcc.a libgcc.a
  765.  
  766. objc-runtime: libobjc.a
  767.  
  768. # Build the Objective C runtime library.
  769. libobjc.a: cc1obj libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
  770.     if [ -d objc ]; then true; else mkdir objc; fi
  771.     thisdir1=`pwd`; \
  772.     srcdir1=`cd $(srcdir); pwd`; \
  773.     cd objc; \
  774.     $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  775.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  776.       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  777.       GCC_CFLAGS="$(GCC_CFLAGS)"
  778.     -rm -f libobjc.a
  779.     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  780.     -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  781.  
  782. # This is used by objc/Makefile if the user runs that directly.
  783. sublibobjc.a: cc1obj libgcc2.ready
  784.     thisdir1=`pwd`; \
  785.     srcdir1=`cd $(srcdir); pwd`; \
  786.     cd objc; \
  787.     $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  788.       srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  789.       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  790.       GCC_CFLAGS="$(GCC_CFLAGS)"
  791.  
  792. # Compile two additional files that are linked with every program
  793. # linked using GCC on system V, for the sake of C++ constructors.
  794. crtbegin.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  795.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \
  796.       -finhibit-size-directive -fno-inline-functions \
  797.       -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o
  798.  
  799. crtend.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  800.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \
  801.       -finhibit-size-directive -fno-inline-functions \
  802.       -g0 -c $(srcdir)/crtstuff.c -o crtend.o
  803.  
  804. # Compiling object files from source files.
  805.  
  806. # Note that dependencies on obstack.h are not written
  807. # because that file is not part of GCC.
  808. # Dependencies on gvarargs.h are not written
  809. # because all that file does, when not compiling with GCC,
  810. # is include the system varargs.h.
  811.  
  812. # C language specific files.
  813.  
  814. c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-parse.h \
  815.     c-tree.h input.h flags.h
  816.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
  817. $(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
  818.      $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  819. $(srcdir)/c-parse.y: $(srcdir)/c-parse.in
  820.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  821.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  822.       $(srcdir)/c-parse.in > $(srcdir)/c-parse.y
  823.  
  824. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  825. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  826. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  827. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  828.     input.h flags.h
  829. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  830. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  831. c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H)
  832. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  833.  
  834. # C++ language specific files.
  835.  
  836. cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  837.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  838.   cp-parse.c
  839.  
  840. $(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
  841.     @echo expect 27 shift/reduce conflicts and 14 reduce/reduce conflicts
  842.      $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  843.      grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  844.  
  845. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  846.    $(srcdir)/cp-parse.h flags.h cp-lex.h
  847. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  848.    $(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h cp-hash.h cp-lex.h
  849. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  850.   cp-lex.h cp-decl.h stack.h
  851. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  852.   cp-lex.h cp-decl.h
  853. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  854. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  855. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  856. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  857. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  858. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  859. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  860. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  861. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  862. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  863. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  864. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  865. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  866.   expr.h insn-codes.h
  867. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  868. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H) input.h
  869. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  870. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  871. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  872.  
  873. g++.o : g++.c $(CONFIG_H) gvarargs.h
  874.  
  875. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  876. ld: collect2
  877.     rm -f ld
  878.     ln collect2 ld
  879.  
  880. collect2 : collect2.o version.o $(LIBDEPS)
  881. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  882.     -rm -f collect2
  883.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
  884.  
  885. collect2.o : collect2.c $(CONFIG_H) gstab.h
  886.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
  887.     -DTARGET_MACHINE=\"$(target)\" \
  888.     -c collect2.c
  889.  
  890. # Objective C language specific files.
  891.  
  892. objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  893.    c-tree.h input.h flags.h objc-act.h
  894.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
  895. $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
  896.      $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
  897. $(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
  898.     sed -e "/^ifc$$/,/^end ifc$$/d" \
  899.       -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
  900.       $(srcdir)/c-parse.in > $(srcdir)/objc-parse.y
  901.  
  902. objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
  903.    flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
  904.  
  905. # A file used by all variants of C.
  906.  
  907. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  908.  
  909. # Language-independent files.
  910.  
  911. gcc.o: gcc.c $(CONFIG_H) gvarargs.h 
  912.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  913.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  914.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  915.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  916.   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  917.   -DTOOLDIR=\"$(tooldir)/\" \
  918.   $(MAYBE_TARGET_DEFAULT) \
  919.   -c gcc.c
  920.  
  921. dumpvers: dumpvers.c
  922.  
  923. version.o: version.c
  924. obstack.o: obstack.c
  925.  
  926. convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
  927.  
  928. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  929. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  930. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  931. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  932. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  933.    insn-attr.h xcoffout.h defaults.h
  934.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  935.       $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
  936.       -c toplev.c
  937.  
  938. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  939.  
  940. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  941. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  942.  
  943. toplev.o: bytecode.h bc-emit.h
  944. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
  945.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  946. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  947.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  948.    recog.h output.h bytecode.h
  949. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  950.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  951.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  952.    bc-emit.h
  953. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  954.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  955.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  956.    bc-emit.h modemap.def
  957. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  958.    insn-flags.h gvarargs.h 
  959. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  960.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  961. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  962.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  963. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  964.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
  965. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  966.    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
  967. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  968.    insn-config.h reload.h
  969. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  970.    insn-config.h reload.h output.h defaults.h
  971. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  972. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h gvarargs.h \
  973.    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
  974.    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  975. real.o : real.c $(CONFIG_H) $(TREE_H)
  976. getpwd.o : getpwd.c $(CONFIG_H)
  977.  
  978. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  979.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  980.    bytecode.h
  981.  
  982. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  983.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  984. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  985.  
  986. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  987.    insn-config.h recog.h
  988. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  989.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  990. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  991.    integrate.h regs.h flags.h expr.h loop.h
  992. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  993.    basic-block.h regs.h hard-reg-set.h output.h
  994. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  995.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  996.    basic-block.h recog.h real.h hard-reg-set.h
  997. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  998.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  999. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  1000.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  1001. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  1002.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  1003.  
  1004. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  1005.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  1006. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  1007.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  1008.    basic-block.h recog.h output.h
  1009. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  1010.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  1011. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  1012.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  1013.    flags.h output.h
  1014. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  1015.    flags.h insn-config.h insn-attr.h
  1016. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  1017.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  1018.    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
  1019. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  1020.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  1021.    insn-flags.h insn-codes.h real.h
  1022. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  1023.    regs.h hard-reg-set.h flags.h insn-config.h
  1024.  
  1025. aux-output.o : aux-output.c $(CONFIG_H) \
  1026.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  1027.    insn-flags.h output.h insn-attr.h insn-codes.h
  1028.  
  1029. # Build auxiliary files that support ecoff format.
  1030. mips-tfile: mips-tfile.o version.o $(LIBDEPS)
  1031.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tfile mips-tfile.o version.o $(LIBS)
  1032.  
  1033. mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
  1034.  
  1035. mips-tdump: mips-tdump.o version.o $(LIBDEPS)
  1036.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tdump mips-tdump.o version.o $(LIBS)
  1037.  
  1038. mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
  1039.  
  1040. # Normally this target is not used; but it is used if you
  1041. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  1042. # from the GNU Emacs distribution.
  1043. alloca.o:    alloca.c
  1044.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  1045.       -c alloca.c
  1046.     $(ALLOCA_FINISH)
  1047.  
  1048. # Generate header and source files from the machine description, 
  1049. # and compile them.
  1050.  
  1051. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  1052.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  1053.   insn-attr.h insn-attrtab.c
  1054.  
  1055. # The following pair of rules has this effect:
  1056. # genconfig is run only if the md has changed since genconfig was last run;
  1057. # but the file insn-config.h is touched only when its contents actually change.
  1058.  
  1059. # Each of the other insn-* files is handled by a similar pair of rules.
  1060.  
  1061. # This causes an anomaly in the results of make -n
  1062. # because insn-* is older than s-*
  1063. # and thus make -n thinks that insn-* will be updated
  1064. # and force recompilation of things that depend on it.
  1065. # We use move-if-change precisely to avoid such recompilation.
  1066. # But there is no way to teach make -n that it will be avoided.
  1067.  
  1068. # Each of the insn-*.[ch] rules has a semicolon at the end,
  1069. # for otherwise the system Make on SunOS 4.1 never tries
  1070. # to recompile insn-*.o.  To avoid problems and extra noise from
  1071. # versions of make which don't like empty commands (nothing after the
  1072. # trailing `;'), we call true for each.
  1073.  
  1074. insn-config.h: s-config 
  1075. s-config : md genconfig $(srcdir)/move-if-change
  1076.     go32 genconfig md > t-config.h
  1077.     update t-config.h insn-config.h
  1078.     touch s-config
  1079.  
  1080. insn-flags.h: s-flags 
  1081. s-flags : md genflags $(srcdir)/move-if-change
  1082.     go32 genflags md > t-flags.h
  1083.     update t-flags.h insn-flags.h
  1084.     touch s-flags
  1085.  
  1086. insn-codes.h: s-codes 
  1087. s-codes : md gencodes $(srcdir)/move-if-change
  1088.     go32 gencodes md > t-codes.h
  1089.     update t-codes.h insn-codes.h
  1090.     touch s-codes
  1091.  
  1092. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  1093.   insn-config.h insn-flags.h insn-codes.h
  1094.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
  1095.  
  1096. insn-emit.c: s-emit 
  1097. s-emit : md genemit $(srcdir)/move-if-change
  1098.     go32 genemit md > t-emit.c
  1099.     update t-emit.c insn-emit.c
  1100.     touch s-emit
  1101.  
  1102. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  1103.   real.h output.h flags.h
  1104.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
  1105.  
  1106. insn-recog.c: s-recog 
  1107. s-recog : md genrecog $(srcdir)/move-if-change
  1108.     go32 genrecog md > t-recog.c
  1109.     update t-recog.c insn-recog.c
  1110.     touch s-recog
  1111.  
  1112. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  1113.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  1114.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
  1115.  
  1116. insn-opinit.c: s-opinit 
  1117. s-opinit : md genopinit $(srcdir)/move-if-change
  1118.     go32 genopinit md > t-opinit.c
  1119.     update t-opinit.c insn-opinit.c
  1120.     touch s-opinit
  1121.  
  1122. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  1123.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
  1124.  
  1125. insn-extract.c: s-extract 
  1126. s-extract : md genextract $(srcdir)/move-if-change
  1127.     go32 genextract md > t-extract.c
  1128.     update t-extract.c insn-extract.c
  1129.     touch s-extract
  1130.  
  1131. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  1132.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
  1133.  
  1134. insn-peep.c: s-peep 
  1135. s-peep : md genpeep $(srcdir)/move-if-change
  1136.     go32 genpeep md > t-peep.c
  1137.     update t-peep.c insn-peep.c
  1138.     touch s-peep
  1139.  
  1140. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  1141.      insn-attr.h insn-config.h
  1142.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  1143.  
  1144. insn-attr.h: s-attr 
  1145. s-attr : md genattr $(srcdir)/move-if-change
  1146.     go32 genattr md > t-attr.h
  1147.     update t-attr.h insn-attr.h
  1148.     touch s-attr
  1149.  
  1150. insn-attrtab.c: s-attrtab 
  1151. s-attrtab : md genattrtab $(srcdir)/move-if-change
  1152.       go32 genattrtab md > t-attrtab.c
  1153.     update t-attrtab.c insn-attrtab.c
  1154.     touch s-attrtab
  1155.  
  1156. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  1157.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  1158.     insn-codes.h
  1159.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
  1160.  
  1161. insn-output.c: s-output 
  1162. s-output : md genoutput $(srcdir)/move-if-change
  1163.     go32 genoutput md > t-output.c
  1164.     update t-output.c insn-output.c
  1165.     touch s-output
  1166.  
  1167. # Compile the programs that generate insn-* from the machine description.
  1168. # They are compiled with $(HOST_CC), and associated libraries,
  1169. # since they need to run on this machine
  1170. # even if GCC is being compiled to run on some other machine.
  1171.  
  1172. # $(CONFIG_H) is omitted from the deps of the gen*.o
  1173. # because these programs don't really depend on anything 
  1174. # about the target machine.  They do depend on config.h itself,
  1175. # since that describes the host machine.
  1176.  
  1177. # Pass the md file through cpp if the target requests it.
  1178. $(MD_FILE): $(CPP_MD)
  1179.     -if [ -f md.pre-cpp ]; then \
  1180.       rm -f md ; ./cpp $(CPP_MD_FLAGS) md.pre-cpp | sed 's/^# /; /g' > md ; \
  1181.     else true ; \
  1182.     fi
  1183.  
  1184. genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  1185.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
  1186.       genconfig.o $(HOST_RTL) $(HOST_LIBS)
  1187.  
  1188. genconfig.o : genconfig.c $(RTL_H) hconfig.h
  1189.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
  1190.  
  1191. genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  1192.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
  1193.      genflags.o $(HOST_RTL) $(HOST_LIBS)
  1194.  
  1195. genflags.o : genflags.c $(RTL_H) hconfig.h
  1196.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
  1197.  
  1198. gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  1199.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
  1200.      gencodes.o $(HOST_RTL) $(HOST_LIBS)
  1201.  
  1202. gencodes.o : gencodes.c $(RTL_H) hconfig.h
  1203.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
  1204.  
  1205. genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1206.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
  1207.      genemit.o $(HOST_RTL) $(HOST_LIBS)
  1208.  
  1209. genemit.o : genemit.c $(RTL_H) hconfig.h
  1210.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
  1211.  
  1212. genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1213.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \
  1214.      genopinit.o $(HOST_RTL) $(HOST_LIBS)
  1215.  
  1216. genopinit.o : genopinit.c $(RTL_H) hconfig.h
  1217.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
  1218.  
  1219. genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  1220.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
  1221.      genrecog.o $(HOST_RTL) $(HOST_LIBS)
  1222.  
  1223. genrecog.o : genrecog.c $(RTL_H) hconfig.h
  1224.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
  1225.  
  1226. genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  1227.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
  1228.      genextract.o $(HOST_RTL) $(HOST_LIBS)
  1229.  
  1230. genextract.o : genextract.c $(RTL_H) hconfig.h insn-config.h
  1231.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
  1232.  
  1233. genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  1234.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
  1235.      genpeep.o $(HOST_RTL) $(HOST_LIBS)
  1236.  
  1237. genpeep.o : genpeep.c $(RTL_H) hconfig.h
  1238.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
  1239.  
  1240. genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  1241.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
  1242.      genattr.o $(HOST_RTL) $(HOST_LIBS)
  1243.  
  1244. genattr.o : genattr.c $(RTL_H) hconfig.h
  1245.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
  1246.  
  1247. genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  1248.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
  1249.      genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
  1250.  
  1251. genattrtab.o : genattrtab.c $(RTL_H) hconfig.h insn-config.h
  1252.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
  1253.  
  1254. genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  1255.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
  1256.      genoutput.o $(HOST_RTL) $(HOST_LIBS)
  1257.  
  1258. genoutput.o : genoutput.c $(RTL_H) hconfig.h
  1259.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
  1260.  
  1261. # Compile the libraries to be used by gen*.
  1262. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  1263. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  1264. # with the rules for rtl.o, alloca.o, etc.
  1265. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  1266.     rm -f $(HOST_PREFIX)rtl.c
  1267.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
  1268.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  1269.  
  1270. $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
  1271.     rm -f $(HOST_PREFIX)print-rtl.c
  1272.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
  1273.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
  1274.  
  1275. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  1276.     rm -f $(HOST_PREFIX)rtlanal.c
  1277.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
  1278.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  1279.  
  1280. $(HOST_PREFIX_1)alloca.o: alloca.c
  1281.     rm -f $(HOST_PREFIX)alloca.c
  1282.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  1283.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  1284.  
  1285. $(HOST_PREFIX_1)obstack.o: obstack.c
  1286.     rm -f $(HOST_PREFIX)obstack.c
  1287.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
  1288.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  1289.  
  1290. $(HOST_PREFIX_1)malloc.o: malloc.c
  1291.     rm -f $(HOST_PREFIX)malloc.c
  1292.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
  1293.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  1294.  
  1295. # This satisfies the dependency that we get if you cross-compile a compiler
  1296. # that does not need to compile alloca, malloc or whatever.
  1297. $(HOST_PREFIX_1): 
  1298.     touch $(HOST_PREFIX_1)
  1299.  
  1300. # Remake bytecode files.
  1301. # BI_ALL=bi-run.o
  1302. BI_ALL=
  1303. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  1304. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  1305.  
  1306.  
  1307. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  1308.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  1309. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  1310.         bc-opcode.h bc-typecd.h bc-typecd.def
  1311.  
  1312.  
  1313. bytecode: $(BI_ALL) $(BC_ALL)
  1314.  
  1315. bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  1316.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  1317.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  1318. bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  1319.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  1320.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  1321. bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  1322.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  1323.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  1324.  
  1325. bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  1326.   bc-opname.h bc-arity.h bc-opcode.h
  1327.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/bi-run.c
  1328. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  1329.      $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  1330. bi-parser.o:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  1331.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1332.        $(srcdir)/bi-parser.c
  1333. bi-lexer.o:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  1334.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1335.        $(srcdir)/bi-lexer.c
  1336. bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  1337.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1338.        $(srcdir)/bi-arity.c
  1339. bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  1340.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1341.        $(srcdir)/bi-opcode.c
  1342. bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  1343.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1344.        $(srcdir)/bi-opname.c
  1345. bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h
  1346.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1347.        $(srcdir)/bi-reverse.c
  1348.  
  1349.  
  1350. bc-arity.h: s-bcarity 
  1351. s-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  1352.     go32 bi-arity < $(srcdir)\bytecode.def >t-bc-arity.h
  1353.     update t-bc-arity.h bc-arity.h
  1354.     touch s-bcarity
  1355.  
  1356. bc-opcode.h: s-bcopcode 
  1357. s-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  1358.     go32 bi-opcode < $(srcdir)\bytecode.def >t-bcopcd.h
  1359.     update t-bcopcd.h bc-opcode.h
  1360.     touch s-bcopcode
  1361.  
  1362. bc-opname.h: s-bcopname 
  1363. s-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  1364.     go32 bi-opname < $(srcdir)\bytecode.def >t-bcopnm.h
  1365.     update t-bcopnm.h bc-opname.h
  1366.     touch s-bcopname
  1367.  
  1368. bytecode.mostlyclean:
  1369.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  1370.  
  1371. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  1372.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  1373.  
  1374. bytecode.realclean: bytecode.clean
  1375.     -rm -f bi-parser.c bi-parser.h
  1376.  
  1377.  
  1378. # Remake cpp and protoize.
  1379.  
  1380. # Making the preprocessor
  1381. cpp: cccp
  1382.     -rm -f cpp
  1383.     ln cccp cpp
  1384. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  1385.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  1386. cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  1387.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
  1388. $(srcdir)/cexp.c: $(srcdir)/cexp.y
  1389.      $(BISON) -o cexp.c cexp.y
  1390. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c 
  1391. # The reason we use $(libdir)/g++-include rather than using libsubdir
  1392. # is for compatibility with the current version of libg++.
  1393.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1394.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1395.       -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1396.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1397.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1398.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1399.       -DTOOLDIR=\"$(tooldir)/\" \
  1400.       -c cccp.c
  1401.  
  1402. # Note for the stamp targets, we run the program `true' instead of
  1403. # having an empty command (nothing following the semicolon).
  1404.  
  1405. proto: config.status protoize unprotoize SYSCALLS.c.X
  1406.  
  1407. protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1408.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1409.       protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
  1410. protoize.o: s-proto 
  1411.  
  1412. unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1413.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1414.       unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
  1415. unprotoize.o:    s-proto 
  1416.  
  1417. s-proto:    $(srcdir)/protoize.c getopt.h $(CONFIG_H)
  1418.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1419.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1420.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1421.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1422.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1423.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1424.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1425.       -DUNPROTOIZE $(srcdir)/protoize.c
  1426.     mv protoize.o unprotoize.o
  1427.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1428.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1429.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1430.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1431.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1432.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1433.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1434.       $(srcdir)/protoize.c
  1435.     touch s-proto
  1436.  
  1437. getopt.o: $(srcdir)/getopt.c getopt.h
  1438.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
  1439. getopt1.o: $(srcdir)/getopt1.c getopt.h
  1440.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
  1441.  
  1442. # This info describes the target machine, so compile with GCC just built.
  1443. SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
  1444.     -rm -f SYSCALLS.c t-SYSCALLS.s
  1445.     cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
  1446.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1447.       -aux-info $@ -S -o t-SYSCALLS.s SYSCALLS.c
  1448.     -rm -f SYSCALLS.c t-SYSCALLS.s
  1449.  
  1450.  
  1451. test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
  1452.     -rm -f t-proto.[cso]
  1453.     cp $(srcdir)/protoize.c t-proto.c
  1454.     chmod u+w t-proto.c
  1455.     go32 protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1456.       $(CFLAGS) $(INCLUDES) \
  1457.       -DGCC_INCLUDE_DIR=0 \
  1458.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1459.       -DCROSS_INCLUDE_DIR=0 \
  1460.       -DTOOL_INCLUDE_DIR=0 \
  1461.       -DSTD_PROTO_DIR=0" t-proto.c
  1462.     @echo '**********' Expect 400 lines of differences.
  1463.     -diff $(srcdir)/protoize.c t-proto.c > t-proto.diff
  1464.     -wc -l t-proto.diff
  1465.     go32 unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1466.       $(CFLAGS) $(INCLUDES) \
  1467.       -DGCC_INCLUDE_DIR=0 \
  1468.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1469.       -DCROSS_INCLUDE_DIR=0 \
  1470.       -DTOOL_INCLUDE_DIR=0 \
  1471.       -DSTD_PROTO_DIR=0" t-proto.c
  1472.     @echo Expect zero differences.
  1473.     diff $(srcdir)/protoize.c t-proto.c | cat
  1474.     -rm -f t-proto.[cso]
  1475.  
  1476. # Build the include directory.  The stamp files are st-* rather than
  1477. # s-* so that mostlyclean does not force the include directory to
  1478. # be rebuilt.
  1479.  
  1480. # Build the include directory except for float.h (which depends upon
  1481. # enquire).
  1482. st-int-hdrs: st-fixinc $(USER_H) gvarargs.h gstdarg.h gstddef.h \
  1483.   xlimits.h objc-headers
  1484. # Copy in the headers provided with gcc.
  1485. # The sed command gets just the last file name component;
  1486. # this is necessary because VPATH could add a dirname.
  1487. # Using basename would be simpler, but some systems don't have it.
  1488.     objdir=`pwd`; \
  1489.      \
  1490.     for file in $(USER_H); do \
  1491.       realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  1492.       rm -f $$objdir/include/$$realfile; \
  1493.       cp $$realfile $$objdir/include; \
  1494.       chmod a+r $$objdir/include/$$realfile; \
  1495.     done
  1496.     rm -f include/varargs.h
  1497.     cp $(srcdir)/gvarargs.h include/varargs.h
  1498.     chmod a+r include/varargs.h
  1499.     rm -f include/stdarg.h
  1500.     cp $(srcdir)/gstdarg.h include/stdarg.h
  1501.     chmod a+r include/stdarg.h
  1502.     rm -f include/stddef.h
  1503.     cp $(srcdir)/gstddef.h include/stddef.h
  1504.     chmod a+r include/stddef.h
  1505.     rm -f include/limits.h
  1506.     cp xlimits.h include/limits.h
  1507.     chmod a+r include/limits.h
  1508. # Install the README
  1509.     rm -f include/README
  1510.     cp $(srcdir)/README-fixinc include/README
  1511.     chmod a+r include/README
  1512.     touch st-int-hdrs
  1513.  
  1514. # Build the complete include directory.
  1515. st-headers: st-int-hdrs gfloat.h
  1516.     rm -f include/float.h
  1517.     cp gfloat.h include/float.h
  1518.     chmod a+r include/float.h
  1519.     touch st-headers
  1520.  
  1521. # Running fixincludes requires making sure that xgcc and cpp have been
  1522. # compiled (they are used to get the value of __SIZE_TYPE__).
  1523. # But recompiling xgcc should not force the the header files to be
  1524. # fixed again.  If you want to do that, delete st-fixinc.
  1525. fixinc.ready: xgcc cpp
  1526.     -if [ -f fixinc.ready ] ; then \
  1527.         true; \
  1528.     else \
  1529.         touch fixinc.ready; \
  1530.     fi
  1531.  
  1532. # Build fixed copies of system files.
  1533. st-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h fixinc.ready
  1534.     rm -rf include
  1535.     mkdir include
  1536.     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
  1537.     then \
  1538.       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
  1539.         if [ -d $$dir ]; \
  1540.         then \
  1541.           $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir) "`pwd`/xgcc -B`pwd`/"; \
  1542.         else true; fi; \
  1543.       done; \
  1544.     else true; \
  1545.     fi
  1546.     rm -f include/syslimits.h
  1547.     if [ -f include/limits.h ]; then \
  1548.       mv include/limits.h include/syslimits.h; \
  1549.     else \
  1550.       cp $(srcdir)/gsyslimits.h include/syslimits.h; \
  1551.     fi
  1552.     chmod a+r include/syslimits.h
  1553.     touch st-fixinc
  1554.  
  1555. # copy objc header files into build directory
  1556. objc-headers: st-fixinc
  1557.     if [ -d objc ]; then true; else mkdir objc; fi
  1558.     thisdir1=`pwd`; \
  1559.     srcdir1=`cd $(srcdir); pwd`; \
  1560.     cd objc; \
  1561.     $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  1562.     srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1563.     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  1564.     GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  1565.     touch objc-headers
  1566.  
  1567. # Files related to the fixproto script.
  1568.  
  1569. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh st-int-hdrs
  1570.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
  1571.       export CC; \
  1572.       $(srcdir)/scan-types.sh "$(srcdir)" >t-deduced.h
  1573.     mv t-deduced.h deduced.h
  1574.  
  1575. gen-protos: gen-protos.o scan.o $(HOST_LIBDEPS)
  1576.     ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
  1577.       gen-protos.o scan.o $(HOST_LIBS)
  1578.  
  1579. gen-protos.o: gen-protos.c scan.h hconfig.h
  1580.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
  1581.  
  1582. scan.o: scan.c scan.h hconfig.h
  1583.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
  1584.  
  1585. xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
  1586.     cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c
  1587.     $(GCC_FOR_TARGET) fixtmp.c -E \
  1588.       | sed -e 's/    / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  1589.       | ./gen-protos >xsys-protos.h
  1590.     rm -rf fixtmp.c
  1591.  
  1592. fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS)
  1593.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fix-header \
  1594.       fix-header.o scan-decls.o scan.o $(HOST_LIBS)
  1595.  
  1596. fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h
  1597.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
  1598.  
  1599. scan-decls.o: scan-decls.c scan.h hconfig.h
  1600.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
  1601.  
  1602. # st-fixproto depends on this, not on fix-header directly.
  1603. # The idea is to make sure fix-header gets built,
  1604. # but not rerun fixproto after each stage
  1605. # just because fix-header's mtime has changed.
  1606. fixhdr.ready: fix-header
  1607.     -if [ -f fixhdr.ready ] ; then \
  1608.         true; \
  1609.     else \
  1610.         touch fixhdr.ready; \
  1611.     fi
  1612.  
  1613. # st-headers is to make sure fixincludes has already finished.
  1614. # The if statement is so that we don't run fixproto a second time
  1615. # if it has already been run on the files in `include'.
  1616. st-fixproto: fixhdr.ready fixproto st-headers
  1617.     @echo "Various warnings and error messages from fixproto are normal"
  1618.     -if [ -d include ] ; then true; else mkdir include; fi
  1619.     if [ -f include/fixed ] ; then true; \
  1620.     else \
  1621.       CPP="$(GCC_FOR_TARGET) -E"; export CPP; \
  1622.         ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
  1623.       touch include/fixed; \
  1624.     fi
  1625.     touch st-fixproto
  1626.  
  1627. # Remake the info files.
  1628.  
  1629. doc: info
  1630. info: $(srcdir)/cpp.info $(srcdir)/gcc.info
  1631.  
  1632. $(srcdir)/cpp.info: cpp.texi
  1633.      $(MAKEINFO) cpp.texi
  1634.  
  1635. #$(srcdir)/gplus.info: gplus.texi
  1636. #    $(MAKEINFO) gplus.texi
  1637.  
  1638. $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
  1639.         md.texi rtl.texi tm.texi 
  1640.      $(MAKEINFO) gcc.texi
  1641.  
  1642. dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi
  1643.  
  1644. # This works with GNU Make's default rule.
  1645. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
  1646.         md.texi rtl.texi tm.texi 
  1647.     $(TEXI2DVI) $<
  1648.  
  1649. # This works with GNU Make's default rule.
  1650. $(srcdir)/cpp.dvi: cpp.texi
  1651.     $(TEXI2DVI) $<
  1652.  
  1653. $(srcdir)/INSTALL: install1.texi install.texi
  1654.     $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
  1655.       install1.texi
  1656.  
  1657. # Deletion of files made during compilation.
  1658. # There are four levels of this:
  1659. #   `mostlyclean', `clean', `distclean' and `realclean'.
  1660. # `mostlyclean' is useful while working on a particular type of machine.
  1661. # It deletes most, but not all, of the files made by compilation.
  1662. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  1663. # `clean' deletes everything made by running `make all'.
  1664. # `distclean' also deletes the files made by config.
  1665. # `realclean' also deletes everything that could be regenerated automatically.
  1666.  
  1667.  
  1668. mostlyclean: bytecode.mostlyclean
  1669.     -rm -f $(STAGESTUFF)
  1670. # Clean the objc subdir if we created one.
  1671.     if [ -d objc ]; then \
  1672.       srcdir1=`cd $(srcdir); pwd`; \
  1673.       cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
  1674.     else true; fi
  1675.     -rm -f libobjc.a
  1676. # Delete the temporary source copies for cross compilation.
  1677.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1678.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1679.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1680. # Delete the temp files made in the course of building libgcc.a.
  1681.     -rm -f tmplibgcc* tmpcopy xlimits.h
  1682.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1683. # Delete other temporary files.
  1684.     -rm -f t-float.h t-gcc.xtar.gz
  1685.     -rm -f t-foo1 t-foo2 t-proto.* t-unproto.1 t-SYSCALLS.s
  1686. # Delete the stamp files.
  1687.     -rm -f s-* t-*
  1688. # Delete debugging dump files.
  1689.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1690.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
  1691. # Delete some files made during installation.
  1692.     -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
  1693.     -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
  1694. # Delete files generated for fixproto
  1695.     -rm -rf fix-header xsys-protos.h deduced.h t-deduced.h \
  1696.       gen-protos fixproto.list fixtmp.* fixhdr.ready
  1697. # Delete unwanted output files from TeX.
  1698.     -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  1699. # Delete sorted indices we don't actually use.
  1700.     -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  1701. # Delete core dumps.
  1702.     -rm -f core config/core
  1703.  
  1704. # Delete all files made by compilation
  1705. # that don't exist in the distribution.
  1706. clean: mostlyclean bytecode.clean
  1707. # It may not be quite desirable to delete unprotoize.c here,
  1708. # but the spec for `make clean' requires it.
  1709. # Using unprotoize.c is not quite right in the first place, 
  1710. # but what better way is there?
  1711.     -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
  1712.     -rm -f *.dvi
  1713.     -if [ -f md.pre-cpp ]; then \
  1714.       rm -f md ; \
  1715.     fi
  1716. # Delete the include directory.
  1717.     -rm -rf st-* fixinc.ready include objc-headers
  1718.  
  1719. # Delete all files that users would normally create
  1720. # while building and installing GCC.
  1721. distclean: clean bytecode.distclean
  1722.     -rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h
  1723.     -rm -f md md.pre-cpp
  1724.     -rm -f Makefile *.oaux
  1725.     -rm -fr stage1 stage2 stage3 stage4
  1726.     -rm -f cp-parse.output
  1727.     -rm -f objc-parse.output
  1728.     -rm -f c-parse.output
  1729.  
  1730. # Delete anything likely to be found in the source directory
  1731. # that shouldn't be in the distribution.
  1732. extraclean: distclean
  1733.     -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
  1734.     -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
  1735.     -rm -f config/*/=* config/*/"#"* config/*/*~*
  1736.     -rm -f config/*/*.orig config/*/*.rej
  1737.     -rm -f objc/=* objc/"#"* objc/*~*
  1738.     -rm -f objc/*.orig objc/*.rej
  1739.     -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
  1740.     -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
  1741.     -rm -f *lose config/*lose config/*/*lose
  1742.     -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
  1743.     -rm -f djefoo
  1744.  
  1745. # Get rid of every file that's generated from some other file.
  1746. # Most of these files ARE PRESENT in the GCC distribution.
  1747. realclean: distclean bytecode.realclean
  1748.     -rm -f c-parse.y objc-parse.y
  1749.     -rm -f cp-parse.c cp-parse.h cp-parse.output
  1750.     -rm -f objc-parse.c objc-parse.output
  1751.     -rm -f c-parse.c c-parse.h c-parse.output
  1752.     -rm -f cexp.c cexp.output TAGS 
  1753.     -rm -f cpp.info* cpp.??s cpp.*aux
  1754.     -rm -f gcc.info* gcc.??s gcc.*aux
  1755.     -rm -f gplus.info* gplus.??s gplus.*aux
  1756.  
  1757. # Entry points `install' and `uninstall'.
  1758. # Also use `install-collect2' to install collect2 when the config files don't.
  1759.  
  1760. # The semicolon is to prevent the install.sh -> install default rule
  1761. # from doing anything.  Having it run true helps avoid problems and
  1762. # noise from versions of make which don't like to have null commands.
  1763. install: $(INSTALL_TARGET) 
  1764.  
  1765. # Copy the compiler files into directories where they will be run.
  1766. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
  1767.     install-man install-info
  1768.  
  1769. # Do nothing while making gcc with a cross-compiler. The person who
  1770. # makes gcc for the target machine has to know how to put a complete
  1771. # gcc together by hand.
  1772. install-build: force
  1773.     @echo You have to install gcc on your target machine by hand.
  1774.  
  1775. # Run this on the target machine
  1776. # to finish installation of cross compiler.
  1777. install-cross-rest: install-float-h-cross
  1778.  
  1779. # Install float.h for cross compiler.
  1780. # Run this on the target machine!
  1781. install-float-h-cross: install-dir
  1782. #    if [ -f enquire ] ; then true; else false; fi
  1783. # Note: don't use -.  We should fail right away if enquire was not made.
  1784.     go32 enquire -f > $(tmpdir)/float.h
  1785.     -rm -f $(libsubdir)/include/float.h
  1786.     $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
  1787.     -rm -f $(tmpdir)/float.h
  1788.     chmod a-x $(libsubdir)/include/float.h
  1789.  
  1790. # Create the installation directory.
  1791. install-dir:
  1792.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
  1793.     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
  1794. # This dir isn't currently searched by cpp.
  1795. #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
  1796.     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
  1797.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
  1798.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  1799.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  1800.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
  1801.     -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi
  1802.     -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi
  1803.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
  1804. # We don't use mkdir -p to create the parents of mandir,
  1805. # because some systems don't support it.
  1806. # Instead, we use this technique to create the immediate parent of mandir.
  1807.     -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
  1808.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  1809.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
  1810.  
  1811. # Install the compiler executables built during cross compilation.
  1812. install-common: native install-dir xgcc $(EXTRA_PARTS)
  1813.     for file in $(COMPILERS); do \
  1814.       if [ -f $$file ] ; then \
  1815.         rm -f $(libsubdir)/$$file; \
  1816.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1817.       else true; \
  1818.       fi; \
  1819.     done
  1820.     for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
  1821.       if [ x"$$file" != x.. ]; then \
  1822.         rm -f $(libsubdir)/$$file; \
  1823.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1824.       else true; fi; \
  1825.     done
  1826. # Don't mess with specs if it doesn't exist yet.
  1827.     -if [ -f specs ] ; then \
  1828.       rm -f $(libsubdir)/specs; \
  1829.       $(INSTALL_DATA) specs $(libsubdir)/specs; \
  1830.     fi
  1831. # Install the driver program as $(target)-gcc
  1832. # and also as either gcc (if native) or $(tooldir)/bin/gcc.
  1833.     -if [ -f gcc-cross ] ; then \
  1834.       rm -f $(bindir)/$(target)-gcc; \
  1835.       $(INSTALL_PROGRAM) gcc-cross $(bindir)/$(target)-gcc; \
  1836.       if [ -d $(tooldir)/bin/. ] ; then \
  1837.         rm -f $(tooldir)/bin/gcc; \
  1838.         $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
  1839.       else true; fi; \
  1840.       if [ -f cc1plus ] ; then \
  1841.         rm -f $(bindir)/$(target)-g++; \
  1842.         $(INSTALL_PROGRAM) g++-cross $(bindir)/$(target)-g++; \
  1843.         chmod a+x $(bindir)/$(target)-g++; \
  1844.         rm -f $(bindir)/$(target)-c++; \
  1845.         ln $(bindir)/$(target)-g++ $(bindir)/$(target)-c++; \
  1846.       fi ; \
  1847.     else \
  1848.       rm -f $(bindir)/gcc; \
  1849.       $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  1850.       rm -f $(bindir)/$(target)-gcc-1; \
  1851.       ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  1852.       mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  1853.       if [ -f cc1plus ] ; then \
  1854.         rm -f $(bindir)/g++; \
  1855.         $(INSTALL_PROGRAM) g++ $(bindir)/g++; \
  1856.         chmod a+x $(bindir)/g++; \
  1857.         rm -f $(bindir)/c++; \
  1858.         ln $(bindir)/g++ $(bindir)/c++; \
  1859.       fi ; \
  1860.     fi
  1861. # Install protoize if it was compiled.
  1862.     -if [ -f protoize ]; \
  1863.     then \
  1864.         rm -f $(bindir)/protoize; \
  1865.         $(INSTALL_PROGRAM) protoize $(bindir)/protoize; \
  1866.         rm -f $(bindir)/unprotoize; \
  1867.         $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize; \
  1868.         rm -f $(libsubdir)/SYSCALLS.c.X; \
  1869.         $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
  1870.         chmod a-x $(libsubdir)/SYSCALLS.c.X; \
  1871.     fi
  1872.     -rm -f $(libsubdir)/cpp
  1873.     $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
  1874.  
  1875. # Install the info files.
  1876. install-info: doc install-dir
  1877.     -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
  1878.      for f in cpp.info* gcc.info*; \
  1879.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  1880.     -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
  1881.  
  1882. # Install the man pages.
  1883. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1
  1884.     -rm -f $(mandir)/gcc$(manext)
  1885.     -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
  1886.     -chmod a-x $(mandir)/gcc$(manext)
  1887.     -rm -f $(mandir)/cccp$(manext)
  1888.     -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
  1889.     -chmod a-x $(mandir)/cccp$(manext)
  1890.     -$(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
  1891.     -chmod a-x $(mandir)/g++$(manext)
  1892.  
  1893. # Install the library.
  1894. install-libgcc: libgcc.a install-dir
  1895.     -if [ -f libgcc.a ] ; then \
  1896.       rm -f $(libsubdir)/libgcc.a; \
  1897.       $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
  1898.       if $(RANLIB_TEST) ; then \
  1899.         (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
  1900.       chmod a-x $(libsubdir)/libgcc.a; \
  1901.     else true; fi
  1902.  
  1903. # Install the objc run time library.
  1904. install-libobjc: libobjc.a install-dir
  1905.     -if [ -f libobjc.a ] ; then \
  1906.       rm -f $(libsubdir)/libobjc.a; \
  1907.       $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
  1908.       if $(RANLIB_TEST) ; then \
  1909.         (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
  1910.       chmod a-x $(libsubdir)/libobjc.a; \
  1911.     else true; fi
  1912.  
  1913. # Install all the header files built in the include subdirectory.
  1914. install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
  1915. # Fix symlinks to absolute paths in the installed include directory to
  1916. # point to the installed directory, not the build directory.
  1917.     -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
  1918.     if [ $$? -eq 0 ]; then \
  1919.       dir=`cd include; pwd`; \
  1920.       for i in $$files; do \
  1921.         dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
  1922.         if expr "$$dest" : "$$dir.*" > /dev/null; then \
  1923.           rm -f $(libsubdir)/include/$$i; \
  1924.           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  1925.         fi; \
  1926.       done; \
  1927.     fi
  1928.  
  1929. # Create or recreate the gcc private include file directory.
  1930. install-include-dir: install-dir
  1931.     -rm -rf $(libsubdir)/include
  1932.     mkdir $(libsubdir)/include
  1933.     -chmod a+rx $(libsubdir)/include
  1934.  
  1935. # Install the include directory using tar.
  1936. install-headers-tar: st-headers $(STMP_FIXPROTO) install-include-dir
  1937.     cd include; \
  1938.      (tar cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
  1939. # /bin/sh on some systems returns the status of the first tar,
  1940. # and that can lose with GNU tar which always writes a full block.
  1941. # So use `exit 0' to ignore its exit status.
  1942.  
  1943. # Install the include directory using cpio.
  1944. install-headers-cpio: st-headers $(STMP_FIXPROTO) install-include-dir
  1945.     cd include; find . -print | cpio -pdum $(libsubdir)/include
  1946.  
  1947. # Put assert.h where it won't override GNU libc's assert.h.
  1948. # It goes in a dir that is searched after GNU libc's headers;
  1949. # thus, the following conditionals are no longer needed.
  1950. # But it's not worth deleting them now.
  1951. ## Don't replace the assert.h already there if it is not from GCC.
  1952. ## This code would be simpler if it tested for -f ... && ! grep ...
  1953. ## but supposedly the ! operator is missing in sh on some systems.
  1954. install-assert-h: assert.h install-dir
  1955.     if [ -f $(assertdir)/assert.h ]; \
  1956.     then \
  1957.       if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
  1958.         then \
  1959.         rm -f $(assertdir)/assert.h; \
  1960.         $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  1961.         chmod a-x $(assertdir)/assert.h; \
  1962.       else true; \
  1963.       fi; \
  1964.     else \
  1965.       rm -f $(assertdir)/assert.h; \
  1966.       $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  1967.       chmod a-x $(assertdir)/assert.h; \
  1968.     fi
  1969.  
  1970. # Use this target to install the program `collect2' under the name `ld'.
  1971. install-collect2: collect2 install-dir
  1972.     $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
  1973. # Install the driver program as $(libsubdir)/gcc for collect2.
  1974.     $(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc
  1975.  
  1976. # Cancel installation by deleting the installed files.
  1977. uninstall:
  1978.     -rm -rf $(libsubdir)
  1979.     -rm -rf $(bindir)/gcc
  1980.     -rm -rf $(bindir)/protoize
  1981.     -rm -rf $(bindir)/unprotoize
  1982.     -rm -rf $(mandir)/gcc$(manext)
  1983.     -rm -rf $(mandir)/g++$(manext)
  1984.     -rm -rf $(mandir)/cccp$(manext)
  1985.     -rm -rf $(mandir)/protoize$(manext)
  1986.     -rm -rf $(mandir)/unprotoize$(manext)
  1987.  
  1988. # These exist for maintenance purposes.
  1989.  
  1990. # Update the tags table.
  1991. TAGS: force
  1992.                                 \
  1993.     mkdir temp;                            \
  1994.     mv -f c-parse.[ch] cp-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
  1995.     etags *.y *.h *.c;                        \
  1996.     mv temp/* .;                            \
  1997.     rmdir temp
  1998.  
  1999. # Create the distribution tar file.
  2000. #dist: gcc-$(version).tar.gz
  2001. dist: gcc.xtar.gz
  2002.  
  2003. gcc.xtar.gz: gcc.xtar
  2004.     gzip < gcc.xtar > t-gcc.xtar.gz
  2005.     mv t-gcc.xtar.gz gcc.xtar.gz
  2006.  
  2007. #gcc-$(version).tar.gz: gcc-$(version).tar
  2008. #    gzip < gcc-$(version).tar > gcc-$(version).tar.gz
  2009.  
  2010. #gcc-$(version).tar:
  2011. gcc.xtar: distdir
  2012. # Make the distribution.
  2013.     tar chf gcc.xtar gcc-$(version)
  2014.  
  2015. distdir: doc $(srcdir)/INSTALL c-parse.y objc-parse.y cp-parse.y \
  2016.   c-parse.c cp-parse.c objc-parse.c cexp.c
  2017.     @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
  2018.     then true; \
  2019.     else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
  2020.     fi
  2021. # Update the version number in README
  2022.     awk '$$1 " " $$2 " " $$3 == "This directory contains" \
  2023.         { $$6 = version; print $$0 } \
  2024.          $$1 " " $$2 " " $$3 != "This directory contains"' \
  2025.       version=$(version) README > tmp.README
  2026.     mv tmp.README README
  2027.     -rm -rf gcc-$(version) tmp    
  2028. # Put all the files in a temporary subdirectory
  2029. # which has the name that we want to have in the tar file.
  2030.     mkdir tmp
  2031.     mkdir tmp/config
  2032.     mkdir tmp/objc
  2033.     for file in *[0-9a-zA-Z+]; do \
  2034.       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  2035.     done
  2036.     cd config; \
  2037.     for file in *[0-9a-zA-Z+]; do \
  2038.       if test -d $$file && test "$$file" != RCS; then \
  2039.         mkdir ../tmp/config/$$file; \
  2040.         cd $$file; \
  2041.         for subfile in *[0-9a-zA-Z+]; do \
  2042.           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  2043.           || cp $$subfile ../../tmp/config/$$file; \
  2044.         done; \
  2045.         cd ..; \
  2046.       else \
  2047.         ln $$file ../tmp/config >/dev/null 2>&1 \
  2048.         || cp $$file ../tmp/config; \
  2049.       fi; \
  2050.     done
  2051.     cd objc; \
  2052.     for file in *[0-9a-zA-Z+]; do \
  2053.       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  2054.     done
  2055.     ln .gdbinit tmp
  2056.     mv tmp gcc-$(version)
  2057. # Get rid of everything we don't want in the distribution.
  2058.     cd gcc-$(version); make -f Makefile.in extraclean
  2059.  
  2060. # make diff oldversion=M.N 
  2061. # creates a diff file between an older distribution and this one.
  2062. # The -P option assumes this is GNU diff.
  2063. diff:
  2064.     diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x objc-parse.y \
  2065.       -x cp-parse.c -x cp-parse.h -x cexp.c -x bi-parser.c \
  2066.       -x objc-parse.c -x TAGS -x "gcc.??" -x "gcc.??s" -x gcc.aux \
  2067.       -x "cpp.??s" -x "cpp.??" -x cpp.aux -x "cpp.info*" -x "gcc.info*" \
  2068.       gcc-$(oldversion) gcc-$(version) > diffs
  2069.  
  2070. # do make -f ../gcc/Makefile maketest DIR=../gcc
  2071. # in the intended test directory to make it a suitable test directory.
  2072. # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  2073. maketest:
  2074.     ln -s $(DIR)/*.[chy] .
  2075.     ln -s $(DIR)/configure .
  2076.     ln -s $(DIR)/*.def .
  2077.     -rm -f =*
  2078.     ln -s $(DIR)/.gdbinit .
  2079.     ln -s $(DIR)/$(FIXINCLUDES) .
  2080.     -ln -s $(DIR)/bison.simple .
  2081.     ln -s $(DIR)/config .
  2082.     ln -s $(DIR)/move-if-change .
  2083. # The then and else were swapped to avoid a problem on Ultrix.
  2084.     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  2085.     -rm tm.h aux-output.c config.h md
  2086.     make clean
  2087. # You must then run config to set up for compilation.
  2088.  
  2089. bootstrap: force
  2090. # Only build the C compiler for stage1, because that is the only one that
  2091. # we can guarantee will build with the native compiler, and also it is the
  2092. # only thing useful for building stage2.
  2093.     $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES=c
  2094.     $(MAKE) stage1
  2095. # This used to define ALLOCA as empty, but that would lead to bad results
  2096. # for a subsequent `make install' since that would not have ALLOCA empty.
  2097. # To prevent `make install' from compiling alloca.o and then relinking cc1
  2098. # because alloca.o is newer, we permit these recursive makes to compile
  2099. # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  2100.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2101.     $(MAKE) stage2
  2102.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2103.  
  2104. bootstrap2: force
  2105.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2106.     $(MAKE) stage2
  2107.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2108.  
  2109. bootstrap3: force
  2110.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2111.  
  2112. # Compare the object files in the current directory with those in the
  2113. # stage2 directory.
  2114.  
  2115. # ./ avoids bug in some versions of tail.
  2116. compare: force
  2117.     for file in *.o; do \
  2118.       tail +16c ./$$file > t-foo1; \
  2119.       tail +16c stage2/$$file > t-foo2 2>/dev/null \
  2120.         && (cmp t-foo1 t-foo2 || echo $$file differs); \
  2121.     done
  2122.     -rm -f t-foo*
  2123.  
  2124. # Similar, but compare with stage3 directory
  2125. compare3: force
  2126.     for file in *.o; do \
  2127.       tail +16c $$file > t-foo1; \
  2128.       tail +16c stage3/$$file > t-foo2 2>/dev/null \
  2129.         && (cmp t-foo1 t-foo2 || echo $$file differs); \
  2130.     done
  2131.     -rm -f t-foo*
  2132.  
  2133. # Copy the object files from a particular stage into a subdirectory.
  2134. stage1: force
  2135.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2136.     -mv $(STAGESTUFF) stage1
  2137.     -rm -f stage1/libgcc.a
  2138.     -cp libgcc.a stage1
  2139.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  2140.  
  2141. stage2: force
  2142.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2143.     -mv $(STAGESTUFF) stage2
  2144.     -rm -f stage2/libgcc.a
  2145.     -cp libgcc.a stage2
  2146.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  2147.  
  2148. stage3: force
  2149.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2150.     -mv $(STAGESTUFF) stage3
  2151.     -rm -f stage3/libgcc.a
  2152.     -cp libgcc.a stage3
  2153.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  2154.  
  2155. stage4: force
  2156.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2157.     -mv $(STAGESTUFF) stage4
  2158.     -rm -f stage4/libgcc.a
  2159.     -cp libgcc.a stage4
  2160.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
  2161.  
  2162. # Copy just the executable files from a particular stage into a subdirectory,
  2163. # and delete the object files.  Use this if you're just verifying a version
  2164. # that is pretty sure to work, and you are short of disk space.
  2165. risky-stage1: force
  2166.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2167.     -mv $(GCC_PARTS) stage1
  2168.     -rm -f stage1/libgcc.a
  2169.     -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
  2170.     -make clean
  2171.  
  2172. risky-stage2: force
  2173.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2174.     -mv $(GCC_PARTS) stage2
  2175.     -rm -f stage2/libgcc.a
  2176.     -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
  2177.     -make clean
  2178.  
  2179. risky-stage3: force
  2180.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2181.     -mv $(GCC_PARTS) stage3
  2182.     -rm -f stage3/libgcc.a
  2183.     -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
  2184.     -make clean
  2185.  
  2186. risky-stage4: force
  2187.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2188.     -mv $(GCC_PARTS) stage4
  2189.     -rm -f stage4/libgcc.a
  2190.     -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
  2191.     -make clean
  2192.  
  2193. #In GNU Make, ignore whether `stage*' exists.
  2194. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
  2195. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  2196.  
  2197. force:
  2198.