* emit-rtl.c (gen_lowpart_common): Suppress last change if __complex__.
[official-gcc.git] / gcc / Makefile.in
blobe85ed555b0c32bd851b94396c51103e68d21e5ba
1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
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.
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.
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, 59 Temple Place - Suite 330,
19 #Boston MA 02111-1307, USA.
21 # The targets for external use include:
22 # all, doc, proto, install, install-cross, install-cross-rest,
23 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
24 # stage1, stage2, stage3, stage4.
26 # Suppress smart makes who think they know how to automake Yacc files
27 .y.c:
29 # Directory where sources are, from where we are.
30 srcdir = @srcdir@
31 VPATH = @srcdir@
33 # Variables that exist for you to override.
34 # See below for how to change them for certain systems.
36 # List of language subdirectories.
37 # This is overridden by configure.
38 SUBDIRS =@subdirs@
40 # Selection of languages to be made.
41 # This is overridden by configure.
42 LANGUAGES = c proto gcov @all_languages@
44 # Selection of languages to be made during stage1 build.
45 # This is overridden by configure.
46 BOOT_LANGUAGES = c @all_boot_languages@
48 ALLOCA =
49 ALLOCA_FLAGS =
50 ALLOCA_FINISH = true
52 # Various ways of specifying flags for compilations:
53 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
54 # BOOT_CFLAGS is the value of CFLAGS to pass
55 # to the stage2 and stage3 compilations
56 # XCFLAGS is used for most compilations but not when using the GCC just built.
57 # TCFLAGS is used for compilations with the GCC just built.
58 XCFLAGS =
59 TCFLAGS =
60 CFLAGS = -g
61 BOOT_CFLAGS = -O2 $(CFLAGS)
62 # These exists to be overridden by the x-* and t-* files, respectively.
63 X_CFLAGS =
64 T_CFLAGS =
66 X_CPPFLAGS =
67 T_CPPFLAGS =
69 CC = @CC@
70 BISON = bison
71 BISONFLAGS =
72 LEX = flex
73 LEXFLAGS =
74 AR = ar
75 AR_FLAGS = rc
76 DLLTOOL = dlltool
77 SHELL = /bin/sh
78 # on sysV, define this as cp.
79 INSTALL = @INSTALL@
80 # Some systems may be missing symbolic links, regular links, or both.
81 # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
82 LN=@LN@
83 LN_S=@LN_S@
84 # These permit overriding just for certain files.
85 INSTALL_PROGRAM = @INSTALL_PROGRAM@
86 INSTALL_DATA = @INSTALL_DATA@
87 MAKEINFO = makeinfo
88 MAKEINFOFLAGS =
89 TEXI2DVI = texi2dvi
90 # For GNUmake: let us decide what gets passed to recursive makes.
91 MAKEOVERRIDES =
92 @SET_MAKE@
94 # Define this as & to perform parallel make on a Sequent.
95 # Note that this has some bugs, and it seems currently necessary
96 # to compile all the gen* files first by hand to avoid erroneous results.
97 P =
99 # How to invoke ranlib.
100 RANLIB = ranlib
101 # Test to use to see whether ranlib exists on the system.
102 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
104 # Compiler to use for compiling libgcc1.a.
105 # OLDCC should not be the GNU C compiler,
106 # since that would compile typical libgcc1.a functions such as mulsi3
107 # into infinite recursions.
108 OLDCC = cc
110 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
111 # NOTE: -O does not work on some Unix systems!
112 CCLIBFLAGS = -O
114 # Version of ar to use when compiling libgcc1.a.
115 OLDAR = ar
116 OLDAR_FLAGS = qc
118 # Target to use when installing include directory. Either
119 # install-headers-tar or install-headers-cpio.
120 INSTALL_HEADERS_DIR = @build_install_headers_dir@
122 # Header files that are made available under the same name
123 # to programs compiled with GCC.
124 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
125 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
126 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
127 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
128 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10200.h \
129 $(srcdir)/ginclude/va-mn10300.h $(srcdir)/ginclude/va-pa.h \
130 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
131 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
132 $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
133 $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
134 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
135 $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
136 $(LANG_EXTRA_HEADERS)
138 # Target to use whe installing assert.h. Some systems may
139 # want to set this empty.
140 INSTALL_ASSERT_H = install-assert-h
142 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
143 # Usually the one we just built.
144 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
145 GCC_FOR_TARGET = ./xgcc -B./
147 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
148 # It omits XCFLAGS, and specifies -B./.
149 # It also specifies -I./include to find, e.g., stddef.h.
150 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
152 # Special flags for compiling enquire.
153 # We disable optimization to make floating point more reliable.
154 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
155 ENQUIRE_LDFLAGS = $(LDFLAGS)
157 # Sed command to transform gcc to installed name. Overwritten by configure.
158 program_transform_name = @program_transform_name@
159 program_transform_cross_name = s,^,$(target_alias)-,
161 # Tools to use when building a cross-compiler.
162 # These are used because `configure' appends `cross-make'
163 # to the makefile when making a cross-compiler.
165 TARGET_TOOLPREFIX = $(tooldir)/bin/
166 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
167 AR_FOR_TARGET_FLAGS = rc
168 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
169 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
171 # Dir to search for system headers. Overridden by cross-make.
172 SYSTEM_HEADER_DIR = /usr/include
174 # Control whether to run fixproto.
175 STMP_FIXPROTO = stmp-fixproto
177 # Test to see whether <limits.h> exists in the system header files.
178 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
180 # There may be a premade insn-attrtab.c for this machine.
181 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
182 # PREMADE_ATTRTAB is the file name of the file to use.
183 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
184 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
185 PREMADE_ATTRTAB =
187 target=@target@
188 target_alias=@target_alias@
189 xmake_file=@dep_host_xmake_file@
190 tmake_file=@dep_tmake_file@
191 out_file=$(srcdir)/config/@out_file@
192 out_object_file=@out_object_file@
193 md_file=$(srcdir)/config/@md_file@
194 tm_file=@tm_file_list@
195 build_xm_file=@build_xm_file_list@
196 host_xm_file=@host_xm_file_list@
197 lang_specs_files=@lang_specs_files@
198 lang_options_files=@lang_options_files@
199 GCC_THREAD_FILE=@thread_file@
200 version=@version@
201 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
203 # Common prefix for installation directories.
204 # NOTE: This directory must exist when you start installation.
205 prefix = @prefix@
206 # Directory in which to put localized header files. On the systems with
207 # gcc as the native cc, `local_prefix' may not be `prefix' which is
208 # `/usr'.
209 # NOTE: local_prefix *should not* default from prefix.
210 local_prefix = @local_prefix@
211 # Directory in which to put host dependent programs and libraries
212 exec_prefix = @exec_prefix@
213 # Directory in which to put the executable for the command `gcc'
214 bindir = @bindir@
215 # Directory in which to put the directories used by the compiler.
216 libdir = @libdir@
217 # Directory in which the compiler finds executables, libraries, etc.
218 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
219 # Directory in which the compiler finds g++ includes.
220 gxx_include_dir= @gxx_include_dir@
221 # Directory in which the old g++ header files may be found.
222 old_gxx_include_dir= $(libdir)/g++-include
223 # Directory to search for site-specific includes.
224 includedir = $(local_prefix)/include
225 # assertdir is overridden in cross-make.
226 # (But this currently agrees with what is in cross-make.)
227 assertdir = $(tooldir)/include
228 # where the info files go
229 infodir = @infodir@
230 # Extension (if any) to put in installed man-page filename.
231 manext = .1
232 objext = .o
233 exeext = @build_exeext@
235 # Directory in which to put man pages.
236 mandir = @mandir@/man1
237 # Directory in which to find other cross-compilation tools and headers.
238 # Used in install-cross.
239 tooldir = $(exec_prefix)/$(target_alias)
240 # Dir for temp files.
241 tmpdir = /tmp
243 # Additional system libraries to link with.
244 CLIB=
246 # Change this to a null string if obstacks are installed in the
247 # system library.
248 OBSTACK=obstack.o
250 # Specify the rule for actually making libgcc.a,
251 LIBGCC = libgcc.a
252 # and the rule for installing it.
253 INSTALL_LIBGCC = install-libgcc
255 # Specify the rule for actually making libgcc1.a.
256 # The value may be empty; that means to do absolutely nothing
257 # with or for libgcc1.a.
258 LIBGCC1 = libgcc1.a
260 # Specify the rule for making libgcc1.a for a cross-compiler.
261 # The default rule assumes that libgcc1.a is supplied by the user.
262 CROSS_LIBGCC1 = libgcc1.cross
264 # Specify the rule for actually making libgcc2.a.
265 LIBGCC2 = libgcc2.a
267 # Options to use when compiling libgcc2.a.
268 # -g1 causes output of debug info only for file-scope entities.
269 # we use this here because that should be enough, and also
270 # so that -g1 will be tested.
272 # -fexceptions is necessary for eh.o now that the exceptions are
273 # the default for g++ only.
274 LIBGCC2_DEBUG_CFLAGS = -g1
275 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions @inhibit_libc@
277 # Additional options to use when compiling libgcc2.a.
278 # Some targets override this to -Iinclude
279 LIBGCC2_INCLUDES =
281 # Additional target-dependent options for compiling libgcc2.a.
282 TARGET_LIBGCC2_CFLAGS =
284 # Things which must be built before building libgcc2.a.
285 # Some targets override this to stmp-int-hdrs
286 LIBGCC2_DEPS =
288 # Enquire target (This is a variable so that a target can choose not to
289 # build it.)
290 ENQUIRE = enquire
292 # libgcc1-test target (must also be overridable for a target)
293 LIBGCC1_TEST = libgcc1-test
295 # List of extra executables that should be compiled for this target machine
296 # that are used for compiling from source code to object code.
297 # The rules for compiling them should be in the t-* file for the machine.
298 EXTRA_PASSES =@extra_passes@
300 # Like EXTRA_PASSES, but these are used when linking.
301 EXTRA_PROGRAMS = @extra_programs@
303 # List of extra object files that should be compiled for this target machine.
304 # The rules for compiling them should be in the t-* file for the machine.
305 EXTRA_PARTS = @extra_parts@
307 # List of extra object files that should be compiled and linked with
308 # compiler proper (cc1, cc1obj, cc1plus).
309 EXTRA_OBJS = @extra_objs@
311 # List of extra object files that should be compiled and linked with
312 # the gcc driver.
313 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
315 # List of additional header files to install.
316 # Often this is edited directly by `configure'.
317 EXTRA_HEADERS =@extra_headers_list@
319 # Set this to `ld' to enable use of collect2.
320 USE_COLLECT2 = @will_use_collect2@
321 MAYBE_USE_COLLECT2 = @maybe_use_collect2@
322 # It is convenient for configure to add the assignment at the beginning,
323 # so don't override it here.
324 USE_COLLECT2 = ld
326 # List of extra C and assembler files to add to libgcc1.a.
327 # Assembler files should have names ending in `.asm'.
328 LIB1FUNCS_EXTRA =
330 # List of extra C and assembler files to add to libgcc2.a.
331 # Assembler files should have names ending in `.asm'.
332 LIB2FUNCS_EXTRA =
334 # Default float.h source to use for cross-compiler.
335 # This is overidden by configure.
336 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
338 # Program to convert libraries.
339 LIBCONVERT =
341 # Control whether header files are installed.
342 INSTALL_HEADERS=install-headers
344 # Options for tar when copying trees. So HPUX can override it.
345 TAROUTOPTS = xpBf
347 # Select which version of fixincludes to use (I.E. regular versus SVR4)
348 # This value is overridden directly by configure.
349 FIXINCLUDES = @fixincludes@
351 # Additional directories of header files to run fixincludes on.
352 # These should be directories searched automatically by default
353 # just as /usr/include is.
354 # *Do not* use this for directories that happen to contain
355 # header files, but are not searched automatically by default.
356 # On most systems, this is empty.
357 OTHER_FIXINCLUDES_DIRS=
359 # A list of all the language-specific executables.
360 # This is overridden by configure.
361 COMPILERS = cc1$(exeext) @all_compilers@
363 # List of things which should already be built whenever we try to use xgcc
364 # to compile anything (without linking).
365 GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
367 # List of things which should already be built whenever we try to use xgcc
368 # to link anything.
369 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
371 # Directory to link to, when using the target `maketest'.
372 DIR = ../gcc
374 # Guaranteed to not exist when not passing md through cpp.
375 # This value is overridden directly by configure.
376 MD_FILE = md-cpp-not-used
378 # Flags to use when cross-building GCC.
379 # Prefix to apply to names of object files when using them
380 # to run on the machine we are compiling on.
381 HOST_PREFIX=
382 # Prefix to apply to names of object files when compiling them
383 # to run on the machine we are compiling on.
384 # The default for this variable is chosen to keep these rules
385 # out of the way of the other rules for compiling the same source files.
386 HOST_PREFIX_1=loser-
387 HOST_CC=$(CC)
388 HOST_CFLAGS=$(ALL_CFLAGS)
389 HOST_CLIB=$(CLIB)
390 HOST_LDFLAGS=$(LDFLAGS)
391 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
392 HOST_ALLOCA=$(ALLOCA)
393 HOST_MALLOC=$(MALLOC)
394 HOST_OBSTACK=$(OBSTACK)
396 # Actual name to use when installing a native compiler.
397 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
399 # Actual name to use when installing a cross-compiler.
400 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
402 # Choose the real default target.
403 ALL=all.internal
405 # Choose the real install target.
406 INSTALL_TARGET=install-normal
408 # Source for float.h. Overridden by cross-make.
409 FLOAT_H=float.h-nat
411 # Setup the testing framework, if you have one
412 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
413 echo $${rootme}/../expect/expect ; \
414 else echo expect ; fi`
416 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
417 echo $${srcdir}/../dejagnu/runtest ; \
418 else echo runtest; fi`
419 RUNTESTFLAGS =
421 # Extra symbols for fixproto to define when parsing headers.
422 FIXPROTO_DEFINES =
424 # Extra flags to use when compiling crt{begin,end}.o.
425 CRTSTUFF_T_CFLAGS =
427 # Extra flags to use when compiling [m]crt0.o.
428 CRT0STUFF_T_CFLAGS =
430 # End of variables for you to override.
432 # Definition of `all' is here so that new rules inserted by sed
433 # do not specify the default target.
434 # The real definition is under `all.internal' (for native compilers)
435 # or `all.cross' (for cross compilers).
436 all: all.indirect
438 # This tells GNU Make version 3 not to put all variables in the environment.
439 .NOEXPORT:
441 # sed inserts variable overrides after the following line.
442 ####target overrides
443 @target_overrides@
445 ####host overrides
446 @host_overrides@
448 ####cross overrides
449 @cross_defines@
450 @cross_overrides@
452 ####build overrides
453 @build_overrides@
455 # Now figure out from those variables how to compile and link.
457 all.indirect: $(ALL)
459 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
460 # ??? IN_GCC should be obsolete now.
461 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
463 # This is the variable actually used when we compile.
464 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
465 @DEFS@ $(SCHED_CFLAGS)
467 # Likewise.
468 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
470 # Even if ALLOCA is set, don't use it if compiling with GCC.
471 USE_ALLOCA= ${ALLOCA}
472 USE_HOST_ALLOCA= ` case "${HOST_ALLOCA}" in ?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
473 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
474 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
476 # Dependency on obstack, alloca, malloc or whatever library facilities
477 # are not installed in the system libraries.
478 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
479 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
481 # Likewise, for use in the tools that must run on this machine
482 # even if we are cross-building GCC.
483 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
484 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
486 # How to link with both our special library facilities
487 # and the system's installed libraries.
488 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
490 # Likewise, for use in the tools that must run on this machine
491 # even if we are cross-building GCC.
492 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
493 $(HOST_CLIB)
495 HOST_RTL = $(HOST_PREFIX)rtl.o
496 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
497 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
499 # Specify the directories to be searched for header files.
500 # Both . and srcdir are used, in that order,
501 # so that tm.h and config.h will be found in the compilation
502 # subdirectory rather than in the source directory.
503 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
505 # Always use -I$(srcdir)/config when compiling.
506 .c.o:
507 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
509 # This tells GNU make version 3 not to export all the variables
510 # defined in this file into the environment.
511 .NOEXPORT:
513 # Support for additional languages (other than c and objc).
514 # ??? objc can be supported this way too (leave for later).
516 # These next lines are overridden by configure.
517 LANG_MAKEFILES = @all_lang_makefiles@
518 LANG_STAGESTUFF = @all_stagestuff@
519 LANG_DIFF_EXCLUDES = @all_diff_excludes@
520 LANG_LIB2FUNCS = @all_lib2funcs@
521 LANG_EXTRA_HEADERS = @all_headers@
523 # Flags to pass to recursive makes.
524 # CC is set by configure. Hosts without symlinks need special handling
525 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
526 # subdirectories.
527 # ??? The choices here will need some experimenting with.
528 FLAGS_TO_PASS = \
529 "AR_FLAGS=$(AR_FLAGS)" \
530 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
531 "BISON=$(BISON)" \
532 "BISONFLAGS=$(BISONFLAGS)" \
533 "CC=@cc_set_by_configure@" \
534 "CFLAGS=$(CFLAGS)" \
535 "CLIB=$(CLIB)" \
536 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
537 "LDFLAGS=$(LDFLAGS)" \
538 "LEX=$(LEX)" \
539 "LEXFLAGS=$(LEXFLAGS)" \
540 "LN=$(LN)" \
541 "LN_S=$(LN_S)" \
542 "MAKEINFO=$(MAKEINFO)" \
543 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
544 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
545 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
546 "SHELL=$(SHELL)" \
547 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
548 "exeext=$(exeext)" \
549 "objext=$(objext)" \
550 "exec_prefix=$(exec_prefix)" \
551 "prefix=$(prefix)" \
552 "tooldir=$(tooldir)" \
553 "bindir=$(bindir)" \
554 "libsubdir=$(libsubdir)"
556 # Lists of files for various purposes.
558 # Language-specific object files for C and Objective C.
559 C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
560 c-aux-info.o c-common.o c-iterate.o @extra_c_objs@
562 # Language-specific object files for C.
563 C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS)
565 # Files specific to the C interpreter bytecode compiler(s).
566 BC_OBJS = bc-emit.o bc-optab.o
568 # Bytecode header files constructed at build time; vmsconfig.com wants this.
569 BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
571 SCHED_PREFIX = @sched_prefix@
572 SCHED_CFLAGS = @sched_cflags@
574 # Language-independent object files.
575 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
576 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
577 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o regmove.o \
578 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
579 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
580 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
581 insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
582 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
583 profile.o insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
585 # GEN files are listed separately, so they can be built before doing parallel
586 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
587 # them before rtl.o is compiled.
588 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
590 CCCP=cccp
591 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
592 #CCCP=cppmain
594 # Files to be copied away after each stage in building.
595 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
596 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
597 insn-attr.h insn-attrtab.c insn-opinit.c \
598 stamp-flags stamp-config stamp-codes stamp-mlib \
599 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
600 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS stamp-crt0 \
601 genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
602 genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
603 genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
604 $(BC_ALL) \
605 stamp-bcarity stamp-bcopcode stamp-bcopname \
606 bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
607 xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
608 $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
609 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
610 protoize$(exeext) unprotoize$(exeext) \
611 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
612 gcov$(exeext) *.bp \
613 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
614 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
615 *.[si] \
616 $(LANG_STAGESTUFF)
618 # Members of libgcc1.a.
619 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
620 _lshrsi3 _ashrsi3 _ashlsi3 \
621 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
622 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
623 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
624 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
625 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
627 # Library members defined in libgcc2.c.
628 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
629 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
630 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
631 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
632 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
633 _fixtfdi _fixunstfdi _floatditf \
634 __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
635 _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
636 _ctors _eh _pure
638 # The files that "belong" in CONFIG_H are deliberately omitted
639 # because having them there would not be useful in actual practice.
640 # All they would do is cause complete recompilation every time
641 # one of the machine description files is edited.
642 # That may or may not be what one wants to do.
643 # If it is, rm *.o is an easy way to do it.
644 # CONFIG_H = $(host_xm_file) $(tm_file)
645 CONFIG_H =
646 RTL_H = rtl.h rtl.def machmode.h machmode.def
647 TREE_H = tree.h real.h tree.def machmode.h machmode.def
648 BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
649 BASIC_BLOCK_H = basic-block.h bitmap.h
651 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
654 # Language makefile fragments.
656 # The following targets define the interface between us and the languages.
658 # all.build, all.cross, start.encap, rest.encap,
659 # info, dvi,
660 # install-normal, install-common, install-info, install-man,
661 # uninstall, distdir,
662 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
663 # stage1, stage2, stage3, stage4
665 # Each language is linked in with a series of hooks (since we can't use `::'
666 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
667 # Configure computes and adds these here.
669 ####language hooks
670 @language_hooks@
672 # sed inserts language fragments after the following line.
673 ####language fragments
674 @language_fragments@
676 # End of language makefile fragments.
678 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
679 .SUFFIXES: .in .def
681 Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
682 $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
683 $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
684 "$(xmake_file)" "$(tmake_file)"
685 cp config.status config.run
686 $(SHELL) config.run
687 rm -f config.run
689 $(srcdir)/configure: $(srcdir)/configure.in
690 cd $(srcdir); autoconf
692 # cstamp-h.in controls rebuilding of config.in.
693 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
694 # delete it. A stamp file is needed as autoheader won't update the file if
695 # nothing has changed.
696 # It remains in the source directory and is part of the distribution.
697 # This follows what is done in shellutils, fileutils, etc.
698 # "echo timestamp" is used instead of touch to be consistent with other
699 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
700 # ??? Newer versions have a maintainer mode that may be useful here.
701 $(srcdir)/config.in: $(srcdir)/cstamp-h.in
702 $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
703 cd $(srcdir) && autoheader
704 echo timestamp > $(srcdir)/cstamp-h.in
705 config.h: cstamp-h ; @true
706 cstamp-h: config.in config.status
707 CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
709 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
710 # a target to build even if it is up-to-date. So we must verify that
711 # config.status does not exist before failing.
712 config.status: configure version.c
713 @if [ ! -f config.status ] ; then \
714 echo You must configure gcc. Look at the INSTALL file for details.; \
715 false; \
716 else \
717 $(SHELL) config.status --recheck; \
720 all.internal: start.encap rest.encap
721 # This is what to compile if making a cross-compiler.
722 # Note that we can compile enquire using the cross-compiler just built,
723 # although we can't run it on this machine.
724 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
725 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
726 # This is what to compile if making gcc with a cross-compiler.
727 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
728 # This is what must be made before installing GCC and converting libraries.
729 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
730 # These can't be made until after GCC can run.
731 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
732 # This is what is made with the host's compiler
733 # whether making a cross compiler or not.
734 native: config.status config.h cpp $(LANGUAGES) \
735 $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
737 # Define the names for selecting languages in LANGUAGES.
738 C c: cc1
739 PROTO: proto
741 # Tell GNU make these are phony targets.
742 .PHONY: C c PROTO proto
744 # On the target machine, finish building a cross compiler.
745 # This does the things that can't be done on the host machine.
746 rest.cross: $(LIBGCC) gfloat.h specs
748 # Verify that it works to compile and link libgcc1-test.
749 # If it does, then there are sufficient replacements for libgcc1.a.
750 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
751 @echo "Testing libgcc1. Ignore linker warning messages."
752 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
753 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
754 libgcc1-test.o: libgcc1-test.c native xgcc
755 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
757 # Recompile all the language-independent object files.
758 # This is used only if the user explicitly asks for it.
759 compilations: ${OBJS}
761 # Create a list of the language-independent object files so the language
762 # subdirectories needn't mention their names explicitly.
763 stamp-objlist: $(OBJS) $(BC_OBJS)
764 echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
766 # We call this executable `xgcc' rather than `gcc'
767 # to avoid confusion if the current directory is in the path
768 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
769 xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
770 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
771 choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
773 # Dump a specs file to make -B./ read these specs over installed ones.
774 specs: xgcc
775 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
776 mv tmp-specs specs
778 # We do want to create an executable named `xgcc', so we can use it to
779 # compile libgcc2.a.
780 # Also create gcc-cross, so that install-common will install properly.
781 gcc-cross: xgcc
782 cp xgcc$(exeext) gcc-cross$(exeext)
784 cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
785 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
787 # Copy float.h from its source.
788 gfloat.h: $(FLOAT_H)
789 -rm -f gfloat.h
790 cp $(FLOAT_H) gfloat.h
792 # Create float.h source for the native machine.
793 float.h-nat: enquire
794 -./enquire -f > tmp-float.h
795 mv tmp-float.h float.h-nat
797 # Create a dummy float.h source for a cross-compiler.
798 # ??? This isn't used anymore. Should we create config/float-unkn.h
799 # and make that the default float_format in configure?
800 float.h-cross:
801 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
802 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
803 echo "#endif" >> t-float.h-cross
804 mv t-float.h-cross float.h-cross
806 # Used to compile enquire with standard cc, but have forgotten why.
807 # Let's try with GCC.
808 enquire: enquire.o $(GCC_PARTS)
809 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
810 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
811 # Breaking this line caused a problem with one version of GNU make.
812 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
814 # Build the version of limits.h that we will install.
815 xlimits.h: glimits.h limitx.h limity.h
816 if $(LIMITS_H_TEST) ; then \
817 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
818 else \
819 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
821 mv tmp-xlimits.h xlimits.h
823 # Build libgcc.a.
824 # This is done in two parts because some functions, in libgcc1.c,
825 # must be compiled with something other than GCC,
826 # while the rest, in libgcc2.c, must be compiled with xgcc.
827 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
829 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
830 # LIBCONVERT should put its output in libgcc1.conv.
831 libgcc1.conv: libgcc1.a
832 $(LIBCONVERT) libgcc1.a libgcc1.conv
834 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
835 # Make an empty file instead.
836 libgcc1.null: $(GCC_PASSES)
837 echo "__foo () {}" > dummy.c
838 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
839 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
840 rm -f dummy$(objext) dummy.c
842 # This is $(LIBGCC1) for a cross-compiler.
843 # We have no automatic way of building libgcc1.a,
844 # so it's up to the installer to find a way to do that.
845 # This rule deliberately does not depend on libgcc1.a
846 # so that it will fail if the installer hasn't provided it.
847 libgcc1.cross:
848 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
850 # Compile the library of arithmetic subroutines with the native compiler.
851 # Don't compile it with GCC!
852 # (That would cause most arithmetic functions to call themselves.)
854 # NOTE: If you modify these rules substantially, please be sure to
855 # check at least config/i386/t-sco5 and possibly other makefile
856 # fragments.
857 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
858 -rm -f tmplibgcc1.a
859 # Actually build it in tmplibgcc1.a, then rename at end,
860 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
861 # -e causes any failing command to make this rule fail.
862 # -e doesn't work in certain shells, so we test $$? as well.
863 # lynx has a broken ar, it always complains when the initial library is
864 # empty, thus this command works only if we don't do -e
865 # There is a trailing backslash (\) deleted from the following line.
866 # set -e;
867 for name in $(LIB1FUNCS); \
868 do \
869 echo $${name}; \
870 rm -f $${name}$(objext); \
871 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
872 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
873 mv libgcc1$(objext) $${name}$(objext); \
874 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
875 rm -f $${name}$(objext); \
876 done
877 # Some shells crash when a loop has no items.
878 # So make sure there is always at least one--`..'.
879 # Then ignore it.
880 # We don't use -e here because there are if statements
881 # that should not make the command give up when the if condition is false.
882 # Instead, we test for failure after each command where it matters.
883 for file in .. $(LIB1FUNCS_EXTRA); \
884 do \
885 if [ x$${file} != x.. ]; then \
886 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
887 echo $${name}; \
888 if [ $${name}.asm = $${file} ]; then \
889 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
890 else true; fi; \
891 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
892 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
893 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
894 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
895 rm -f $${name}.s $${name}$(objext); \
896 else true; \
897 fi; \
898 done
899 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
900 mv tmplibgcc1.a libgcc1.a
902 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
903 # functions. LIB1ASMSRC is the name of the source file in the config
904 # subdirectory.
905 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
906 -rm -f tmplibgcc1.a libgcc1.S
907 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
908 # Actually build it in tmplibgcc1.a, then rename at end,
909 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
910 # -e causes any failing command to make this rule fail.
911 # -e doesn't work in certain shells, so we test $$? as well.
912 # lynx has a broken ar, it always complains when the initial library is
913 # empty, thus this command works only if we don't do -e
914 # There is a trailing backslash (\) deleted from the following line.
915 # set -e;
916 for name in $(LIB1ASMFUNCS); \
917 do \
918 echo $${name}; \
919 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
920 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
921 mv libgcc1$(objext) $${name}$(objext); \
922 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
923 rm -f $${name}$(objext); \
924 done
925 -rm -f libgcc1.S
926 mv tmplibgcc1.a libgcc1-asm.a
928 # Generate assembly versions of the functions required for libgcc1.
929 # You'll still need to massage the code by hand (possibly hacking
930 # underscores and local labels) but this will get you started.
931 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
932 -rm -f libgcc1.S
933 touch libgcc1.S
934 for name in $(LIB1FUNCS); \
935 do \
936 echo $${name}; \
937 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
938 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
939 echo '#ifdef ' L$${name} >> libgcc1.S; \
940 cat libgcc1.s >> libgcc1.S; \
941 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
942 echo "" >> libgcc1.S; \
943 done
945 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
946 # But recompiling cc1 should not force recompilation of libgcc2.a.
947 # If you want to force recompilation, delete libgcc2.a.
948 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
949 -if [ -f libgcc2.ready ] ; then \
950 true; \
951 else \
952 touch libgcc2.ready; \
955 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
956 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2ADD) \
957 machmode.h longlong.h gbl-ctors.h config.status
958 # Actually build it in tmplibgcc2.a, then rename at end,
959 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
960 -rm -f tmplibgcc2.a
961 # -e causes any failing command to make this rule fail.
962 # -e doesn't work in certain shells, so we test $$? as well.
963 # lynx has a broken ar, it always complains when the initial library is
964 # empty, thus this command works only if we don't do -e
965 # There is a trailing backslash (\) deleted from the following line.
966 # set -e;
967 for name in $(LIB2FUNCS); \
968 do \
969 echo $${name}; \
970 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
971 $(srcdir)/libgcc2.c -o $${name}$(objext); \
972 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
973 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
974 rm -f $${name}$(objext); \
975 done
976 # Some shells crash when a loop has no items.
977 # So make sure there is always at least one--`..'.
978 # Then ignore it.
979 # We don't use -e here because there are if statements
980 # that should not make the command give up when the if condition is false.
981 # Instead, we test for failure after each command where it matters.
982 for file in $(LIB2ADD); do \
983 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
984 oname=` echo $${name} | sed -e 's,.*/,,'`; \
985 if [ $${name}.txt = $${file} ]; then \
986 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
987 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
988 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
989 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
990 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
991 LANGUAGES="$(LANGUAGES)" \
992 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
993 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
994 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
995 rm -f $${f}; \
996 else true; \
997 fi; done; \
998 else \
999 echo $${name}; \
1000 if [ $${name}.asm = $${file} ]; then \
1001 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
1002 else true; fi; \
1003 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
1004 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1005 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
1006 rm -f $${name}.s $${oname}$(objext); \
1007 fi; \
1008 done
1009 mv tmplibgcc2.a libgcc2.a
1010 # These lines were deleted from above the mv command
1011 # because ranlibing libgcc.a itself should suffice.
1012 # -if [ x${HPUX_GAS} = x ] ; then \
1013 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1014 # else true; fi
1016 # Combine the various libraries into a single library, libgcc.a.
1017 libgcc.a: $(LIBGCC1) $(LIBGCC2)
1018 -rm -rf tmplibgcc.a libgcc.a tmpcopy
1019 mkdir tmpcopy
1020 -if [ x$(LIBGCC1) != x ]; \
1021 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1022 else true; \
1024 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1025 # unwritable table of contents file, and then print an error message when
1026 # the second ar command tries to overwrite this file. To avoid the error
1027 # message from ar, we make sure all files are writable.
1028 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
1029 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1030 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1031 rm -rf tmpcopy
1032 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1033 # Actually build it in tmplibgcc.a, then rename at end,
1034 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1035 mv tmplibgcc.a libgcc.a
1037 # Use the genmultilib shell script to generate the information the gcc
1038 # driver program needs to select the library directory based on the
1039 # switches.
1040 multilib.h: stamp-mlib; @true
1041 stamp-mlib: $(srcdir)/genmultilib Makefile
1042 $(SHELL) $(srcdir)/genmultilib \
1043 "$(MULTILIB_OPTIONS)" \
1044 "$(MULTILIB_DIRNAMES)" \
1045 "$(MULTILIB_MATCHES)" \
1046 "$(MULTILIB_EXCEPTIONS)" \
1047 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1048 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1049 touch stamp-mlib
1051 # Build multiple copies of libgcc.a, one for each target switch.
1052 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1053 $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
1054 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1055 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1056 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1057 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1058 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1059 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1060 LANGUAGES="$(LANGUAGES)" \
1061 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1062 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1063 MULTILIB_CFLAGS="$${flags}" \
1064 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1065 dir="$${dir}" stmp-multilib-sub; \
1066 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1067 done
1068 touch stmp-multilib
1070 # Subroutine of stmp-multilib so make -n works.
1071 stmp-multilib-sub:
1072 rm -f $(LIBGCC2)
1073 if [ -d $(dir) ]; then \
1074 cd $(dir); \
1075 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1076 else true; \
1078 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1079 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1080 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1081 LANGUAGES="$(LANGUAGES)" \
1082 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1083 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1084 then true; \
1085 else rm -f $(LIBGCC1); \
1087 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1088 then true; \
1089 else \
1090 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1091 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1092 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1093 LANGUAGES="$(LANGUAGES)" \
1094 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1096 rm -rf tmplibgcc.a tmpcopy
1097 mkdir tmpcopy
1098 if [ x$(LIBGCC1) != x ]; \
1099 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1100 else true; \
1102 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1103 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1104 rm -rf libgcc2.a tmpcopy
1105 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1106 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1107 mv tmplibgcc.a $(dir)/libgcc.a
1108 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1109 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1110 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1111 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1112 LANGUAGES="$(LANGUAGES)" \
1113 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1114 mv t$${f} $(dir)/$${f}; \
1115 else true; \
1116 fi; done
1118 # Compile two additional files that are linked with every program
1119 # linked using GCC on systems using COFF or ELF, for the sake of C++
1120 # constructors.
1121 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1122 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1123 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1124 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1126 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1127 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1128 -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS) \
1129 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1131 # On some systems we also want to install versions of these files
1132 # compiled using PIC for use in shared libraries.
1133 crtbeginS.o crtendS.o: stamp-crtS ; @true
1135 stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1136 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1137 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1138 -g0 -c $(srcdir)/crtstuff.c
1139 mv crtstuff$(objext) crtbeginS$(objext)
1140 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1141 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1142 -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1143 touch stamp-crtS
1145 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1146 crt0.o: stamp-crt0 ; @true
1147 mcrt0.o: stamp-crt0; @true
1149 stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1150 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1151 -o crt0.o -c $(CRT0_S)
1152 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1153 -o mcrt0.o -c $(MCRT0_S)
1154 touch stamp-crt0
1156 # Compiling object files from source files.
1158 # Note that dependencies on obstack.h are not written
1159 # because that file is not part of GCC.
1161 # C language specific files.
1163 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1164 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1165 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1166 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1167 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1168 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1169 $(srcdir)/c-parse.y: c-parse.in
1170 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1171 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1172 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1173 $(srcdir)/c-parse.in >>tmp-c-parse.y
1174 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1176 $(srcdir)/c-gperf.h: c-parse.gperf
1177 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1178 $(srcdir)/c-parse.gperf >tmp-gperf.h
1179 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1181 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1182 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1183 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1184 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
1185 input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1186 c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1187 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1188 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1189 defaults.h c-pragma.h
1190 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1192 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1193 ld: collect2
1194 rm -f ld$(exeext)
1195 $(LN) collect2$(exeext) ld$(exeext)
1197 collect2: collect2.o tlink.o hash.o cplus-dem.o underscore.o version.o \
1198 choose-temp.o $(LIBDEPS)
1199 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1200 -rm -f collect2$(exeext)
1201 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
1202 cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
1204 collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
1205 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1206 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1207 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1209 tlink.o: tlink.c demangle.h hash.h $(CONFIG_H)
1210 hash.o: hash.c hash.h
1211 cplus-dem.o: cplus-dem.c demangle.h
1213 underscore.c: stamp-under ; @true
1215 stamp-under: $(GCC_PASSES)
1216 echo "int xxy_us_dummy;" >tmp-dum.c
1217 $(GCC_FOR_TARGET) -S tmp-dum.c
1218 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1219 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1220 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1221 else \
1222 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1224 $(srcdir)/move-if-change tmp-under.c underscore.c
1225 -rm -f tmp-dum.c tmp-dum.s
1226 touch stamp-under
1228 # A file used by all variants of C.
1230 c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1232 # Language-independent files.
1234 DRIVER_DEFINES = \
1235 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1236 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1237 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1238 -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
1239 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
1240 gcc.o: gcc.c $(CONFIG_H) multilib.h Makefile $(lang_specs_files)
1241 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1242 $(DRIVER_DEFINES) \
1243 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1245 dumpvers: dumpvers.c
1247 version.o: version.c
1248 obstack.o: obstack.c
1249 choose-temp.o: choose-temp.c
1250 pexecute.o: pexecute.c
1252 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1254 tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
1255 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1256 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
1257 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
1258 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
1259 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1260 $(lang_options_files)
1261 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
1262 -DTARGET_NAME=\"$(target_alias)\" \
1263 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1265 rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1267 print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1268 rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1270 varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
1271 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1272 output.h bytecode.h c-pragma.h
1273 function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1274 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1275 recog.h output.h bytecode.h bc-emit.h
1276 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1277 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1278 loop.h recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h \
1279 bc-optab.h bc-emit.h
1280 except.o : except.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1281 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1282 recog.h output.h except.h
1283 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
1284 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1285 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1286 bc-emit.h modemap.def hard-reg-set.h
1287 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
1288 insn-flags.h
1289 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1290 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1291 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1292 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1293 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1294 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1295 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
1296 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1297 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h except.h \
1298 function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1299 insn-config.h bytecode.h obstack.h xcoffout.h c-pragma.h
1300 dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
1301 insn-config.h reload.h output.h defaults.h
1302 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
1303 insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h expr.h
1304 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
1305 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1306 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1307 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h \
1308 hard-reg-set.h
1309 real.o : real.c $(CONFIG_H) $(TREE_H)
1310 getpwd.o : getpwd.c $(CONFIG_H)
1312 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1313 insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
1314 bytecode.h
1316 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1317 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1318 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1320 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1321 insn-config.h recog.h
1322 profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
1323 tree.h output.h
1324 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1325 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1326 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1327 integrate.h regs.h flags.h expr.h loop.h
1328 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1329 $(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h
1330 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
1331 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1332 $(BASIC_BLOCK_H) recog.h real.h hard-reg-set.h
1333 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1334 $(BASIC_BLOCK_H) regs.h insn-config.h recog.h reload.h real.h bytecode.h
1335 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) \
1336 regs.h hard-reg-set.h insn-config.h recog.h output.h
1337 bitmap.o : bitmap.c $(CONFIG_H) $(RTL_H) flags.h $(BASIC_BLOCK_H) regs.h
1338 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
1339 $(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h
1341 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
1342 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1343 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1344 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1345 $(BASIC_BLOCK_H) recog.h output.h
1346 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1347 regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) recog.h \
1348 reload.h expr.h
1349 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1350 $(BASIC_BLOCK_H) regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1351 flags.h output.h
1352 alias.o : alias.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1353 insn-codes.h
1354 regmove.o : regmove.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h output.h \
1355 reload.h regs.h hard-reg-set.h flags.h expr.h insn-flags.h
1356 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) $(RTL_H) $(BASIC_BLOCK_H) regs.h hard-reg-set.h \
1357 flags.h insn-config.h insn-attr.h
1358 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1359 recog.h conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1360 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1361 recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1362 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1363 insn-flags.h insn-codes.h real.h
1364 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1365 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1367 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1368 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1369 insn-flags.h output.h insn-attr.h insn-codes.h
1370 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1372 # Build auxiliary files that support ecoff format.
1373 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1374 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1376 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1378 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1379 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1381 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1383 # Build file to support OSF/rose half-pic format.
1384 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1386 # Normally this target is not used; but it is used if you
1387 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1388 # from the GNU Emacs distribution.
1389 alloca.o: alloca.c
1390 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1391 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1392 $(ALLOCA_FINISH)
1394 # Generate header and source files from the machine description,
1395 # and compile them.
1397 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1398 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1399 insn-attr.h insn-attrtab.c
1401 # The following pair of rules has this effect:
1402 # genconfig is run only if the md has changed since genconfig was last run;
1403 # but the file insn-config.h is touched only when its contents actually change.
1405 # Each of the other insn-* files is handled by a similar pair of rules.
1407 # This causes an anomaly in the results of make -n
1408 # because insn-* is older than stamp-*
1409 # and thus make -n thinks that insn-* will be updated
1410 # and force recompilation of things that depend on it.
1411 # We use move-if-change precisely to avoid such recompilation.
1412 # But there is no way to teach make -n that it will be avoided.
1414 # Each of the insn-*.[ch] rules has a semicolon at the end,
1415 # for otherwise the system Make on SunOS 4.1 never tries
1416 # to recompile insn-*.o. To avoid problems and extra noise from
1417 # versions of make which don't like empty commands (nothing after the
1418 # trailing `;'), we call true for each.
1420 insn-config.h: stamp-config ; @true
1421 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1422 ./genconfig $(md_file) > tmp-config.h
1423 $(srcdir)/move-if-change tmp-config.h insn-config.h
1424 touch stamp-config
1426 insn-flags.h: stamp-flags ; @true
1427 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1428 ./genflags $(md_file) > tmp-flags.h
1429 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1430 touch stamp-flags
1432 insn-codes.h: stamp-codes ; @true
1433 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1434 ./gencodes $(md_file) > tmp-codes.h
1435 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1436 touch stamp-codes
1438 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1439 insn-config.h insn-flags.h insn-codes.h
1440 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1442 insn-emit.c: stamp-emit ; @true
1443 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1444 ./genemit $(md_file) > tmp-emit.c
1445 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1446 touch stamp-emit
1448 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1449 real.h output.h flags.h
1450 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1452 insn-recog.c: stamp-recog ; @true
1453 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1454 ./genrecog $(md_file) > tmp-recog.c
1455 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1456 touch stamp-recog
1458 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1459 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1460 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1462 insn-opinit.c: stamp-opinit ; @true
1463 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1464 ./genopinit $(md_file) > tmp-opinit.c
1465 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1466 touch stamp-opinit
1468 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1469 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1471 insn-extract.c: stamp-extract ; @true
1472 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1473 ./genextract $(md_file) > tmp-extract.c
1474 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1475 touch stamp-extract
1477 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1478 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1480 insn-peep.c: stamp-peep ; @true
1481 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1482 ./genpeep $(md_file) > tmp-peep.c
1483 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1484 touch stamp-peep
1486 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1487 insn-attr.h insn-config.h
1488 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1490 insn-attr.h: stamp-attr ; @true
1491 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1492 ./genattr $(md_file) > tmp-attr.h
1493 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1494 touch stamp-attr
1496 insn-attrtab.c: stamp-attrtab ; @true
1497 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1498 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1499 then \
1500 echo Using $(PREMADE_ATTRTAB); \
1501 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1502 else \
1503 ./genattrtab $(md_file) > tmp-attrtab.c; \
1505 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1506 touch stamp-attrtab
1508 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1509 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1510 insn-codes.h
1511 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1513 insn-output.c: stamp-output ; @true
1514 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1515 ./genoutput $(md_file) > tmp-output.c
1516 $(srcdir)/move-if-change tmp-output.c insn-output.c
1517 touch stamp-output
1519 # Compile the programs that generate insn-* from the machine description.
1520 # They are compiled with $(HOST_CC), and associated libraries,
1521 # since they need to run on this machine
1522 # even if GCC is being compiled to run on some other machine.
1524 # $(CONFIG_H) is omitted from the deps of the gen*.o
1525 # because these programs don't really depend on anything
1526 # about the target machine. They do depend on config.h itself,
1527 # since that describes the host machine.
1529 # Pass the md file through cpp if the target requests it.
1530 $(MD_FILE): $(MD_DEPS)
1531 rm -f $@
1532 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1533 mv tmp-$@ $@
1535 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1536 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1537 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1539 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1540 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1542 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1543 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1544 genflags.o $(HOST_RTL) $(HOST_LIBS)
1546 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1547 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1549 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1550 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1551 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1553 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1554 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1556 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1557 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1558 genemit.o $(HOST_RTL) $(HOST_LIBS)
1560 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1561 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1563 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1564 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1565 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1567 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1568 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1570 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1571 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1572 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1574 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1575 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1577 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1578 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1579 genextract.o $(HOST_RTL) $(HOST_LIBS)
1581 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1582 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1584 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1585 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1586 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1588 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1589 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1591 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1592 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1593 genattr.o $(HOST_RTL) $(HOST_LIBS)
1595 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1596 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1598 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1599 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1600 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1602 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
1603 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1605 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1606 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1607 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1609 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1610 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1612 # Compile the libraries to be used by gen*.
1613 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1614 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1615 # with the rules for rtl.o, alloca.o, etc.
1616 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1617 rm -f $(HOST_PREFIX)rtl.c
1618 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1619 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1621 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1622 rm -f $(HOST_PREFIX)print-rtl.c
1623 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1624 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1626 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1627 rm -f $(HOST_PREFIX)rtlanal.c
1628 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1629 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1631 $(HOST_PREFIX_1)alloca.o: alloca.c
1632 rm -f $(HOST_PREFIX)alloca.c
1633 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1634 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1636 $(HOST_PREFIX_1)obstack.o: obstack.c
1637 rm -f $(HOST_PREFIX)obstack.c
1638 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1639 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1641 $(HOST_PREFIX_1)malloc.o: malloc.c
1642 rm -f $(HOST_PREFIX)malloc.c
1643 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1644 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1646 # This satisfies the dependency that we get if you cross-compile a compiler
1647 # that does not need to compile alloca, malloc or whatever.
1648 $(HOST_PREFIX_1):
1649 touch $(HOST_PREFIX_1)
1651 # Remake bytecode files.
1652 BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1654 bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
1655 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1656 bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
1657 bc-opcode.h bc-typecd.h bc-typecd.def
1659 bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
1660 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1661 bi-arity.o $(BI_OBJ) $(HOST_LIBS)
1662 bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
1663 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1664 bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
1665 bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
1666 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1667 bi-opname.o $(BI_OBJ) $(HOST_LIBS)
1669 $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1670 $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
1671 cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
1673 bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
1674 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1675 $(srcdir)/bi-parser.c
1676 bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
1677 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1678 $(srcdir)/bi-lexer.c
1679 bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
1680 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1681 $(srcdir)/bi-arity.c
1682 bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
1683 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1684 $(srcdir)/bi-opcode.c
1685 bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
1686 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1687 $(srcdir)/bi-opname.c
1688 bi-reverse.o: bi-reverse.c bi-defs.h
1689 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1690 $(srcdir)/bi-reverse.c
1692 bc-arity.h: stamp-bcarity ; @true
1693 stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
1694 ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1695 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1696 touch stamp-bcarity
1698 bc-opcode.h: stamp-bcopcode ; @true
1699 stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
1700 ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1701 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1702 touch stamp-bcopcode
1704 bc-opname.h: stamp-bcopname ; @true
1705 stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
1706 ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1707 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1708 touch stamp-bcopname
1710 bytecode.mostlyclean:
1711 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1713 bytecode.distclean bytecode.clean: bytecode.mostlyclean
1714 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1716 bytecode.maintainer-clean: bytecode.clean
1717 -rm -f bi-parser.c bi-parser.h
1720 # Remake cpp and protoize.
1722 # Making the preprocessor
1723 cpp: $(CCCP)
1724 -rm -f cpp$(exeext)
1725 $(LN) $(CCCP)$(exeext) cpp$(exeext)
1726 cccp: cccp.o cexp.o version.o $(LIBDEPS)
1727 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1728 version.o $(LIBS)
1729 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1730 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1731 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1732 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1734 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1735 # The reason we use $(libdir)/g++-include rather than using libsubdir
1736 # is for compatibility with the current version of libg++.
1737 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1738 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1739 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1740 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1741 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1742 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1743 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1744 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1746 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1747 version.o $(LIBDEPS)
1748 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1749 cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
1751 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1753 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1754 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1755 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1756 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1757 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1758 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1759 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1760 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1761 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1763 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1765 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1767 cpphash.o: cpphash.c cpplib.h cpphash.h
1769 cppalloc.o: cppalloc.c $(CONFIG_H)
1771 # Note for the stamp targets, we run the program `true' instead of
1772 # having an empty command (nothing following the semicolon).
1774 proto: config.status protoize unprotoize SYSCALLS.c.X
1776 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1777 pexecute.o choose-temp.o $(LIBDEPS)
1778 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1779 protoize.o getopt.o getopt1.o getpwd.o version.o \
1780 pexecute.o choose-temp.o $(LIBS)
1781 protoize.o: stamp-proto ; @true
1783 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1784 pexecute.o choose-temp.o $(LIBDEPS)
1785 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1786 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1787 pexecute.o choose-temp.o $(LIBS)
1788 unprotoize.o: stamp-proto ; @true
1790 stamp-proto: protoize.c getopt.h $(CONFIG_H)
1791 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1792 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1793 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1794 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1795 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1796 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1797 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1798 -DUNPROTOIZE $(srcdir)/protoize.c
1799 mv protoize$(objext) unprotoize$(objext)
1800 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1801 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1802 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1803 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1804 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1805 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1806 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1807 $(srcdir)/protoize.c
1808 touch stamp-proto
1810 getopt.o: getopt.c getopt.h
1811 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1812 getopt1.o: getopt1.c getopt.h
1813 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1815 # This info describes the target machine, so compile with GCC just built.
1816 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1817 stmp-int-hdrs
1818 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1819 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1820 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1821 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1822 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1825 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1826 -rm -f tmp-proto.[cso]
1827 cp $(srcdir)/protoize.c tmp-proto.c
1828 chmod u+w tmp-proto.c
1829 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1830 $(CFLAGS) $(INCLUDES) \
1831 -DGCC_INCLUDE_DIR=0 \
1832 -DGPLUSPLUS_INCLUDE_DIR=0 \
1833 -DCROSS_INCLUDE_DIR=0 \
1834 -DTOOL_INCLUDE_DIR=0 \
1835 -DSTD_PROTO_DIR=0" tmp-proto.c
1836 @echo '**********' Expect 400 lines of differences.
1837 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1838 -wc -l tmp-proto.diff
1839 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1840 $(CFLAGS) $(INCLUDES) \
1841 -DGCC_INCLUDE_DIR=0 \
1842 -DGPLUSPLUS_INCLUDE_DIR=0 \
1843 -DCROSS_INCLUDE_DIR=0 \
1844 -DTOOL_INCLUDE_DIR=0 \
1845 -DSTD_PROTO_DIR=0" tmp-proto.c
1846 @echo Expect zero differences.
1847 diff $(srcdir)/protoize.c tmp-proto.c | cat
1848 -rm -f tmp-proto.[cs] tmp-proto$(objext)
1850 gcov.o: gcov.c gcov-io.h
1852 gcov: gcov.o $(LIBDEPS)
1853 $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
1855 # Build the include directory. The stamp files are stmp-* rather than
1856 # stamp-* so that mostlyclean does not force the include directory to
1857 # be rebuilt.
1859 # Build the include directory except for float.h (which depends upon
1860 # enquire).
1861 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
1862 # Copy in the headers provided with gcc.
1863 # The sed command gets just the last file name component;
1864 # this is necessary because VPATH could add a dirname.
1865 # Using basename would be simpler, but some systems don't have it.
1866 for file in .. $(USER_H); do \
1867 if [ X$$file != X.. ]; then \
1868 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1869 rm -f include/$$realfile; \
1870 cp $$file include; \
1871 chmod a+r include/$$realfile; \
1872 fi; \
1873 done
1874 rm -f include/limits.h
1875 cp xlimits.h include/limits.h
1876 chmod a+r include/limits.h
1877 # Install the README
1878 rm -f include/README
1879 cp $(srcdir)/README-fixinc include/README
1880 chmod a+r include/README
1881 touch stmp-int-hdrs
1883 # Build the complete include directory.
1884 stmp-headers: stmp-int-hdrs gfloat.h
1885 rm -f include/float.h
1886 cp gfloat.h include/float.h
1887 chmod a+r include/float.h
1888 touch stmp-headers
1890 # Build fixed copies of system files.
1891 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1892 rm -rf include
1893 mkdir include
1894 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1895 then \
1896 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1897 if [ -d $$dir ]; \
1898 then \
1899 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1900 else true; fi; \
1901 done; \
1902 else true; \
1904 rm -f include/syslimits.h
1905 if [ -f include/limits.h ]; then \
1906 mv include/limits.h include/syslimits.h; \
1907 else \
1908 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1910 chmod a+r include/syslimits.h
1911 touch stmp-fixinc
1913 # Files related to the fixproto script.
1915 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1916 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1917 export CC; \
1918 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1919 mv tmp-deduced.h deduced.h
1921 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1922 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1923 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1925 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1926 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1928 scan.o: scan.c scan.h $(build_xm_file)
1929 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1931 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1932 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1933 mv tmp-fixtmp.c fixtmp.c
1934 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1935 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1936 | ./gen-protos >xsys-protos.hT
1937 mv xsys-protos.hT xsys-protos.h
1938 rm -rf fixtmp.c
1940 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1941 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1942 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1943 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1944 cppexp.o $(HOST_LIBS)
1946 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1947 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1949 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1950 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1952 # stmp-fixproto depends on this, not on fix-header directly.
1953 # The idea is to make sure fix-header gets built,
1954 # but not rerun fixproto after each stage
1955 # just because fix-header's mtime has changed.
1956 fixhdr.ready: fix-header
1957 -if [ -f fixhdr.ready ] ; then \
1958 true; \
1959 else \
1960 touch fixhdr.ready; \
1963 # stmp-headers is to make sure fixincludes has already finished.
1964 # The if statement is so that we don't run fixproto a second time
1965 # if it has already been run on the files in `include'.
1966 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1967 @echo "Various warnings and error messages from fixproto are normal"
1968 -if [ -d include ] ; then true; else mkdir include; fi
1969 -if [ -f include/fixed ] ; then true; \
1970 else \
1971 : This line works around a 'make' bug in BSDI 1.1.; \
1972 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1973 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1974 touch include/fixed; \
1976 touch stmp-fixproto
1978 # Remake the info files.
1980 doc: info
1981 info: cpp.info gcc.info lang.info
1983 cpp.info: $(srcdir)/cpp.texi
1984 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/cpp.texi -o cpp.info
1986 gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1987 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1988 $(srcdir)/tm.texi $(srcdir)/gcov.texi
1989 $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) $(srcdir)/gcc.texi -o gcc.info
1991 dvi: gcc.dvi cpp.dvi lang.dvi
1993 # This works with GNU Make's default rule.
1994 gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \
1995 $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \
1996 $(srcdir)/tm.texi $(srcdir)/gcov.texi
1997 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
1998 texindex gcc.??
1999 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi
2001 cpp.dvi: $(srcdir)/cpp.texi
2002 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2003 texindex cpp.??
2004 TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi
2007 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
2008 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
2009 $(srcdir)/install1.texi -o INSTALL
2011 # Deletion of files made during compilation.
2012 # There are four levels of this:
2013 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2014 # `mostlyclean' is useful while working on a particular type of machine.
2015 # It deletes most, but not all, of the files made by compilation.
2016 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2017 # `clean' deletes everything made by running `make all'.
2018 # `distclean' also deletes the files made by config.
2019 # `maintainer-clean' also deletes everything that could be regenerated
2020 # automatically, except for `configure'.
2021 # We remove as much from the language subdirectories as we can
2022 # (less duplicated code).
2025 mostlyclean: bytecode.mostlyclean lang.mostlyclean
2026 -rm -f $(STAGESTUFF)
2027 # Delete the temporary source copies for cross compilation.
2028 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2029 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2030 -rm -f $(HOST_PREFIX_1)obstack.c
2031 # Delete the temp files made in the course of building libgcc.a.
2032 -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
2033 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2034 # Delete other temporary files.
2035 -rm -f tmp-float.h tmp-gcc.xtar.gz
2036 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
2037 -rm -f tmp-c-parse.y tmp-gperf.h
2038 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2039 -rm -f tmp-fixtmp.c xsys-protos.hT
2040 # Delete the stamp files.
2041 -rm -f stamp-* tmp-*
2042 -rm -f */stamp-* */tmp-*
2043 # Delete debugging dump files.
2044 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2045 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.regmove
2046 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2047 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2048 -rm -f */*.sched2 */*.stack */*.regmove
2049 # Delete some files made during installation.
2050 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2051 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2052 # Delete files generated for fixproto
2053 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2054 gen-protos fixproto.list fixtmp.* fixhdr.ready
2055 # Delete unwanted output files from TeX.
2056 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2057 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2058 # Delete sorted indices we don't actually use.
2059 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2060 # Delete core dumps.
2061 -rm -f core */core
2062 -rm -f *.bp */*.bp
2064 # Delete all files made by compilation
2065 # that don't exist in the distribution.
2066 clean: mostlyclean bytecode.clean lang.clean
2067 # It may not be quite desirable to delete unprotoize.c here,
2068 # but the spec for `make clean' requires it.
2069 # Using unprotoize.c is not quite right in the first place,
2070 # but what better way is there?
2071 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2072 -rm -f libgcc1.null
2073 -rm -f *.dvi
2074 -rm -f */*.dvi
2075 -if [ -f md.pre-cpp ]; then \
2076 rm -f md ; \
2078 # Delete the include directory.
2079 -rm -rf stmp-* include
2080 -rm -f */stmp-*
2081 # Delete files used by the "multilib" facility (including libgcc subdirs).
2082 -rm -f multilib.h tmpmultilib*
2083 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2084 rm -rf $(MULTILIB_DIRNAMES); \
2085 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2086 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2087 fi ; fi
2089 # Delete all files that users would normally create
2090 # while building and installing GCC.
2091 distclean: clean bytecode.distclean lang.distclean
2092 -rm -f tm.h config.h config2.h tconfig.h hconfig.h md cstamp-h
2093 -rm -f config.status config.run config.cache config.bak
2094 -rm -f Make-lang Make-hooks Make-host Make-target
2095 -rm -f Makefile specs.h options.h *.oaux
2096 -rm -fr stage1 stage2 stage3 stage4
2097 -rm -f */stage1 */stage2 */stage3 */stage4 */include
2098 -rm -f c-parse.output
2099 -rm -f *.asm
2100 -rm -f float.h
2101 -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
2102 -rm -f testsuite/{gcc,g++}.{log,sum}
2104 # Delete anything likely to be found in the source directory
2105 # that shouldn't be in the distribution.
2106 extraclean: distclean lang.extraclean
2107 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2108 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2109 -rm -f config/*/=* config/*/"#"* config/*/*~*
2110 -rm -f config/*/*.orig config/*/*.rej
2111 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2112 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2113 -rm -f *lose config/*lose config/*/*lose
2114 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
2115 -rm -f */=* */"#"* */*~*
2116 -rm -f */patch* */*.orig */*.rej
2117 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2118 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2119 -rm -f */*lose */*.s */*.s[0-9] */*.i
2121 # Get rid of every file that's generated from some other file, except for `configure'.
2122 # Most of these files ARE PRESENT in the GCC distribution.
2123 maintainer-clean:
2124 @echo 'This command is intended for maintainers to use; it'
2125 @echo 'deletes files that may need special tools to rebuild.'
2126 $(MAKE) distclean bytecode.maintainer-clean lang.maintainer-clean
2127 -rm -f c-parse.y c-gperf.h
2128 -rm -f c-parse.c c-parse.h c-parse.output
2129 -rm -f cexp.c cexp.output TAGS
2130 -rm -f cpp.info* cpp.??s cpp.*aux
2131 -rm -f gcc.info* gcc.??s gcc.*aux
2133 # Entry points `install' and `uninstall'.
2134 # Also use `install-collect2' to install collect2 when the config files don't.
2136 # The semicolon is to prevent the install.sh -> install default rule
2137 # from doing anything. Having it run true helps avoid problems and
2138 # noise from versions of make which don't like to have null commands.
2139 install: $(INSTALL_TARGET) ; @true
2141 # Copy the compiler files into directories where they will be run.
2142 # Install the driver last so that the window when things are
2143 # broken is small.
2144 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2145 install-man install-info lang.install-normal install-driver
2147 # Do nothing while making gcc with a cross-compiler. The person who
2148 # makes gcc for the target machine has to know how to put a complete
2149 # gcc together by hand.
2150 install-build: force
2151 @echo You have to install gcc on your target machine by hand.
2153 # Run this on the target machine
2154 # to finish installation of cross compiler.
2155 install-cross-rest: install-float-h-cross
2157 # Install float.h for cross compiler.
2158 # Run this on the target machine!
2159 install-float-h-cross: installdirs
2160 # if [ -f enquire ] ; then true; else false; fi
2161 # Note: don't use -. We should fail right away if enquire was not made.
2162 ./enquire -f > $(tmpdir)/float.h
2163 -rm -f $(libsubdir)/include/float.h
2164 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2165 -rm -f $(tmpdir)/float.h
2166 chmod a-x $(libsubdir)/include/float.h
2168 # Create the installation directories.
2169 installdirs:
2170 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2171 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2172 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2173 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2174 # This dir isn't currently searched by cpp.
2175 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2176 -if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias) ; fi
2177 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi
2178 -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; fi
2179 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2180 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2181 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2182 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2183 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2184 # We don't use mkdir -p to create the parents of mandir,
2185 # because some systems don't support it.
2186 # Instead, we use this technique to create the immediate parent of mandir.
2187 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2188 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2189 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2191 # Install the compiler executables built during cross compilation.
2192 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2193 for file in $(COMPILERS); do \
2194 if [ -f $$file ] ; then \
2195 rm -f $(libsubdir)/$$file; \
2196 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2197 else true; \
2198 fi; \
2199 done
2200 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2201 if [ x"$$file" != x.. ]; then \
2202 rm -f $(libsubdir)/$$file; \
2203 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2204 else true; fi; \
2205 done
2206 for file in $(EXTRA_PARTS) ..; do \
2207 if [ x"$$file" != x.. ]; then \
2208 rm -f $(libsubdir)/$$file; \
2209 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2210 else true; fi; \
2211 done
2212 # Don't mess with specs if it doesn't exist yet.
2213 -if [ -f specs ] ; then \
2214 rm -f $(libsubdir)/specs; \
2215 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2217 # Install protoize if it was compiled.
2218 -if [ -f protoize$(exeext) ]; \
2219 then \
2220 rm -f $(bindir)/protoize$(exeext); \
2221 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2222 rm -f $(bindir)/unprotoize$(exeext); \
2223 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2224 rm -f $(libsubdir)/SYSCALLS.c.X; \
2225 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2226 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2228 -rm -f $(libsubdir)/cpp$(exeext)
2229 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2230 # Install gcov if it was compiled.
2231 -if [ -f gcov$(exeext) ]; \
2232 then \
2233 rm -f $(bindir)/gcov$(exeext); \
2234 $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
2235 chmod a+x $(bindir)/gcov$(exeext); \
2238 # Install the driver program as $(target_alias)-gcc
2239 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2240 install-driver: xgcc
2241 -if [ -f gcc-cross$(exeext) ] ; then \
2242 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2243 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2244 if [ -d $(tooldir)/bin/. ] ; then \
2245 rm -f $(tooldir)/bin/gcc$(exeext); \
2246 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2247 else true; fi; \
2248 else \
2249 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2250 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2251 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2252 $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2253 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2256 # Install the info files.
2257 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2258 # to do the install. The sed rule was copied from stmp-int-hdrs.
2259 install-info: doc installdirs lang.install-info
2260 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2261 for f in cpp.info* gcc.info*; do \
2262 realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2263 $(INSTALL_DATA) $$f $(infodir)/$$realfile; \
2264 done
2265 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2267 # Install the man pages.
2268 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2269 -if [ -f gcc-cross ] ; then \
2270 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2271 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2272 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2273 else \
2274 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2275 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2276 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2278 -rm -f $(mandir)/cccp$(manext)
2279 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2280 -chmod a-x $(mandir)/cccp$(manext)
2282 # Install the library.
2283 install-libgcc: libgcc.a installdirs
2284 -if [ -f libgcc.a ] ; then \
2285 rm -f $(libsubdir)/libgcc.a; \
2286 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2287 if $(RANLIB_TEST) ; then \
2288 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2289 chmod a-x $(libsubdir)/libgcc.a; \
2290 else true; fi
2292 # Install multiple versions of libgcc.a.
2293 install-multilib: stmp-multilib installdirs
2294 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2295 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2296 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2297 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2298 rm -f $(libsubdir)/$${dir}/$${f}; \
2299 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2300 done; \
2301 if $(RANLIB_TEST); then \
2302 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2303 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2304 done
2306 # Install all the header files built in the include subdirectory.
2307 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2308 # Fix symlinks to absolute paths in the installed include directory to
2309 # point to the installed directory, not the build directory.
2310 # Don't need to use LN_S here since we really do need ln -s and no substitutes.
2311 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2312 if [ $$? -eq 0 ]; then \
2313 dir=`cd include; pwd`; \
2314 for i in $$files; do \
2315 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2316 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2317 rm -f $(libsubdir)/include/$$i; \
2318 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2319 fi; \
2320 done; \
2323 # Create or recreate the gcc private include file directory.
2324 install-include-dir: installdirs
2325 -rm -rf $(libsubdir)/include
2326 mkdir $(libsubdir)/include
2327 -chmod a+rx $(libsubdir)/include
2329 # Install the include directory using tar.
2330 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2331 (cd include; \
2332 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2333 # /bin/sh on some systems returns the status of the first tar,
2334 # and that can lose with GNU tar which always writes a full block.
2335 # So use `exit 0' to ignore its exit status.
2337 # Install the include directory using cpio.
2338 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2339 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2341 # Put assert.h where it won't override GNU libc's assert.h.
2342 # It goes in a dir that is searched after GNU libc's headers;
2343 # thus, the following conditionals are no longer needed.
2344 # But it's not worth deleting them now.
2345 ## Don't replace the assert.h already there if it is not from GCC.
2346 ## This code would be simpler if it tested for -f ... && ! grep ...
2347 ## but supposedly the ! operator is missing in sh on some systems.
2348 install-assert-h: assert.h installdirs
2349 if [ -f $(assertdir)/assert.h ]; \
2350 then \
2351 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2352 then \
2353 rm -f $(assertdir)/assert.h; \
2354 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2355 chmod a-x $(assertdir)/assert.h; \
2356 else true; \
2357 fi; \
2358 else \
2359 rm -f $(assertdir)/assert.h; \
2360 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2361 chmod a-x $(assertdir)/assert.h; \
2364 # Use this target to install the program `collect2' under the name `ld'.
2365 install-collect2: collect2 installdirs
2366 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2367 # Install the driver program as $(libsubdir)/gcc for collect2.
2368 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2370 # Cancel installation by deleting the installed files.
2371 uninstall: lang.uninstall
2372 -rm -rf $(libsubdir)
2373 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2374 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2375 -rm -rf $(bindir)/protoize$(exeext)
2376 -rm -rf $(bindir)/unprotoize$(exeext)
2377 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2378 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2379 -rm -rf $(mandir)/cccp$(manext)
2380 -rm -rf $(mandir)/protoize$(manext)
2381 -rm -rf $(mandir)/unprotoize$(manext)
2383 # These targets are for the dejagnu testsuites. The file site.exp
2384 # contains global variables that all the testsuites will use.
2386 # Set to $(target_alias)/ for cross.
2387 target_subdir = @target_subdir@
2389 site.exp: ./config.status Makefile
2390 @echo "Making a new config file..."
2391 -@rm -f ./tmp?
2392 @touch site.exp
2393 -@mv site.exp site.bak
2394 @echo "## these variables are automatically generated by make ##" > ./tmp0
2395 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
2396 @echo "# add them to the last section" >> ./tmp0
2397 @echo "set rootme \"`pwd`\"" >> ./tmp0
2398 @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
2399 @echo "set host_triplet $(host_canonical)" >> ./tmp0
2400 @echo "set build_triplet $(build_canonical)" >> ./tmp0
2401 @echo "set target_triplet $(target)" >> ./tmp0
2402 @echo "set target_alias $(target_alias)" >> ./tmp0
2403 # CFLAGS is set even though it's empty to show we reserve the right to set it.
2404 @echo "set CFLAGS \"\"" >> ./tmp0
2405 @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0
2406 # If newlib has been configured, we need to pass -B to gcc so it can find
2407 # newlib's crt0.o if it exists. This will cause a "path prefix not used"
2408 # message if it doesn't, but the testsuite is supposed to ignore the message -
2409 # it's too difficult to tell when to and when not to pass -B (not all targets
2410 # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
2411 # seems like too selective a test.
2412 # ??? Another way to solve this might be to rely on linker scripts. Then
2413 # theoretically the -B won't be needed.
2414 # We also need to pass -L ../ld so that the linker can find ldscripts.
2415 @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
2416 echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
2417 echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
2418 echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2419 echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
2420 echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
2421 else true; \
2423 @if [ -d $(objdir)/../ld ] ; then \
2424 echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
2425 else true; \
2427 @if [ $(build_canonical) != $(host_canonical) ] ; then \
2428 echo "set tmpdir /tmp" >> ./tmp0 ; \
2429 else echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 ; \
2431 @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
2432 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
2433 @cat ./tmp0 > site.exp
2434 @cat site.bak | sed \
2435 -e '1,/^## All variables above are.*##/ d' >> site.exp
2436 -@rm -f ./tmp?
2438 CHECK_TARGETS = check-gcc check-g++ check-g77
2440 check: $(CHECK_TARGETS)
2442 testsuite/site.exp: site.exp
2443 if [ -d testsuite ]; then \
2444 true; \
2445 else \
2446 mkdir testsuite; \
2448 rm -rf testsuite/site.exp
2449 cp site.exp testsuite/site.exp
2451 check-g++: testsuite/site.exp
2452 -rootme=`pwd`; export rootme; \
2453 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2454 cd testsuite; \
2455 EXPECT=${EXPECT} ; export EXPECT ; \
2456 if [ -f $${rootme}/../expect/expect ] ; then \
2457 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2458 export TCL_LIBRARY ; fi ; \
2459 $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
2461 check-gcc: testsuite/site.exp
2462 -rootme=`pwd`; export rootme; \
2463 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2464 cd testsuite; \
2465 EXPECT=${EXPECT} ; export EXPECT ; \
2466 if [ -f $${rootme}/../expect/expect ] ; then \
2467 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2468 export TCL_LIBRARY ; fi ; \
2469 $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
2471 check-g77: testsuite/site.exp
2472 -rootme=`pwd`; export rootme; \
2473 srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
2474 cd testsuite; \
2475 EXPECT=${EXPECT} ; export EXPECT ; \
2476 if [ -f $${rootme}/../expect/expect ] ; then \
2477 TCL_LIBRARY=$${srcdir}/../tcl/library ; \
2478 export TCL_LIBRARY ; fi ; \
2479 $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
2481 # These exist for maintenance purposes.
2483 # Update the tags table.
2484 TAGS: force
2485 cd $(srcdir); \
2486 mkdir temp; \
2487 mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
2488 etags *.y *.h *.c; \
2489 mv temp/* .; \
2490 rmdir temp
2492 # Create the distribution tar file.
2493 #dist: gcc-$(version).tar.gz
2494 dist: gcc.xtar.gz
2496 gcc.xtar.gz: gcc.xtar
2497 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2498 mv tmp-gcc.xtar.gz gcc.xtar.gz
2500 #gcc-$(version).tar.gz: gcc-$(version).tar
2501 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2503 #gcc-$(version).tar:
2504 gcc.xtar: distdir
2505 # Make the distribution.
2506 tar -chf gcc.xtar gcc-$(version)
2508 # This target exists to do the initial work before the language specific
2509 # stuff gets done.
2510 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2511 $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2512 $(srcdir)/cexp.c
2513 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2514 then true; \
2515 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2517 # Update the version number in README
2518 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2519 { $$6 = version; print $$0 } \
2520 $$1 " " $$2 " " $$3 != "This directory contains"' \
2521 version=$(version) README > tmp.README
2522 mv tmp.README README
2523 -rm -rf gcc-$(version) tmp
2524 # Put all the files in a temporary subdirectory
2525 # which has the name that we want to have in the tar file.
2526 mkdir tmp
2527 mkdir tmp/config
2528 mkdir tmp/ginclude
2529 mkdir tmp/objc
2530 for file in *[0-9a-zA-Z+]; do \
2531 $(LN) $$file tmp; \
2532 done
2533 cd config; \
2534 for file in *[0-9a-zA-Z+]; do \
2535 if test -d $$file && test "$$file" != RCS; then \
2536 mkdir ../tmp/config/$$file; \
2537 cd $$file; \
2538 for subfile in *[0-9a-zA-Z+]; do \
2539 $(LN) $$subfile ../../tmp/config/$$file; \
2540 done; \
2541 cd ..; \
2542 else \
2543 $(LN) $$file ../tmp/config; \
2544 fi; \
2545 done
2546 cd ginclude; \
2547 for file in *[0-9a-zA-Z+]; do \
2548 $(LN) $$file ../tmp/ginclude; \
2549 done
2550 cd objc; \
2551 for file in *[0-9a-zA-Z+]; do \
2552 $(LN) $$file ../tmp/objc; \
2553 done
2554 $(LN) .gdbinit tmp
2556 # Finish making `distdir', after the languages have done their thing.
2557 distdir-finish:
2558 mv tmp gcc-$(version)
2559 # Get rid of everything we don't want in the distribution. We'd want
2560 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2561 # expanded.
2562 cd gcc-$(version); make extraclean
2564 distdir: distdir-start lang.distdir distdir-finish
2566 # make diff oldversion=M.N
2567 # creates a diff file between an older distribution and this one.
2568 # The -P option assumes this is GNU diff.
2569 diff:
2570 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2571 -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2572 -x bi-parser.h -x TAGS \
2573 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2574 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2575 $(LANG_DIFF_EXCLUDES) \
2576 gcc-$(oldversion) gcc-$(version) > diffs
2578 bootstrap bootstrap-lean: force
2579 # Only build the C compiler for stage1, because that is the only one that
2580 # we can guarantee will build with the native compiler, and also it is the
2581 # only thing useful for building stage2.
2582 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2583 $(MAKE) stage1
2584 # This used to define ALLOCA as empty, but that would lead to bad results
2585 # for a subsequent `make install' since that would not have ALLOCA empty.
2586 # To prevent `make install' from compiling alloca.o and then relinking cc1
2587 # because alloca.o is newer, we permit these recursive makes to compile
2588 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2589 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2590 $(MAKE) stage2
2591 -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
2592 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2594 bootstrap2: force
2595 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2596 $(MAKE) stage2
2597 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2599 bootstrap3: force
2600 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2602 bootstrap4: force
2603 $(MAKE) CC="stage3/xgcc -Bstage3/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
2605 # Compare the object files in the current directory with those in the
2606 # stage2 directory.
2608 # ./ avoids bug in some versions of tail.
2609 compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
2610 -rm -f .bad_compare
2611 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2612 for file in *$(objext); do \
2613 tail +16c ./$$file > tmp-foo1; \
2614 tail +16c stage$$stage/$$file > tmp-foo2 \
2615 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2616 done
2617 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2618 for dir in tmp-foo $(SUBDIRS); do \
2619 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2620 for file in $$dir/*$(objext); do \
2621 tail +16c ./$$file > tmp-foo1; \
2622 tail +16c stage$$stage/$$file > tmp-foo2 \
2623 && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2624 done; \
2625 fi; \
2626 done
2627 -rm -f tmp-foo*
2628 case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2629 if [ -f .bad_compare ]; then \
2630 echo "Bootstrap comparison failure!"; \
2631 cat .bad_compare; \
2632 exit 1; \
2633 else \
2634 case "$@" in \
2635 *-lean ) rm -rf stage$$stage ;; \
2636 esac; true; \
2639 # Compare the object files in the current directory with those in the
2640 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2641 # running tail and the overhead of twice copying each object file.
2643 gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force
2644 -rm -f .bad_compare
2645 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2646 for file in *$(objext); do \
2647 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2648 done
2649 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2650 for dir in tmp-foo $(SUBDIRS); do \
2651 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2652 for file in $$dir/*$(objext); do \
2653 (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
2654 done; \
2655 fi; \
2656 done
2657 case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
2658 if [ -f .bad_compare ]; then \
2659 echo "Bootstrap comparison failure!"; \
2660 cat .bad_compare; \
2661 exit 1; \
2662 else \
2663 case "$@" in \
2664 *-lean ) rm -rf stage$$stage ;; \
2665 esac; true; \
2668 # Copy the object files from a particular stage into a subdirectory.
2669 stage1-start:
2670 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2671 -for dir in . $(SUBDIRS) ; \
2672 do \
2673 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2674 done
2675 -mv $(STAGESTUFF) stage1
2676 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2677 # dir will work properly.
2678 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
2679 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi
2680 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
2681 -rm -f stage1/libgcc.a
2682 -cp libgcc.a stage1
2683 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2684 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2685 cp stage1/$${f} . ; \
2686 else true; \
2687 fi; done
2688 stage1: force stage1-start lang.stage1
2690 stage2-start:
2691 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2692 -for dir in . $(SUBDIRS) ; \
2693 do \
2694 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2695 done
2696 -mv $(STAGESTUFF) stage2
2697 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2698 # dir will work properly.
2699 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
2700 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi
2701 -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
2702 -rm -f stage2/libgcc.a
2703 -cp libgcc.a stage2
2704 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2705 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2706 cp stage2/$${f} . ; \
2707 else true; \
2708 fi; done
2709 stage2: force stage2-start lang.stage2
2711 stage3-start:
2712 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2713 -for dir in . $(SUBDIRS) ; \
2714 do \
2715 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2716 done
2717 -mv $(STAGESTUFF) stage3
2718 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2719 # dir will work properly.
2720 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
2721 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi
2722 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
2723 -rm -f stage3/libgcc.a
2724 -cp libgcc.a stage3
2725 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2726 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2727 cp stage3/$${f} . ; \
2728 else true; \
2729 fi; done
2730 stage3: force stage3-start lang.stage3
2732 stage4-start:
2733 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2734 -for dir in . $(SUBDIRS) ; \
2735 do \
2736 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2737 done
2738 -mv $(STAGESTUFF) stage4
2739 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2740 # dir will work properly.
2741 -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
2742 -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi
2743 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
2744 -rm -f stage4/libgcc.a
2745 -cp libgcc.a stage4
2746 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2747 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2748 cp stage4/$${f} . ; \
2749 else true; \
2750 fi; done
2751 stage4: force stage4-start lang.stage4
2753 # Copy just the executable files from a particular stage into a subdirectory,
2754 # and delete the object files. Use this if you're just verifying a version
2755 # that is pretty sure to work, and you are short of disk space.
2756 risky-stage1: stage1
2757 -make clean
2759 risky-stage2: stage2
2760 -make clean
2762 risky-stage3: stage3
2763 -make clean
2765 risky-stage4: stage4
2766 -make clean
2768 #In GNU Make, ignore whether `stage*' exists.
2769 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2770 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2772 force: