home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / gcc-2.5.8-src.lha / src / amiga / gcc-2.5.8 / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-02-22  |  84.3 KB  |  2,213 lines

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