]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/Makefile.in
*** empty log message ***
[thirdparty/gcc.git] / gcc / Makefile.in
CommitLineData
79d8453e
RS
1# Makefile for GNU C compiler.
2# Copyright (C) 1987, 1988, 1990, 1991 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,
2e494f70 22# uninstall, TAGS, mostlyclean, clean, distclean, realclean,
79d8453e
RS
23# stage1, stage2, stage3, stage4.
24
2e494f70
RS
25# Suppress smart makes who think they know how to automake Yacc files
26.y.c:
27
79d8453e
RS
28.NOEXPORT: # This tells GNU Make version 3
29 # not to put all the variables in the environment.
30
31# Variables that exist for you to override.
32# See below for how to change them for certain systems.
33
34# Selection of languages to be made.
35LANGUAGES = c c++ objective-c proto
36
37ALLOCA =
38ALLOCA_FLAGS = -S -Demacs
39ALLOCA_FINISH = as -o alloca.o alloca.s
40
41# Various ways of specifying flags for compilations:
42# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
43# BOOT_CFLAGS is the value of CFLAGS to pass
44# to the stage2 and stage3 compilations
45# XCFLAGS is used for most compilations but not when using the GCC just built.
46XCFLAGS =
47CFLAGS = -g
48BOOT_CFLAGS = -O $(CFLAGS)
49# These exists to be overridden by the x-* and t-* files, respectively.
50X_CFLAGS =
51T_CFLAGS =
52
53X_CPPFLAGS =
54T_CPPFLAGS =
55
56CC = cc
57BISON = bison
58BISONFLAGS =
59AR = ar
60OLDAR_FLAGS = qc
61AR_FLAGS = rc
62SHELL = /bin/sh
63# on sysV, define this as cp.
64INSTALL = install -c
65# These permit overriding just for certain files.
66INSTALL_PROGRAM = $(INSTALL)
67INSTALL_DATA = $(INSTALL)
68SYMLINK = ln -s
69
70# Define this as & to perform parallel make on a Sequent.
71# Note that this has some bugs, and it seems currently necessary
72# to compile all the gen* files first by hand to avoid erroneous results.
73P =
74
75# How to invoke ranlib.
76RANLIB = ranlib
77# Test to use to see whether ranlib exists on the system.
78RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
79
80# Compiler to use for compiling libgcc1.a.
81# OLDCC should not be the GNU C compiler,
82# since that would compile typical libgcc1.a functions such as mulsi3
83# into infinite recursions.
84OLDCC = cc
85
86# CFLAGS for use with OLDCC, for compiling libgcc1.a.
87# NOTE: -O does not work on some Unix systems!
88CCLIBFLAGS = -O
89
2e494f70 90# Version of ar to use when compiling libgcc1.a.
79d8453e
RS
91OLDAR = ar
92
93# The GCC to use for compiling libgcc2.a. Usually the one we just built.
94# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
95GCC_FOR_TARGET = ./gcc
96
97# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
98# It omits XCFLAGS, and specifies -B./.
99GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./
100
101# Special flags for compiling enquire.
102# We disable optimization to make floating point more reliable.
103ENQUIRE_CFLAGS = -DNO_SC -DNO_MEM -DNO_STDDEF -O0
104ENQUIRE_LDFLAGS = $(LDFLAGS)
105
106# Tools to use when building a cross-compiler.
107# These are used because `configure' appends `cross-make'
108# to the makefile when making a cross-compiler.
109
110TARGET_TOOLPREFIX = $(tooldir)/bin/
111AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
112AR_FOR_TARGET_FLAGS = rc
113RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
114RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
115CROSS_TOOLS =
116
20bd0ab1
RS
117# There may be a premade insn-attrtab.c for this machine.
118# (You could rebuild it with genattrtab as usual, but it takes a long time.)
119# PREMADE_ATTRTAB is the file name of the file to use.
120# PREMADE_ATTRTAB_MD is the md file it corresponds to.
121PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
122PREMADE_ATTRTAB =
123
79d8453e
RS
124target= ... `configure' substitutes actual target name here.
125xmake_file= ... `configure' substitutes actual x- file name here.
126tmake_file= ... `configure' substitutes actual t- file name here.
127version=`awk '{printf "%s", substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c`
128
129# Directory where sources are, from where we are.
130srcdir = .
131# Common prefix for installation directories.
132# NOTE: This directory must exist when you start installation.
133prefix = /usr/local
2e494f70
RS
134# Directory in which to put host dependent programs and libraries
135exec_prefix = $(prefix)
79d8453e 136# Directory in which to put the executable for the command `gcc'
2e494f70 137bindir = $(exec_prefix)/bin
79d8453e 138# Directory in which to put the directories used by the compiler.
2e494f70 139libdir = $(exec_prefix)/lib
79d8453e 140# Directory in which the compiler finds executables, libraries, etc.
2e494f70 141libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
79d8453e
RS
142# Extension (if any) to put in installed man-page filename.
143manext = .1
144# Directory in which to put man pages.
145mandir = $(prefix)/man/man1
146# Directory in which to find other cross-compilation tools and headers.
147# Used in install-cross.
148tooldir = $(prefix)/$(target)
149
150# Additional system libraries to link with.
151CLIB=
152
153# Change this to a null string if obstacks are installed in the
154# system library.
155OBSTACK=obstack.o
156
157# Specify the rule for actually making libgcc1.a.
2e494f70
RS
158# The value may be empty; that means to do absolutely nothing
159# with or for libgcc1.a.
79d8453e
RS
160LIBGCC1 = libgcc1.a
161
162# Specify the rule for actually making libgcc2.a.
163LIBGCC2 = libgcc2.a
164
165# Options to use when compiling libgcc2.a.
166# -g1 causes output of debug info only for file-scope entities.
167# we use this here because that should be enough, and also
168# so that -g1 will be tested.
169LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1
170
171# List of extra executables that should be compiled for this target machine
172# that are used for compiling from source code to object code.
173# The rules for compiling them should be in the t-* file for the machine.
174EXTRA_PASSES =
175
2e494f70
RS
176# Like EXTRA_PASSES, but these are used when linking.
177EXTRA_PROGRAMS =
178
179# List of extra object files that should be compiled for this target machine.
79d8453e
RS
180# The rules for compiling them should be in the t-* file for the machine.
181EXTRA_PARTS =
182
2e494f70
RS
183# List of extra object files that should be compiled and linked with
184# compiler proper (cc1, cc1obj, cc1plus).
185EXTRA_OBJS =
186
47547081
RS
187# Set this to `ld' to enable use of collect2.
188# USE_COLLECT2 =
189# It is convenient for configure to add the assignment at the beginning,
190# so don't override it here.
191
79d8453e
RS
192# List of extra C and assembler files to add to libgcc1.a.
193# Assembler files should have names ending in `.asm'.
194LIB1FUNCS_EXTRA =
195
196# List of extra C and assembler files to add to libgcc2.a.
197# Assembler files should have names ending in `.asm'.
198LIB2FUNCS_EXTRA =
199
200# Program to convert libraries.
201LIBCONVERT =
202
203# Control whether header files are installed.
204# We will change this to install-fixincludes eventually.
205# It would be useful for people to try this now.
206INSTALL_HEADERS=install-headers
207
208# Select which version of fixincludes to use (I.E. regular versus SVR4)
209FIXINCLUDES=fixincludes
210
211# List of things which should already be built whenever we try to use gcc
212# to compile anything (without linking).
213GCC_PASSES=gcc cc1 cpp $(EXTRA_PASSES)
214
215# List of things which should already be built whenever we try to use gcc
216# to link anything.
47547081 217GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
79d8453e
RS
218
219# Change this to empty to prevent installing limits.h.
2e494f70 220# Actually, this currently has no effect,
79d8453e 221# and if that causes no problems, it can be deleted.
2e494f70 222# Otherwise, it must be replaced so as to control
79d8453e
RS
223# the actions of install-limits-h.
224LIMITS_H = limits.h
225
226# Directory to link to, when using the target `maketest'.
227DIR = ../gcc
228
229# Flags to use when cross-building GCC.
230# Prefix to apply to names of object files when using them
231# to run on the machine we are compiling on.
232HOST_PREFIX=
233# Prefix to apply to names of object files when compiling them
234# to run on the machine we are compiling on.
235# The default for this variable is chosen to keep these rules
236# out of the way of the other rules for compiling the same source files.
237HOST_PREFIX_1=loser-
238HOST_CC=$(CC)
239HOST_CFLAGS=$(ALL_CFLAGS)
2e494f70 240HOST_CLIB=$(CLIB)
79d8453e
RS
241HOST_LDFLAGS=$(LDFLAGS)
242HOST_CPPFLAGS=$(ALL_CPPFLAGS)
2e494f70
RS
243HOST_ALLOCA=$(ALLOCA)
244HOST_MALLOC=$(MALLOC)
245HOST_OBSTACK=$(OBSTACK)
79d8453e
RS
246
247# Choose the real default target.
248ALL=all.internal
249
250# Choose the real install target.
251INSTALL_TARGET=install-native
252
253# End of variables for you to override.
254
255# Definition of `all' is here so that new rules inserted by sed
256# do not specify the default target.
257# The real definition is under `all.internal' (for native compilers)
258# or `all.cross' (for cross compilers).
2e494f70 259all: all.indirect
79d8453e
RS
260
261# sed inserts variable overrides after the following line.
262####
263\f
264# Now figure out from those variables how to compile and link.
265
2e494f70
RS
266all.indirect: $(ALL)
267
79d8453e
RS
268INTERNAL_CFLAGS = $(CROSS)
269
270# This is the variable actually used when we compile.
271ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
272
273# Likewise.
274ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
275
276# Even if ALLOCA is set, don't use it if compiling with GCC.
2e494f70
RS
277USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac `
278USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
279USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
280USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
79d8453e
RS
281
282# Dependency on obstack, alloca, malloc or whatever library facilities
283# are not installed in the system libraries.
284# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
285LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
286
287# Likewise, for use in the tools that must run on this machine
288# even if we are cross-building GCC.
289# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
2e494f70 290HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
79d8453e
RS
291
292# How to link with both our special library facilities
293# and the system's installed libraries.
294LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
295
296# Likewise, for use in the tools that must run on this machine
297# even if we are cross-building GCC.
2e494f70
RS
298HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
299 $(HOST_CLIB)
79d8453e
RS
300
301HOST_RTL = $(HOST_PREFIX)rtl.o
302HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
d3614a37 303HOST_PRINT = $(HOST_PREFIX)print-rtl.o
79d8453e
RS
304
305# Specify the directories to be searched for header files.
306# Both . and srcdir are used, in that order,
307# so that tm.h and config.h will be found in the compilation
308# subdirectory rather than in the source directory.
309INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
310SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
311
312# Always use -I$(srcdir)/config when compiling.
313.c.o:
314 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
315
316# This tells GNU make version 3 not to export all the variables
317# defined in this file into the environment.
318.NOEXPORT:
319\f
320# Lists of files for various purposes.
321
322# A list of all the language-specific executables.
323COMPILERS = cc1 cc1plus cc1obj
324
325# Language-specific object files for C.
326C_OBJS = c-parse.o c-lang.o \
327 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
328
329# Language-specific object files for Objectionable C.
330OBJC_OBJS = objc-parse.o objc-actions.o \
331 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
332
333# Language-specific object files for C++.
334CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
335 cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
336 cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
337 cp-class.o cp-init.o cp-method.o cp-except.o \
338 cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
339 $(CPLUS_INPUT) cp-spew.o c-common.o
340
341# Language-independent object files.
342OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
343 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
47547081
RS
344 rtl.o print-rtl.o rtlanal.o emit-rtl.o \
345 dbxout.o sdbout.o dwarfout.o xcoffout.o \
79d8453e
RS
346 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
347 regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
348 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
349 insn-recog.o insn-extract.o insn-output.o insn-emit.o \
47547081 350 insn-attrtab.o aux-output.o getpwd.o $(EXTRA_OBJS)
79d8453e
RS
351
352# GEN files are listed separately, so they can be built before doing parallel
353# makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
354# them before rtl.o is compiled.
355GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
356
357# Files to be copied away after each stage in building.
358STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
359 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
360 insn-attr.h insn-attrtab.c \
361 stamp-flags stamp-config stamp-codes \
362 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
363 stamp-attr stamp-attrtab \
364 genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
365 genattrtab genattr \
47547081 366 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
9c0022f6 367 cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
79d8453e
RS
368
369# Members of libgcc1.a.
370LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
371 _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
372 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
373 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
374 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
375 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
376 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
377
378# Library members defined in libgcc2.c.
379LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
380 _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 \
381 _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
382 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
383 _varargs _eprintf _builtin_new _builtin_New _builtin_del \
384 _bb _shtab _clear_cache _trampoline __main _exit
385
386# Header files that are made available under the same name
387# to programs compiled with gcc.
388USER_H = assert.h va-hp800.h va-i860.h va-mips.h va-pyr.h va-sparc.h \
feb69c20 389 va-spur.h va-m88k.h va-i960.h proto.h
79d8453e
RS
390
391# All the header files that are installed for users from GCC itself.
392INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h
393
394# The files that "belong" in CONFIG_H are deliberately omitted
395# because having them there would not be useful in actual practice.
396# All they would do is cause complete recompilation every time
397# one of the machine description files is edited.
398# That may or may not be what one wants to do.
399# If it is, rm *.o is an easy way to do it.
400# CONFIG_H = config.h tm.h
401CONFIG_H =
402RTL_H = rtl.h rtl.def machmode.h machmode.def
403TREE_H = tree.h real.h tree.def machmode.h machmode.def
404CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
405\f
406# Avoid a lot of time thinking about remaking Makefile.in and *.def.
407.SUFFIXES: .in .def
408
47547081 409Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
79d8453e
RS
410 $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file)
411 sh config.status
412
413all.internal: start.encap rest.encap
414# This is what to compile if making a cross-compiler.
415all.cross: native gcc-cross
416# This is what must be made before installing GCC and converting libraries.
417start.encap: native gcc $(LIBGCC1_TARGET)
418# Use this to make a GCC that will be used only to recompile GCC.
419for-bootstrap: start.encap libgcc.a
420# These can't be made, with COFF encapsulation, until after GCC can run.
2e494f70 421rest.encap: libgcc.a float.h $(EXTRA_PARTS)
79d8453e
RS
422# This is what is made with the host's compiler
423# whether making a cross compiler or not.
47547081 424native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
79d8453e
RS
425
426# Define the names for selecting languages in LANGUAGES.
427C c: cc1
428C++ c++: cc1plus
429OBJC objc: cc1obj
430OBJECTIVE-C objective-c: cc1obj
431PROTO: proto
432
2e494f70
RS
433# Really, really stupid make features, such as SUN's KEEP_STATE, may force
434# a target to build even if it is up-to-date. So we must verify that
435# config.status does not exist before failing.
79d8453e 436config.status:
2e494f70
RS
437 @if [ ! -f config.status ] ; then \
438 echo You must configure gcc. Look at the INSTALL file for details.; \
439 false; \
440 else \
441 true; \
442 fi
79d8453e
RS
443
444compilations: ${OBJS}
445
446gcc: gcc.o version.o $(LIBDEPS)
447 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
448# Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
449 mv -f gccnew gcc
450# Dump a specs file to make -B./ read these specs over installed ones
451 ./gcc -dumpspecs > specs
452
453# We do want to create an executable named `gcc', so we can use it to
454# compile libgcc2.a.
455# Also create gcc-cross, so that install-common will install properly.
456gcc-cross: gcc
457 cp gcc gcc-cross
458
459cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
460 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
461
462cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
463 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
464
465cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
466 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS)
467
468float.h: enquire
469 -./enquire -f > tmp-float.h
470 mv tmp-float.h float.h
471
472# Used to compile enquire with standard cc, but have forgotten why.
473# Let's try with GCC.
474enquire: enquire.o $(GCC_PARTS)
475 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
476enquire.o: $(srcdir)/enquire.c $(GCC_PASSES)
9c4614c3 477 -if [ "$(srcdir)" != "." ]; then rm -f enquire.c; else true; fi
79d8453e 478 -cp $(srcdir)/enquire.c . > /dev/null 2>&1
2e494f70
RS
479# Breaking this line caused a problem with one version of GNU make.
480 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c enquire.c
79d8453e
RS
481\f
482# Build libgcc.a.
483# This is done in two parts because some functions, in libgcc1.c,
484# must be compiled with something other than gcc,
485# while the rest, in libgcc2.c, must be compiled with gcc.
486# That means we can't do libgcc2.c until after gcc, cc1, etc.
487
488# Use this as value of LIBGCC1 to cause conversion to GNU library format.
489# LIBCONVERT should put its output in libgcc1.conv.
490libgcc1.conv: libgcc1.a
491 $(LIBCONVERT) libgcc1.a libgcc1.conv
492
493# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
494# Make an empty file instead.
495libgcc1.null: $(CROSS_TOOLS) $(GCC_PASSES)
496 echo "__foo () {}" > dummy.c
497 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
498 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
499 rm -f dummy.o dummy.c
500
501# Compile the library of arithmetic subroutines with the native compiler.
502# Don't compile it with gcc!
503# (That would cause most arithmetic functions to call themselves.)
504libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
505 -rm -f tmplibgcc1.a
506# Actually build it in tmplibgcc1.a, then rename at end,
507# so that libgcc1.a itself remains nonexistent if compilation is aborted.
508# -e causes any failing command to make this rule fail.
509# -e doesn't work in certain shells, so we test $$? as well.
510 set -e; \
511 for name in $(LIB1FUNCS); \
512 do \
513 echo $${name}; \
514 rm -f $${name}.o; \
515 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
516 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
517 mv libgcc1.o $${name}.o; \
518 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
519 rm -f $${name}.o; \
520 done
521# Some shells crash when a loop has no items.
522# So make sure there is always at least one--`..'.
523# Then ignore it.
524# We don't use -e here because there are if statements
525# that should not make the command give up when the if condition is false.
526# Instead, we test for failure after each command where it matters.
2e494f70 527 -for file in .. $(LIB1FUNCS_EXTRA); \
79d8453e
RS
528 do \
529 if [ x$${file} != x.. ]; then \
530 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
531 echo $${name}; \
532 if [ $${name}.asm = $${file} ]; then \
533 cp $${file} $${name}.s; file=$${name}.s; \
534 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
535 else true; fi; \
536 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
537 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
538 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
539 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
540 rm -f $${name}.[so]; \
541 else true; \
542 fi; \
543 done
544 mv tmplibgcc1.a libgcc1.a
545
546# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
547# But recompiling cc1 should not force recompilation of libgcc2.a.
548# If you want to force recompilation, delete libgcc2.a.
549# Depend on install-cross-tools to make sure we set up properly
550# to run the assembler before we try compiling anything.
551# install-cross-tools does nothing if not cross compiling.
552libgcc2.ready: $(GCC_PASSES) $(CROSS_TOOLS)
553 -if [ -f libgcc2.ready ] ; then \
554 true; \
555 else \
556 touch libgcc2.ready; \
557 fi
558
559libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
560 longlong.h gbl-ctors.h config.status
561# Actually build it in tmplibgcc2.a, then rename at end,
562# so that libgcc2.a itself remains nonexistent if compilation is aborted.
563 -rm -f tmplibgcc2.a
564# -e causes any failing command to make this rule fail.
565# -e doesn't work in certain shells, so we test $$? as well.
566 set -e; \
567 for name in $(LIB2FUNCS); \
568 do \
569 echo $${name}; \
2e494f70 570 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
79d8453e
RS
571 $(srcdir)/libgcc2.c -o $${name}.o; \
572 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
573 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
574 rm -f $${name}.o; \
575 done
576# Some shells crash when a loop has no items.
577# So make sure there is always at least one--`..'.
578# Then ignore it.
579# We don't use -e here because there are if statements
580# that should not make the command give up when the if condition is false.
581# Instead, we test for failure after each command where it matters.
2e494f70 582 -for file in .. $(LIB2FUNCS_EXTRA); \
79d8453e
RS
583 do \
584 if [ x$${file} != x.. ]; then \
585 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
586 echo $${name}; \
587 if [ $${name}.asm = $${file} ]; then \
588 cp $${file} $${name}.s; file=$${name}.s; \
589 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
590 else true; fi; \
2e494f70 591 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
79d8453e
RS
592 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
593 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
594 rm -f $${name}.[so]; \
595 else true; \
596 fi; \
597 done
598 mv tmplibgcc2.a libgcc2.a
599# These lines were deleted from above the mv command
600# because ranlibing libgcc.a itself should suffice.
601# -if [ x${HPUX_GAS} = x ] ; then \
602# if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
603# else true; fi
604
605# Combine the various libraries into a single library, libgcc.a.
606libgcc.a: $(LIBGCC1) $(LIBGCC2)
607 -rm -rf tmplibgcc.a libgcc.a tmpcopy
608 mkdir tmpcopy
2e494f70
RS
609 -if [ x$(LIBGCC1) != x ]; \
610 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
611 else true; \
612 fi
79d8453e
RS
613 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
614 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
615 rm -rf tmpcopy
616 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
617# Actually build it in tmplibgcc.a, then rename at end,
618# so that libgcc.a itself remains nonexistent if compilation is aborted.
619 mv tmplibgcc.a libgcc.a
620
621
622# Compile two additional files that are linked with every program
623# linked using GCC on system V, for the sake of C++ constructors.
624crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
625 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \
2e494f70 626 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o
79d8453e
RS
627
628crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
629 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \
2e494f70 630 -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtend.o
79d8453e
RS
631\f
632# Compiling object files from source files.
633
634# Note that dependencies on obstack.h are not written
635# because that file is not part of GCC.
636# Dependencies on gvarargs.h are not written
637# because all that file does, when not compiling with GCC,
638# is include the system varargs.h.
639
640# C language specific files.
641
642c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h input.h flags.h
643 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
644$(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
645 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
646
647c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
648c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
649c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
650c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
651 input.h flags.h
652c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
653c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
654
655# C++ language specific files.
656
657cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
658 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
659 `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
660
661$(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
9c0022f6 662 @echo expect 30 shift/reduce conflicts and 15 reduce/reduce conflicts
79d8453e
RS
663 cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
664
665cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
666 $(srcdir)/cp-parse.h flags.h
667cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
668 $(srcdir)/cp-parse.h $(srcdir)/cp-input.c flags.h
669cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
670 cp-lex.h cp-decl.h stack.h
671cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
672 cp-lex.h cp-decl.h
673cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
674cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
675cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
676 cp-class.h flags.h
677cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
678 flags.h
679cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
680cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
681cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
682cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
683cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
684cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
685cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
686cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
687cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
688 expr.h insn-codes.h
689cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
690cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
691cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
692
47547081
RS
693# To make a configuration always use collect2, set USE_COLLECT2 to ld.
694ld: collect2
695 rm -f ld
696 ln collect2 ld
697
79d8453e
RS
698collect2 : collect2.o version.o $(LIBDEPS)
699 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
700
701collect2.o : collect2.c $(CONFIG_H) gstab.h
47547081
RS
702 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
703 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
704 -DSTANDARD_BIN_PREFIX=\"$(bindir)/\" \
705 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
706 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
707 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
79d8453e
RS
708
709# Objectionable C language specific files.
710
711objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
712 c-tree.h input.h flags.h objc-actions.h
713 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
714$(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
715 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
716
717objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
718 flags.h objc-actions.h
719
720# A file used by all variants of C.
721
722c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
723
724# Language-independent files.
725
726gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
727 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
728 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
2e494f70 729 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
79d8453e
RS
730 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
731 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
732
733dumpvers: dumpvers.c
734
735version.o: version.c
736obstack.o: obstack.c
737
738tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
739print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
740stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
741fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
2e494f70 742toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
47547081
RS
743 insn-attr.h xcoffout.h
744 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
745 $(MAYBE_USE_COLLECT2) -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
79d8453e
RS
746
747rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
748
749print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
750rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
751
9c4614c3 752varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h defaults.h \
47547081 753 insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h
79d8453e
RS
754function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
755 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
756 recog.h output.h
757stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
758 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
759expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h \
760 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
761calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
762 insn-flags.h
763expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
764 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
765explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
766 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
767optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
768 insn-flags.h insn-config.h insn-codes.h expr.h recog.h
769dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
47547081 770 insn-config.h reload.h gstab.h xcoffout.h
79d8453e
RS
771sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
772 insn-config.h reload.h
773dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
774 insn-config.h reload.h output.h
47547081 775xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
79d8453e
RS
776emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h \
777 regs.h insn-config.h insn-codes.h real.h expr.h
2e494f70 778getpwd.o : getpwd.c $(CONFIG_H)
79d8453e
RS
779
780integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
781 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h
782
783jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
784 insn-config.h insn-flags.h insn-codes.h expr.h real.h
785stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
786
787cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
788 insn-config.h recog.h
789loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
790 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
791unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
792 integrate.h regs.h flags.h expr.h loop.h
793flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
794 basic-block.h regs.h hard-reg-set.h output.h
795combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h \
796 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
797 basic-block.h recog.h real.h
798regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
799 basic-block.h regs.h insn-config.h recog.h
800local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
801 regs.h hard-reg-set.h insn-config.h recog.h output.h
802global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h \
803 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
804
805reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
806 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
807reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
808 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
809 basic-block.h recog.h output.h
810caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
811 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
812reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
813 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
814 flags.h output.h
815sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
816 flags.h insn-config.h insn-attr.h
817final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
818 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
47547081 819 hard-reg-set.h insn-codes.h gstab.h xcoffout.h
79d8453e
RS
820recog.o : recog.c $(CONFIG_H) $(RTL_H) \
821 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
822 insn-flags.h insn-codes.h real.h
823reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
824 regs.h hard-reg-set.h flags.h insn-config.h
dcfedcd0 825
79d8453e
RS
826aux-output.o : aux-output.c $(CONFIG_H) \
827 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
828 insn-flags.h output.h insn-attr.h insn-codes.h
829
830# Normally this target is not used; but it is used if you
831# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
832# from the GNU Emacs distribution.
833# Note some machines won't allow $(CC) without -S on this source file.
834alloca.o: alloca.c
835# sed is used to strip the comments from the assembler output.
836 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
837 `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
838 $(ALLOCA_FINISH)
47547081 839 -rm alloca.s
79d8453e
RS
840\f
841# Generate header and source files from the machine description,
842# and compile them.
843
844.PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
845 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
846 insn-attr.h insn-attrtab.c
847
848# The following pair of rules has this effect:
849# genconfig is run only if the md has changed since genconfig was last run;
850# but the file insn-config.h is touched only when its contents actually change.
851
852# Each of the other insn-* files is handled by a similar pair of rules.
853
854# Each of the insn-*.[ch] rules has a semicolon at the end,
855# for otherwise the system Make on SunOS 4.1 never tries
856# to recompile insn-*.o.
857
858insn-config.h: stamp-config ;
859stamp-config : md genconfig $(srcdir)/move-if-change
860 ./genconfig md > tmp-config.h
861 $(srcdir)/move-if-change tmp-config.h insn-config.h
862 touch stamp-config
863
864insn-flags.h: stamp-flags ;
865stamp-flags : md genflags $(srcdir)/move-if-change
866 ./genflags md > tmp-flags.h
867 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
868 touch stamp-flags
869
870insn-codes.h: stamp-codes ;
871stamp-codes : md gencodes $(srcdir)/move-if-change
872 ./gencodes md > tmp-codes.h
873 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
874 touch stamp-codes
875
876insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
877 insn-config.h insn-flags.h insn-codes.h
878 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
879
880insn-emit.c: stamp-emit ;
881stamp-emit : md genemit $(srcdir)/move-if-change
882 ./genemit md > tmp-emit.c
883 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
884 touch stamp-emit
885
886insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
887 real.h output.h flags.h
888 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
889
890insn-recog.c: stamp-recog ;
891stamp-recog : md genrecog $(srcdir)/move-if-change
892 ./genrecog md > tmp-recog.c
893 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
894 touch stamp-recog
895
896insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
897 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
898
899insn-extract.c: stamp-extract ;
900stamp-extract : md genextract $(srcdir)/move-if-change
901 ./genextract md > tmp-extract.c
902 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
903 touch stamp-extract
904
905insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
906 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
907
908insn-peep.c: stamp-peep ;
909stamp-peep : md genpeep $(srcdir)/move-if-change
910 ./genpeep md > tmp-peep.c
911 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
912 touch stamp-peep
913
914insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
915 insn-attr.h insn-config.h
916 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
917
918insn-attr.h: stamp-attr ;
919stamp-attr : md genattr $(srcdir)/move-if-change
920 ./genattr md > tmp-attr.h
921 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
922 touch stamp-attr
923
924insn-attrtab.c: stamp-attrtab ;
925stamp-attrtab : md genattrtab $(srcdir)/move-if-change
20bd0ab1
RS
926 if cmp -s $(PREMADE_ATTRTAB_MD) md; \
927 then \
928 echo Using $(PREMADE_ATTRTAB); \
929 cp $(srcdir)/$(PREMADE_ATTRTAB) tmp-attrtab.c; \
930 else \
931 ./genattrtab md > tmp-attrtab.c; \
932 fi
79d8453e
RS
933 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
934 touch stamp-attrtab
935
936insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
937 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
938 insn-codes.h
939 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
940
941insn-output.c: stamp-output ;
942stamp-output : md genoutput $(srcdir)/move-if-change
943 ./genoutput md > tmp-output.c
944 $(srcdir)/move-if-change tmp-output.c insn-output.c
945 touch stamp-output
946\f
947# Compile the programs that generate insn-* from the machine description.
948# They are compiled with $(HOST_CC), and associated libraries,
949# since they need to run on this machine
950# even if GCC is being compiled to run on some other machine.
951
952# $(CONFIG_H) is omitted from the deps of the gen*.o
953# because these programs don't really depend on anything
954# about the target machine. They do depend on config.h itself,
955# since that describes the host machine.
956
957genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
958 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
959 genconfig.o $(HOST_RTL) $(HOST_LIBS)
960
961genconfig.o : genconfig.c $(RTL_H) config.h
962 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
963
964genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
965 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
966 genflags.o $(HOST_RTL) $(HOST_LIBS)
967
968genflags.o : genflags.c $(RTL_H) config.h
969 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
970
971gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
972 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
973 gencodes.o $(HOST_RTL) $(HOST_LIBS)
974
975gencodes.o : gencodes.c $(RTL_H) config.h
976 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
977
978genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
979 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
980 genemit.o $(HOST_RTL) $(HOST_LIBS)
981
982genemit.o : genemit.c $(RTL_H) config.h
983 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
984
985genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
986 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
987 genrecog.o $(HOST_RTL) $(HOST_LIBS)
988
989genrecog.o : genrecog.c $(RTL_H) config.h
990 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
991
992genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
993 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
994 genextract.o $(HOST_RTL) $(HOST_LIBS)
995
9d85be6f 996genextract.o : genextract.c $(RTL_H) config.h insn-config.h
79d8453e
RS
997 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
998
999genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1000 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
1001 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1002
1003genpeep.o : genpeep.c $(RTL_H) config.h
1004 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1005
1006genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1007 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
1008 genattr.o $(HOST_RTL) $(HOST_LIBS)
1009
1010genattr.o : genattr.c $(RTL_H) config.h
1011 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1012
d3614a37 1013genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
79d8453e 1014 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
d3614a37 1015 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
79d8453e
RS
1016
1017genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
1018 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1019
1020genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1021 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
1022 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1023
1024genoutput.o : genoutput.c $(RTL_H) config.h
1025 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1026\f
1027# Compile the libraries to be used by gen*.
1028# If we are not cross-building, gen* use the same .o's that cc1 will use,
1029# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1030# with the rules for rtl.o, alloca.o, etc.
1031$(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1032 rm -f $(HOST_PREFIX)rtl.c
1033 cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c
1034 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1035
d3614a37
RS
1036$(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1037 rm -f $(HOST_PREFIX)print-rtl.c
1038 cp $(srcdir)/print-rtl.c $(HOST_PREFIX)print-rtl.c
1039 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1040
79d8453e
RS
1041$(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1042 rm -f $(HOST_PREFIX)rtlanal.c
1043 cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c
1044 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1045
1046$(HOST_PREFIX_1)alloca.o: alloca.c
1047 rm -f $(HOST_PREFIX)alloca.c
1048 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1049 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1050
1051$(HOST_PREFIX_1)obstack.o: obstack.c
1052 rm -f $(HOST_PREFIX)obstack.c
1053 cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c
1054 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1055
1056$(HOST_PREFIX_1)malloc.o: malloc.c
1057 rm -f $(HOST_PREFIX)malloc.c
1058 cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c
1059 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1060
1061# This satisfies the dependency that we get if you cross-compile a compiler
1062# that does not need to compile alloca, malloc or whatever.
1063$(HOST_PREFIX_1):
1064 touch $(HOST_PREFIX_1)
1065\f
1066# Remake cpp and protoize.
1067
1068# Making the preprocessor
1069cpp: cccp
1070 -rm -f cpp
1071 ln cccp cpp
1072cccp: cccp.o cexp.o version.o $(LIBDEPS)
1073 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
1074cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1075 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1076$(srcdir)/cexp.c: $(srcdir)/cexp.y
1077 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1078cccp.o: cccp.c $(CONFIG_H) pcp.h version.c
1079# The reason we use $(libdir)/g++-include rather than using libsubdir
1080# is for compatibility with the current version of libg++.
1081 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
2e494f70
RS
1082 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1083 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e 1084 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
2e494f70 1085 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
79d8453e
RS
1086 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1087
1088proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1
1089
2e494f70 1090protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
79d8453e 1091 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
2e494f70 1092 protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
79d8453e
RS
1093protoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H)
1094 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1095 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
2e494f70 1096 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e
RS
1097 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1098 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1099 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1100 $(srcdir)/protoize.c
1101
2e494f70 1102unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
79d8453e 1103 $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
2e494f70 1104 unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
79d8453e 1105unprotoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H)
9c0022f6 1106 -rm -f unprotoize.c
79d8453e
RS
1107 cp $(srcdir)/protoize.c unprotoize.c
1108 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1109 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
2e494f70 1110 -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
79d8453e
RS
1111 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1112 -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
1113 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1114 -DUNPROTOIZE unprotoize.c
79d8453e
RS
1115
1116getopt.o: $(srcdir)/getopt.c getopt.h
1117 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1118getopt1.o: $(srcdir)/getopt1.c getopt.h
1119 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1120
1121protoize.1: $(srcdir)/proto-man ./cpp
1122 ./cpp -traditional $(srcdir)/proto-man \
1123 | grep -v '^#' \
2e494f70
RS
1124 | awk 'NF > 0 {print}' > tmp-proto.1
1125 mv tmp-proto.1 protoize.1
79d8453e
RS
1126
1127unprotoize.1: $(srcdir)/proto-man ./cpp
1128 ./cpp -traditional -DUNPRO $(srcdir)/proto-man \
1129 | grep -v '^#' \
2e494f70
RS
1130 | awk 'NF > 0 {print}' > tmp-unproto.1
1131 mv tmp-unproto.1 unprotoize.1
1132
79d8453e 1133# This info describes the target machine, so compile with GCC just built.
47547081
RS
1134SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
1135 -rm -f SYSCALLS.c
1136 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
79d8453e 1137 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
47547081
RS
1138 -aux-info $@ -S -o /dev/null SYSCALLS.c
1139 -rm -f SYSCALLS.c
9c0022f6
RS
1140
1141test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
d3614a37
RS
1142 -rm -f tmp-proto.*
1143 cp $(srcdir)/protoize.c tmp-proto.c
1144 chmod u+w tmp-proto.c
9c0022f6
RS
1145 ./protoize -N -B ./ -c "-B./ -Wall -Wwrite-strings $(CFLAGS) \
1146 $(INCLUDES) \
1147 -DGCC_INCLUDE_DIR=0 \
1148 -DGPLUSPLUS_INCLUDE_DIR=0 \
1149 -DCROSS_INCLUDE_DIR=0 \
d3614a37 1150 -DSTD_PROTO_DIR=0" tmp-proto.c
9c0022f6 1151 @echo Expect 324 lines of differences.
d3614a37 1152 diff $(srcdir)/protoize.c tmp-proto.c | wc -l
9c0022f6
RS
1153 ./unprotoize -N -c "-B./ -Wall -Wwrite-strings $(CFLAGS) \
1154 $(INCLUDES) \
1155 -DGCC_INCLUDE_DIR=0 \
1156 -DGPLUSPLUS_INCLUDE_DIR=0 \
1157 -DCROSS_INCLUDE_DIR=0 \
d3614a37 1158 -DSTD_PROTO_DIR=0" tmp-proto.c
9c0022f6 1159 @echo Expect zero differences.
d3614a37
RS
1160 diff $(srcdir)/protoize.c tmp-proto.c | cat
1161 -rm -f tmp-proto.*
79d8453e
RS
1162\f
1163# Remake the info files.
1164
47547081 1165doc: $(srcdir)/cpp.info $(srcdir)/gcc.info
79d8453e
RS
1166
1167$(srcdir)/cpp.info: $(srcdir)/cpp.texi
1168 makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
1169
47547081
RS
1170#$(srcdir)/gplus.info: $(srcdir)/gplus.texi
1171# makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
79d8453e
RS
1172
1173$(srcdir)/gcc.info: $(srcdir)/gcc.texi
1174 makeinfo `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
1175\f
1176# Deletion of files made during compilation.
1177# There are four levels of this:
47547081 1178# `mostlyclean', `clean', `distclean' and `realclean'.
79d8453e 1179# `mostlyclean' is useful while working on a particular type of machine.
2e494f70 1180# It deletes most, but not all, of the files made by compilation.
79d8453e 1181# It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2e494f70 1182# `clean' deletes everything made by running `make all'.
47547081 1183# `distclean' also deletes the files made by config.
79d8453e
RS
1184# `realclean' also deletes everything that could be regenerated automatically.
1185
47547081 1186
79d8453e
RS
1187mostlyclean:
1188 -rm -f $(STAGESTUFF)
1189# Delete the temporary source copies for cross compilation.
1190 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
1191 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
1192 -rm -f $(HOST_PREFIX_1)obstack.c
1193# Delete the temp files made in the course of building libgcc.a.
2e494f70 1194 -rm -f tmplibgcc* tmpcopy
79d8453e
RS
1195 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
1196# Delete other temporary files.
2e494f70 1197 -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h gccnew
d3614a37 1198 -rm -f tmp-foo1 tmp-foo2 tmp-proto.c
79d8453e
RS
1199# Delete the stamp files.
1200 -rm -f stamp-* tmp-*
2e494f70 1201# Delete debugging dump files.
79d8453e 1202 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2e494f70
RS
1203 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
1204# Delete some files made during installation.
1205 -rm -f specs float.h enquire SYSCALLS.c SYSCALLS.c.X
47547081 1206 -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
2e494f70
RS
1207# Delete unwanted output files from TeX.
1208 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
47547081
RS
1209# Delete sorted indices we don't actually use.
1210 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2e494f70
RS
1211# Delete core dumps.
1212 -rm -f core
79d8453e 1213
47547081
RS
1214# Delete all files made by compilation
1215# that don't exist in the distribution.
79d8453e 1216clean: mostlyclean
20bd0ab1
RS
1217# It may not be quite desirable to delete unprotoize.c here,
1218# but the spec for `make clean' requires it.
1219# Using unprotoize.c is not quite right in the first place,
1220# but what better way is there?
1221 -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready unprotoize.c
79d8453e 1222
47547081
RS
1223# Delete all files that users would normally create
1224# while building and installing GCC.
2e494f70 1225distclean: clean
79d8453e 1226 -rm -f tm.h aux-output.c config.h md config.status tconfig.h
2e494f70 1227 -rm -f Makefile *.dvi *.oaux
47547081 1228 -rm -fr stage1 stage2 stage3 stage4
2e494f70
RS
1229
1230# Delete anything likely to be found in the source directory
1231# that shouldn't be in the distribution.
1232extraclean: distclean
47547081
RS
1233 -rm -rf =* #* *~* config/=* config/#* config/*~*
1234 -rm -f *.dvi *.oaux patch* config/patch* *.orig *.rej *.d *.Z *.tar
2e494f70 1235 -rm -f *.s *.s[0-9] *.i
79d8453e
RS
1236
1237# Get rid of every file that's generated from some other file.
1238# Most of these files ARE PRESENT in the GCC distribution.
2e494f70 1239realclean: distclean
79d8453e
RS
1240 -rm -f cp-parse.c cp-parse.h cp-parse.output
1241 -rm -f objc-parse.c objc-parse.output
1242 -rm -f protoize.1 unprotoize.1
1243 -rm -f c-parse.c c-parse.h c-parse.output
1244 -rm -f cexp.c cexp.output TAGS
2e494f70
RS
1245 -rm -f cpp.info* cpp.??s cpp.*aux
1246 -rm -f gcc.info* gcc.??s gcc.*aux
1247 -rm -f gplus.info* gplus.??s gplus.*aux
79d8453e
RS
1248\f
1249# Entry points `install' and `uninstall'.
1250# Also temporarily `install-fixincludes' could replace `install-headers'.
2e494f70 1251# Also use `install-collect2' to install collect2 when the config files don't.
79d8453e
RS
1252
1253install: $(INSTALL_TARGET)
1254
1255# Copy the files of native compiler into directories where they will be run.
1256install-native: install-common install-libgcc $(INSTALL_HEADERS) \
2e494f70 1257 install-man
79d8453e
RS
1258
1259# Copy the files of cross compiler into directories where they will be run.
1260install-cross: install-common install-common-headers \
1261 install-man install-cross-tools install-libgcc
1262
1263# Install the tools, libraries and header files for the target machine
1264# where cross-compilation will look for them.
1265# Use tooldir to find them.
1266install-cross-tools: install-dir
1267# The first if makes this a no-op except for a cross compiler.
1268# The /. after the dirname causes test to follow symlinks.
1269# Before making a link or an indirection script,
1270# we verify the desired file does not already exist.
1271# If a symlink does exist, then making a symlink would certainly fail,
1272# leading us to overwrite the real file through the symlink.
1273 -if [ -f gcc-cross ] ; \
1274 then \
1275 if [ -d $(tooldir)/. ] ; \
1276 then \
1277 for file in as ld ar ranlib; do \
1278 if [ -f $(libsubdir)/$$file ] ; \
1279 then true; \
1280 else \
1281 $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \
1282 || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \
1283 fi; \
1284 done; \
1285 for file in $(tooldir)/lib/*; do \
1286 if [ -f $$file ] ; \
1287 then \
1288 if [ -f $(libsubdir)/`basename $$file` ] ; \
1289 then true; \
1290 else \
1291 $(SYMLINK) $$file $(libsubdir)/`basename $$file` \
1292 || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \
1293 fi; \
1294 else true; \
1295 fi; \
1296 done; \
1297 if [ -d $(tooldir)/include/. ] ; then \
1298 $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \
1299 || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \
1300 cd $(tooldir)/include; tar cf - . | (cd $(libsubdir)/sys-include; tar xpf -)); \
1301 else true; fi; \
1302 else true; \
1303 fi; \
1304 else true; \
1305 fi;
1306
1307# Run this on the target machine
1308# to finish installation of cross compiler.
1309install-cross-rest: install-float-h-cross
1310
1311# Install float.h for cross compiler.
1312# Run this on the target machine!
1313install-float-h-cross:
1314 if [ -f enquire ] ; then true; else false; done
1315 -./enquire -f > float.h
1316 -rm -f $(libsubdir)/include/float.h
1317 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1318 chmod a-x $(libsubdir)/include/float.h
1319
1320# Create the installation directory.
1321install-dir:
935e11b0
TW
1322 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
1323 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
1324 -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
1325 -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
1326 -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
1327 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
79d8453e
RS
1328# We don't use mkdir -p to create the parents of mandir,
1329# because some systems don't support it.
1330# Instead, we use this technique to create the immediate parent of mandir.
935e11b0 1331 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
79d8453e
RS
1332 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
1333 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
1334
1335# Install the compiler executables built during cross compilation.
1336install-common: native install-dir
1337 for file in $(COMPILERS); do \
1338 if [ -f $$file ] ; then \
1339 rm -f $(libsubdir)/$$file; \
1340 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1341 else true; \
1342 fi; \
1343 done
47547081 1344 for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
79d8453e
RS
1345 if [ x"$$file" != x.. ]; then \
1346 rm -f $(libsubdir)/$$file; \
1347 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
1348 else true; fi; \
1349 done
1350 -rm -f $(libsubdir)/specs
1351 $(INSTALL_DATA) specs $(libsubdir)/specs
1352# Install the driver program as gcc-$(target)
1353# and also as either gcc (if native) or $(tooldir)/bin/gcc.
1354 -if [ -f gcc-cross ] ; then \
2e494f70 1355 $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \
79d8453e
RS
1356 if [ -d $(tooldir)/bin/. ] ; then \
1357 rm -f $(tooldir)/bin/gcc; \
1358 $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
79d8453e
RS
1359 else true; fi; \
1360 else \
1361 rm -f $(bindir)/gcc; \
1362 $(INSTALL_PROGRAM) gcc $(bindir)/gcc; \
1363 rm -f $(bindir)/gcc-$(target)-1; \
1364 ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
1365 mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
1366 fi
1367 $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++
1368 $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++
1369 -rm -f $(libsubdir)/cpp
1370 $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
1371
1372# Install protoize.
1373install-proto: proto install-dir
1374 -rm -f $(bindir)/protoize
1375 $(INSTALL_PROGRAM) protoize $(bindir)/protoize
1376 -rm -f $(bindir)/unprotoize
1377 $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize
1378 -rm -f $(libsubdir)/SYSCALLS.c.X
1379 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X
1380 chmod a-x $(libsubdir)/SYSCALLS.c.X
1381
1382# Install the man pages.
2e494f70
RS
1383install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 \
1384 protoize.1 unprotoize.1 $(srcdir)/g++.1
79d8453e
RS
1385 -rm -f $(mandir)/gcc$(manext)
1386 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
1387 chmod a-x $(mandir)/gcc$(manext)
2e494f70
RS
1388 -rm -f $(mandir)/cccp$(manext)
1389 $(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
1390 chmod a-x $(mandir)/cccp$(manext)
79d8453e
RS
1391 -rm -f $(mandir)/protoize$(manext)
1392 $(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext)
1393 chmod a-x $(mandir)/protoize$(manext)
1394 -rm -f $(mandir)/unprotoize$(manext)
1395 $(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext)
1396 chmod a-x $(mandir)/unprotoize$(manext)
2e494f70
RS
1397 -rm -f $(mandir)/g++$(manext)
1398 $(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
1399 chmod a-x $(mandir)/g++$(manext)
79d8453e
RS
1400
1401# Install the library.
1402install-libgcc: libgcc.a
1403 -if [ -f libgcc.a ] ; then \
1404 rm -f $(libsubdir)/libgcc.a; \
1405 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
1406 if $(RANLIB_TEST) ; then \
1407 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
1408 chmod a-x $(libsubdir)/libgcc.a; \
1409 else true; fi
1410
1411# Install all the header files for native compiler.
1412install-headers: install-common-headers install-float-h install-limits-h
1413
1414# Install float.h for native compiler.
1415install-float-h: float.h
1416 -rm -f $(libsubdir)/include/float.h
1417 $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
1418 chmod a-x $(libsubdir)/include/float.h
1419
1420# Install limits.h, optionally inheriting from the standard system version.
1421install-limits-h: limits.h limitx.h
1422 -rm -f $(libsubdir)/include/limits.h tmp-limits.h
1423 if [ -f /usr/include/limits.h ] ; then \
1424 cat $(srcdir)/limitx.h $(srcdir)/limits.h > tmp-limits.h; \
1425 else \
1426 cat $(srcdir)/limits.h > tmp-limits.h; \
1427 fi
1428 $(INSTALL_DATA) tmp-limits.h $(libsubdir)/include/limits.h
1429 chmod a-x $(libsubdir)/include/limits.h
1430 rm tmp-limits.h
1431
1432# Install the fixed headers that are the same for all machines.
1433install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h
935e11b0 1434 -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
79d8453e
RS
1435 -chmod ugo+rx $(libsubdir)/include
1436# Must compute $(libsubdir) before the cd; the awk script won't work after.
1437 shelllibsubdir=$(libsubdir); \
1438 cd $(srcdir); \
1439 for file in $(USER_H); do \
1440 rm -f $$shelllibsubdir/include/`basename $$file`; \
1441 $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \
1442 chmod a-x $$shelllibsubdir/include/`basename $$file`; \
1443 done
1444 -rm -f $(libsubdir)/include/varargs.h
1445 $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h
1446 chmod a-x $(libsubdir)/include/varargs.h
1447 -rm -f $(libsubdir)/include/stdarg.h
1448 $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h
1449 chmod a-x $(libsubdir)/include/stdarg.h
1450 -rm -f $(libsubdir)/include/stddef.h
1451 $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h
1452 chmod a-x $(libsubdir)/include/stddef.h
2e494f70
RS
1453# Copy byteorder.h into the object file directory
1454# so that fixinc.svr4 can get at it if necessary.
1455# If the dirs are the same, this won't do anything.
9c0022f6 1456# Delete file first in case it is read-only
9c4614c3
TW
1457 -if [ "$(srcdir)" != "." ]; then rm -f byteorder.h; else true; fi
1458 -cp $(srcdir)/byteorder.h . > /dev/null 2>&1
79d8453e
RS
1459
1460# $(libsubdir)/include:
935e11b0 1461# -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
79d8453e
RS
1462# -chmod ugo+rx $(libsubdir)/include
1463
1464# This appears not to work. It isn't clear how to fix it.
2e494f70
RS
1465# $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
1466# LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
79d8453e
RS
1467# $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
1468# chmod a-x $@
1469
1470# Run fixincludes in the proper directory.
1471install-fixincludes: install-headers
1472 rm -rf $(libsubdir)/tmp
1473 mkdir $(libsubdir)/tmp
1474# Move aside the headers that come from GCC; delete all else.
2e494f70
RS
1475# The sed command gets just the last file name component;
1476# this is necessary because VPATH could add a dirname.
1477# Using basename would be simpler, but some systems don't have it.
1478 cd $(libsubdir)/include; \
1479 for file in $(INSTALLED_H); do \
1480 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1481 mv $$realfile ../tmp; \
1482 done; \
1483 rm -rf *
79d8453e
RS
1484# Install fixed copies of system files.
1485 $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include
1486# Bring back gcc's header files.
1487 cd $(libsubdir)/include; mv ../tmp/* .; rmdir ../tmp
1488# Install the README
1489 $(INSTALL_DATA) $(srcdir)/README-fixinc $(libsubdir)/include/README
1490 chmod a-x $(libsubdir)/include/README
1491
2e494f70
RS
1492# Use this target to install the program `collect2' under the name `ld'.
1493install-collect2: collect2
1494 $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
1495# Install the driver program as $(libsubdir)/gcc for collect2.
1496 -if [ -f gcc-cross ] ; then \
1497 $(INSTALL_PROGRAM) gcc-cross $(libsubdir)/gcc; \
1498 else \
1499 $(INSTALL_PROGRAM) gcc $(libsubdir)/gcc; \
1500 fi
1501
79d8453e
RS
1502# Cancel installation by deleting the installed files.
1503uninstall:
1504 -rm -rf $(libsubdir)
1505 -rm -rf $(bindir)/gcc
79d8453e
RS
1506 -rm -rf $(bindir)/protoize
1507 -rm -rf $(bindir)/unprotoize
1508 -rm -rf $(mandir)/gcc$(manext)
2e494f70 1509 -rm -rf $(mandir)/cccp$(manext)
79d8453e
RS
1510 -rm -rf $(mandir)/protoize$(manext)
1511 -rm -rf $(mandir)/unprotoize$(manext)
1512\f
1513# These exist for maintenance purposes.
1514
1515# Update the tags table.
1516TAGS: force
1517 cd $(srcdir); \
1518 mkdir temp; \
1519 mv -f c-parse.c c-parse.h cp-parse.c cp-parse.h objc-parse.c cexp.c temp; \
1520 etags *.y *.h *.c; \
1521 mv temp/* .; \
1522 rmdir temp
1523
1524# Create the distribution tar file.
1525#dist: gcc-$(version).tar.Z
1526dist: gcc.xtar.Z
1527
2e494f70 1528gcc.xtar.Z: gcc.xtar
79d8453e
RS
1529 compress < gcc.xtar > tmp-gcc.xtar.Z
1530 mv tmp-gcc.xtar.Z gcc.xtar.Z
1531
1532#gcc-$(version).tar.Z: gcc-$(version).tar
1533# compress < gcc-$(version).tar > gcc-$(version).tar.Z
1534
1535#gcc-$(version).tar:
1536gcc.xtar:
2e494f70 1537 -rm -rf gcc-$(version) tmp
79d8453e
RS
1538# Put all the files in a temporary subdirectory
1539# which has the name that we want to have in the tar file.
2e494f70
RS
1540 mkdir tmp
1541 mkdir tmp/config
1542 for file in *[0-9a-zA-Z+]; do \
1543 ln $$file tmp || cp $$file tmp; \
1544 done
1545 cd config; \
1546 for file in *[0-9a-zA-Z+]; do \
1547 ln $$file ../tmp/config || cp $$file ../tmp/config; \
79d8453e 1548 done
2e494f70
RS
1549 ln .gdbinit tmp
1550 mv tmp gcc-$(version)
79d8453e 1551# Get rid of everything we don't want in the distribution.
2e494f70 1552 cd gcc-$(version); make -f Makefile.in extraclean
79d8453e
RS
1553# Make the distribution.
1554 tar chf gcc.xtar gcc-$(version)
1555# Get rid of the temporary directory.
1556 rm -rf gcc-$(version)
47547081
RS
1557# Update the version number in README
1558 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
1559 { $$6 = version; print $$0 } \
1560 $$1 " " $$2 " " $$3 != "This directory contains"' \
1561 version=$(version) README > tmp.README
1562 mv tmp.README README
79d8453e
RS
1563
1564# do make -f ../gcc/Makefile maketest DIR=../gcc
1565# in the intended test directory to make it a suitable test directory.
1566# THIS IS OBSOLETE; use the -srcdir operand in configure instead.
1567maketest:
1568 ln -s $(DIR)/*.[chy] .
1569 ln -s $(DIR)/configure .
1570 ln -s $(DIR)/*.def .
1571 -rm -f =*
1572 ln -s $(DIR)/.gdbinit .
1573 ln -s $(DIR)/$(FIXINCLUDES) .
1574 -ln -s $(DIR)/bison.simple .
1575 ln -s $(DIR)/config .
1576 ln -s $(DIR)/move-if-change .
1577# The then and else were swapped to avoid a problem on Ultrix.
1578 if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
1579 -rm tm.h aux-output.c config.h md
1580 make clean
1581# You must then run config to set up for compilation.
9c4614c3
TW
1582bootstrap: force
1583# Only build the C compiler for stage1, because that is the only one that
1584# we can guarantee will build with the native compiler, and also it is the
1585# only thing useful for building stage2.
1586 $(MAKE) LANGUAGES=c
79d8453e 1587 $(MAKE) stage1
2e494f70
RS
1588# This used to define ALLOCA as empty, but that would lead to bad results
1589# for a subsequent `make install' since that would not have ALLOCA empty.
1590# To prevent `make install' from compiling alloca.o and then relinking cc1
1591# because alloca.o is newer, we permit these recursive makes to compile
1592# alloca.o. Then cc1 is newer, so it won't have to be relinked.
1593 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1594 $(MAKE) stage2
2e494f70 1595 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e
RS
1596
1597bootstrap2: force
2e494f70 1598 $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1599 $(MAKE) stage2
2e494f70 1600 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e
RS
1601
1602bootstrap3: force
2e494f70 1603 $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
79d8453e 1604
dcfedcd0
RK
1605# Compare the object files in the current directory with those in the
1606# stage2 directory.
1607
1608compare: force
1609 for file in *.o; do \
9d85be6f
RK
1610 tail +10c $$file > tmp-foo1; \
1611 tail +10c stage2/$$file > tmp-foo2; \
1612 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
dcfedcd0
RK
1613 done
1614 -rm -f tmp-foo*
1615
1616# Similar, but compare with stage3 directory
1617compare3: force
1618 for file in *.o; do \
9d85be6f
RK
1619 tail +10c $$file > tmp-foo1; \
1620 tail +10c stage3/$$file > tmp-foo2; \
1621 cmp tmp-foo1 tmp-foo2 || echo $$file differs; \
dcfedcd0
RK
1622 done
1623 -rm -f tmp-foo*
1624
79d8453e
RS
1625# Copy the object files from a particular stage into a subdirectory.
1626stage1: force
2e494f70 1627 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
79d8453e
RS
1628 -mv $(STAGESTUFF) stage1
1629 -rm -f stage1/libgcc.a
1630 -cp libgcc.a stage1
1631 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
1632
1633stage2: force
2e494f70 1634 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
79d8453e
RS
1635 -mv $(STAGESTUFF) stage2
1636 -rm -f stage2/libgcc.a
1637 -cp libgcc.a stage2
1638 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
1639
1640stage3: force
935e11b0 1641 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
79d8453e
RS
1642 -mv $(STAGESTUFF) stage3
1643 -rm -f stage3/libgcc.a
1644 -cp libgcc.a stage3
1645 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
1646
1647stage4: force
935e11b0 1648 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
79d8453e
RS
1649 -mv $(STAGESTUFF) stage4
1650 -rm -f stage4/libgcc.a
1651 -cp libgcc.a stage4
1652 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
1653
1654# Copy just the executable files from a particular stage into a subdirectory,
1655# and delete the object files. Use this if you're just verifying a version
1656# that is pretty sure to work, and you are short of disk space.
1657risky-stage1: force
935e11b0 1658 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
79d8453e
RS
1659 -mv cc1 cpp cccp gcc stage1
1660 -rm -f stage1/libgcc.a
1661 -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
1662 -make clean
1663
1664risky-stage2: force
935e11b0 1665 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
79d8453e
RS
1666 -mv cc1 cpp cccp gcc stage2
1667 -rm -f stage2/libgcc.a
1668 -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
1669 -make clean
1670
1671risky-stage3: force
935e11b0 1672 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
79d8453e
RS
1673 -mv cc1 cpp cccp gcc stage3
1674 -rm -f stage3/libgcc.a
1675 -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
1676 -make clean
1677
1678risky-stage4: force
935e11b0 1679 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
79d8453e
RS
1680 -mv cc1 cpp cccp gcc stage4
1681 -rm -f stage4/libgcc.a
1682 -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
1683 -make clean
1684
1685#In GNU Make, ignore whether `stage*' exists.
1686.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
1687.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
1688
1689force: