* pa.md (alternate dbra pattern): Remove incorrect pattern.
[official-gcc.git] / gcc / Makefile.in
blob49e00cf2711eab7e25115be5dabcf359639751d4
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 objective-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 = -O $(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 OLDAR_FLAGS = qc
76 AR_FLAGS = rc
77 SHELL = /bin/sh
78 # on sysV, define this as cp.
79 INSTALL = @INSTALL@
80 # These permit overriding just for certain files.
81 INSTALL_PROGRAM = $(INSTALL)
82 INSTALL_DATA = $(INSTALL)
83 MAKEINFO = makeinfo
84 MAKEINFOFLAGS =
85 TEXI2DVI = texi2dvi
86 # For GNUmake: let us decide what gets passed to recursive makes.
87 MAKEOVERRIDES =
88 @SET_MAKE@
90 # Define this as & to perform parallel make on a Sequent.
91 # Note that this has some bugs, and it seems currently necessary
92 # to compile all the gen* files first by hand to avoid erroneous results.
93 P =
95 # How to invoke ranlib.
96 RANLIB = ranlib
97 # Test to use to see whether ranlib exists on the system.
98 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
100 # Compiler to use for compiling libgcc1.a.
101 # OLDCC should not be the GNU C compiler,
102 # since that would compile typical libgcc1.a functions such as mulsi3
103 # into infinite recursions.
104 OLDCC = cc
106 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
107 # NOTE: -O does not work on some Unix systems!
108 CCLIBFLAGS = -O
110 # Version of ar to use when compiling libgcc1.a.
111 OLDAR = ar
113 # Target to use when installing include directory. Either
114 # install-headers-tar or install-headers-cpio.
115 INSTALL_HEADERS_DIR = @build_install_headers_dir@
117 # Header files that are made available under the same name
118 # to programs compiled with GCC.
119 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
120 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
121 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
122 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
123 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10300.h \
124 $(srcdir)/ginclude/va-pa.h \
125 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
126 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
127 $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
128 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
129 $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
130 $(LANG_EXTRA_HEADERS)
132 # Target to use whe installing assert.h. Some systems may
133 # want to set this empty.
134 INSTALL_ASSERT_H = install-assert-h
136 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
137 # Usually the one we just built.
138 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
139 GCC_FOR_TARGET = ./xgcc -B./
141 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
142 # It omits XCFLAGS, and specifies -B./.
143 # It also specifies -I./include to find, e.g., stddef.h.
144 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
146 # Special flags for compiling enquire.
147 # We disable optimization to make floating point more reliable.
148 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
149 ENQUIRE_LDFLAGS = $(LDFLAGS)
151 # Sed command to transform gcc to installed name. Overwritten by configure.
152 program_transform_name = -e s,x,x,
153 program_transform_cross_name = -e s,^,$(target_alias)-,
155 # Tools to use when building a cross-compiler.
156 # These are used because `configure' appends `cross-make'
157 # to the makefile when making a cross-compiler.
159 TARGET_TOOLPREFIX = $(tooldir)/bin/
160 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
161 AR_FOR_TARGET_FLAGS = rc
162 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
163 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
165 # Dir to search for system headers. Overridden by cross-make.
166 SYSTEM_HEADER_DIR = /usr/include
168 # Control whether to run fixproto.
169 STMP_FIXPROTO = stmp-fixproto
171 # Test to see whether <limits.h> exists in the system header files.
172 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
174 # There may be a premade insn-attrtab.c for this machine.
175 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
176 # PREMADE_ATTRTAB is the file name of the file to use.
177 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
178 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
179 PREMADE_ATTRTAB =
181 target=@target@
182 target_alias=@target@
183 xmake_file=@dep_host_xmake_file@
184 tmake_file=@dep_tmake_file@
185 out_file=$(srcdir)/config/@out_file@
186 out_object_file=@out_object_file@
187 md_file=$(srcdir)/config/@md_file@
188 tm_file=@tm_file_list@
189 build_xm_file=@build_xm_file_list@
190 host_xm_file=@host_xm_file_list@
191 lang_specs_files=@lang_specs_files@
192 lang_options_files=@lang_options_files@
193 OBJC_THREAD_FILE=thr-@objc_thread_file@
194 version=@version@
195 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
197 # Common prefix for installation directories.
198 # NOTE: This directory must exist when you start installation.
199 prefix = @prefix@
200 # Directory in which to put localized header files. On the systems with
201 # gcc as the native cc, `local_prefix' may not be `prefix' which is
202 # `/usr'.
203 # NOTE: local_prefix *should not* default from prefix.
204 local_prefix = @local_prefix@
205 # Directory in which to put host dependent programs and libraries
206 exec_prefix = @exec_prefix@
207 # Directory in which to put the executable for the command `gcc'
208 bindir = @bindir@
209 # Directory in which to put the directories used by the compiler.
210 libdir = @libdir@
211 # Directory in which the compiler finds executables, libraries, etc.
212 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
213 # Directory in which the compiler finds g++ includes.
214 gxx_include_dir= $(prefix)/include/g++
215 # Directory in which the old g++ header files may be found.
216 old_gxx_include_dir= $(libdir)/g++-include
217 # Directory to search for site-specific includes.
218 includedir = $(local_prefix)/include
219 # assertdir is overridden in cross-make.
220 # (But this currently agrees with what is in cross-make.)
221 assertdir = $(tooldir)/include
222 # where the info files go
223 infodir = @infodir@
224 # Extension (if any) to put in installed man-page filename.
225 manext = .1
226 objext = .o
227 exeext = @exeext@
229 # Directory in which to put man pages.
230 mandir = @mandir@/man1
231 # Directory in which to find other cross-compilation tools and headers.
232 # Used in install-cross.
233 tooldir = $(exec_prefix)/$(target_alias)
234 # Dir for temp files.
235 tmpdir = /tmp
237 # Additional system libraries to link with.
238 CLIB=
240 # Change this to a null string if obstacks are installed in the
241 # system library.
242 OBSTACK=obstack.o
244 # Specify the rule for actually making libgcc.a,
245 LIBGCC = libgcc.a
246 # and the rule for installing it.
247 INSTALL_LIBGCC = install-libgcc
249 # Specify the rule for actually making libgcc1.a.
250 # The value may be empty; that means to do absolutely nothing
251 # with or for libgcc1.a.
252 LIBGCC1 = libgcc1.a
254 # Specify the rule for making libgcc1.a for a cross-compiler.
255 # The default rule assumes that libgcc1.a is supplied by the user.
256 CROSS_LIBGCC1 = libgcc1.cross
258 # Specify the rule for actually making libgcc2.a.
259 LIBGCC2 = libgcc2.a
261 # Options to use when compiling libgcc2.a.
262 # -g1 causes output of debug info only for file-scope entities.
263 # we use this here because that should be enough, and also
264 # so that -g1 will be tested.
265 LIBGCC2_DEBUG_CFLAGS = -g1
266 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
268 # Additional options to use when compiling libgcc2.a.
269 # Some targets override this to -Iinclude
270 LIBGCC2_INCLUDES =
272 # Additional target-dependent options for compiling libgcc2.a.
273 TARGET_LIBGCC2_CFLAGS =
275 # Things which must be built before building libgcc2.a.
276 # Some targets override this to stmp-int-hdrs
277 LIBGCC2_DEPS =
279 # Enquire target (This is a variable so that a target can choose not to
280 # build it.)
281 ENQUIRE = enquire
283 # libgcc1-test target (must also be overridable for a target)
284 LIBGCC1_TEST = libgcc1-test
286 # List of extra executables that should be compiled for this target machine
287 # that are used for compiling from source code to object code.
288 # The rules for compiling them should be in the t-* file for the machine.
289 EXTRA_PASSES =@extra_passes@
291 # Like EXTRA_PASSES, but these are used when linking.
292 EXTRA_PROGRAMS = @extra_programs@
294 # List of extra object files that should be compiled for this target machine.
295 # The rules for compiling them should be in the t-* file for the machine.
296 EXTRA_PARTS = @extra_parts@
298 # List of extra object files that should be compiled and linked with
299 # compiler proper (cc1, cc1obj, cc1plus).
300 EXTRA_OBJS = @extra_objs@
302 # List of extra object files that should be compiled and linked with
303 # the gcc driver.
304 EXTRA_GCC_OBJS =@host_extra_gcc_objs@
306 # List of additional header files to install.
307 # Often this is edited directly by `configure'.
308 EXTRA_HEADERS =@extra_headers_list@
310 # Set this to `ld' to enable use of collect2.
311 USE_COLLECT2 = @will_use_collect2@
312 MAYBE_USE_COLLECT = @maybe_use_collect2@
313 # It is convenient for configure to add the assignment at the beginning,
314 # so don't override it here.
316 # List of extra C and assembler files to add to libgcc1.a.
317 # Assembler files should have names ending in `.asm'.
318 LIB1FUNCS_EXTRA =
320 # List of extra C and assembler files to add to libgcc2.a.
321 # Assembler files should have names ending in `.asm'.
322 LIB2FUNCS_EXTRA =
324 # Default float.h source to use for cross-compiler.
325 # This is overidden by configure.
326 CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
328 # Program to convert libraries.
329 LIBCONVERT =
331 # Control whether header files are installed.
332 INSTALL_HEADERS=install-headers
334 # Options for tar when copying trees. So HPUX can override it.
335 TAROUTOPTS = xpBf
337 # Select which version of fixincludes to use (I.E. regular versus SVR4)
338 # This value is overridden directly by configure.
339 FIXINCLUDES = @fixincludes@
341 # Additional directories of header files to run fixincludes on.
342 # These should be directories searched automatically by default
343 # just as /usr/include is.
344 # *Do not* use this for directories that happen to contain
345 # header files, but are not searched automatically by default.
346 # On most systems, this is empty.
347 OTHER_FIXINCLUDES_DIRS=
349 # A list of all the language-specific executables.
350 # This is overridden by configure.
351 COMPILERS = cc1$(exeext) cc1obj$(exeext) @all_compilers@
353 # List of things which should already be built whenever we try to use xgcc
354 # to compile anything (without linking).
355 GCC_PASSES=xgcc$(exeext) $(COMPILERS) cpp$(exeext) $(EXTRA_PASSES)
357 # List of things which should already be built whenever we try to use xgcc
358 # to link anything.
359 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
361 # Directory to link to, when using the target `maketest'.
362 DIR = ../gcc
364 # Guaranteed to not exist when not passing md through cpp.
365 # This value is overridden directly by configure.
366 MD_FILE = md-cpp-not-used
368 # Flags to use when cross-building GCC.
369 # Prefix to apply to names of object files when using them
370 # to run on the machine we are compiling on.
371 HOST_PREFIX=
372 # Prefix to apply to names of object files when compiling them
373 # to run on the machine we are compiling on.
374 # The default for this variable is chosen to keep these rules
375 # out of the way of the other rules for compiling the same source files.
376 HOST_PREFIX_1=loser-
377 HOST_CC=$(CC)
378 HOST_CFLAGS=$(ALL_CFLAGS)
379 HOST_CLIB=$(CLIB)
380 HOST_LDFLAGS=$(LDFLAGS)
381 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
382 HOST_ALLOCA=$(ALLOCA)
383 HOST_MALLOC=$(MALLOC)
384 HOST_OBSTACK=$(OBSTACK)
386 # Actual name to use when installing a native compiler.
387 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
389 # Actual name to use when installing a cross-compiler.
390 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
392 # Choose the real default target.
393 ALL=all.internal
395 # Choose the real install target.
396 INSTALL_TARGET=install-normal
398 # Source for float.h. Overridden by cross-make.
399 FLOAT_H=float.h-nat
401 # Extra symbols for fixproto to define when parsing headers.
402 FIXPROTO_DEFINES =
404 # Extra flags to use when compiling crt{begin,end}.o.
405 CRTSTUFF_T_CFLAGS =
407 # Extra flags to use when compiling [m]crt0.o.
408 CRT0STUFF_T_CFLAGS =
410 # End of variables for you to override.
412 # Definition of `all' is here so that new rules inserted by sed
413 # do not specify the default target.
414 # The real definition is under `all.internal' (for native compilers)
415 # or `all.cross' (for cross compilers).
416 all: all.indirect
418 # This tells GNU Make version 3 not to put all variables in the environment.
419 .NOEXPORT:
421 # sed inserts variable overrides after the following line.
422 ####target overrides
423 @target_overrides@
425 ####host overrides
426 @host_overrides@
428 ####cross overrides
429 @cross_defines@
430 @cross_overrides@
432 ####build overrides
433 @build_overrides@
435 # Now figure out from those variables how to compile and link.
437 all.indirect: $(ALL)
439 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
440 # ??? IN_GCC should be obsolete now.
441 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
443 # This is the variable actually used when we compile.
444 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
446 # Likewise.
447 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
449 # Even if ALLOCA is set, don't use it if compiling with GCC.
450 USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
451 USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
452 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
453 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
455 # Dependency on obstack, alloca, malloc or whatever library facilities
456 # are not installed in the system libraries.
457 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
458 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
460 # Likewise, for use in the tools that must run on this machine
461 # even if we are cross-building GCC.
462 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
463 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
465 # How to link with both our special library facilities
466 # and the system's installed libraries.
467 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
469 # Likewise, for use in the tools that must run on this machine
470 # even if we are cross-building GCC.
471 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
472 $(HOST_CLIB)
474 HOST_RTL = $(HOST_PREFIX)rtl.o
475 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
476 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
478 # Specify the directories to be searched for header files.
479 # Both . and srcdir are used, in that order,
480 # so that tm.h and config.h will be found in the compilation
481 # subdirectory rather than in the source directory.
482 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
484 # Always use -I$(srcdir)/config when compiling.
485 .c.o:
486 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
488 # This tells GNU make version 3 not to export all the variables
489 # defined in this file into the environment.
490 .NOEXPORT:
492 # Support for additional languages (other than c and objc).
493 # ??? objc can be supported this way too (leave for later).
495 # These next lines are overridden by configure.
496 LANG_MAKEFILES = @all_lang_makefiles@
497 LANG_STAGESTUFF = @all_stagestuff@
498 LANG_DIFF_EXCLUDES = @all_diff_excludes@
499 LANG_LIB2FUNCS = @all_lib2funcs@
500 LANG_EXTRA_HEADERS = @all_headers@
502 # Flags to pass to recursive makes.
503 # CC is set by configure. Hosts without symlinks need special handling
504 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
505 # subdirectories.
506 # ??? The choices here will need some experimenting with.
507 FLAGS_TO_PASS = \
508 "AR_FLAGS=$(AR_FLAGS)" \
509 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
510 "BISON=$(BISON)" \
511 "BISONFLAGS=$(BISONFLAGS)" \
512 "CC=@cc_set_by_configure@" \
513 "CFLAGS=$(CFLAGS)" \
514 "CLIB=$(CLIB)" \
515 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
516 "LDFLAGS=$(LDFLAGS)" \
517 "LEX=$(LEX)" \
518 "LEXFLAGS=$(LEXFLAGS)" \
519 "MAKEINFO=$(MAKEINFO)" \
520 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
521 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
522 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
523 "SHELL=$(SHELL)" \
524 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
525 "exeext=$(exeext)" \
526 "objext=$(objext)" \
527 "exec_prefix=$(exec_prefix)" \
528 "prefix=$(prefix)" \
529 "tooldir=$(tooldir)" \
530 "bindir=$(bindir)" \
531 "libsubdir=$(libsubdir)"
533 # Lists of files for various purposes.
535 # Language-specific object files for C.
536 C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
537 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
539 # Language-specific object files for Objective C.
540 OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
541 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
543 # Files specific to the C interpreter bytecode compiler(s).
544 BC_OBJS = bc-emit.o bc-optab.o
546 # Bytecode header files constructed at build time; vmsconfig.com wants this.
547 BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
549 # Language-independent object files.
550 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
551 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
552 varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
553 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o \
554 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
555 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
556 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
557 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
558 profile.o \
559 insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
561 # GEN files are listed separately, so they can be built before doing parallel
562 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
563 # them before rtl.o is compiled.
564 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
566 CCCP=cccp
567 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
568 #CCCP=cppmain
570 # Files to be copied away after each stage in building.
571 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
572 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
573 insn-attr.h insn-attrtab.c insn-opinit.c \
574 stamp-flags stamp-config stamp-codes stamp-mlib \
575 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
576 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS stamp-crt0 \
577 genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
578 genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
579 genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
580 $(BC_ALL) \
581 stamp-bcarity stamp-bcopcode stamp-bcopname \
582 bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
583 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
584 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
585 protoize$(exeext) unprotoize$(exeext) \
586 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
587 gcov$(exeext) *.bp \
588 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
589 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
590 *.[si] \
591 $(LANG_STAGESTUFF)
593 # Members of libgcc1.a.
594 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
595 _lshrsi3 _ashrsi3 _ashlsi3 \
596 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
597 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
598 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
599 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
600 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
602 # Library members defined in libgcc2.c.
603 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
604 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
605 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
606 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
607 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
608 _fixtfdi _fixunstfdi _floatditf \
609 __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
610 _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
611 _ctors _eh _pure
613 # The files that "belong" in CONFIG_H are deliberately omitted
614 # because having them there would not be useful in actual practice.
615 # All they would do is cause complete recompilation every time
616 # one of the machine description files is edited.
617 # That may or may not be what one wants to do.
618 # If it is, rm *.o is an easy way to do it.
619 # CONFIG_H = $(host_xm_file) $(tm_file)
620 CONFIG_H =
621 RTL_H = rtl.h rtl.def machmode.h machmode.def
622 TREE_H = tree.h real.h tree.def machmode.h machmode.def
623 BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
625 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
628 # Language makefile fragments.
630 # The following targets define the interface between us and the languages.
632 # all.build, all.cross, start.encap, rest.encap,
633 # info, dvi,
634 # install-normal, install-common, install-info, install-man,
635 # uninstall, distdir,
636 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
637 # stage1, stage2, stage3, stage4
639 # Each language is linked in with a series of hooks (since we can't use `::'
640 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
641 # Configure computes and adds these here.
643 ####language hooks
644 @language_hooks@
646 # sed inserts language fragments after the following line.
647 ####language fragments
648 @language_fragments@
650 # End of language makefile fragments.
652 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
653 .SUFFIXES: .in .def
655 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
656 $(xmake_file) $(tmake_file) \
657 $(LANG_MAKEFILES)
658 cp config.status config.run
659 $(SHELL) config.run
660 rm -f config.run
662 configure: $(srcdir)/configure.in
663 cd $(srcdir); autoconf
665 all.internal: start.encap rest.encap
666 # This is what to compile if making a cross-compiler.
667 # Note that we can compile enquire using the cross-compiler just built,
668 # although we can't run it on this machine.
669 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
670 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
671 # This is what to compile if making gcc with a cross-compiler.
672 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
673 # This is what must be made before installing GCC and converting libraries.
674 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
675 # These can't be made until after GCC can run.
676 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
677 # This is what is made with the host's compiler
678 # whether making a cross compiler or not.
679 native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
681 # Define the names for selecting languages in LANGUAGES.
682 C c: cc1
683 OBJC objc: cc1obj objc-runtime
684 OBJECTIVE-C objective-c: cc1obj objc-runtime
685 PROTO: proto
687 # Tell GNU make these are phony targets.
688 .PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
690 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
691 # a target to build even if it is up-to-date. So we must verify that
692 # config.status does not exist before failing.
693 config.status:
694 @if [ ! -f config.status ] ; then \
695 echo You must configure gcc. Look at the INSTALL file for details.; \
696 false; \
697 else \
698 true; \
701 # On the target machine, finish building a cross compiler.
702 # This does the things that can't be done on the host machine.
703 rest.cross: $(LIBGCC) gfloat.h specs
705 # Verify that it works to compile and link libgcc1-test.
706 # If it does, then there are sufficient replacements for libgcc1.a.
707 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
708 @echo "Testing libgcc1. Ignore linker warning messages."
709 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
710 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
711 libgcc1-test.o: libgcc1-test.c native xgcc
712 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
714 # Recompile all the language-independent object files.
715 # This is used only if the user explicitly asks for it.
716 compilations: ${OBJS}
718 # Create a list of the language-independent object files so the language
719 # subdirectories needn't mention their names explicitly.
720 stamp-objlist: $(OBJS) $(BC_OBJS)
721 echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
723 # We call this executable `xgcc' rather than `gcc'
724 # to avoid confusion if the current directory is in the path
725 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
726 xgcc: gcc.o version.o choose-temp.o pexecute.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
727 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o \
728 choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
730 # Dump a specs file to make -B./ read these specs over installed ones.
731 specs: xgcc
732 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
733 mv tmp-specs specs
735 # We do want to create an executable named `xgcc', so we can use it to
736 # compile libgcc2.a.
737 # Also create gcc-cross, so that install-common will install properly.
738 gcc-cross: xgcc
739 cp xgcc$(exeext) gcc-cross$(exeext)
741 cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
742 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
744 cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
745 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
747 # Copy float.h from its source.
748 gfloat.h: $(FLOAT_H)
749 -rm -f gfloat.h
750 cp $(FLOAT_H) gfloat.h
752 # Create float.h source for the native machine.
753 float.h-nat: enquire
754 -./enquire -f > tmp-float.h
755 mv tmp-float.h float.h-nat
757 # Create a dummy float.h source for a cross-compiler.
758 # ??? This isn't used anymore. Should we create config/float-unkn.h
759 # and make that the default float_format in configure?
760 float.h-cross:
761 echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
762 echo "#error float.h values not known for cross-compiler" >> t-float.h-cross
763 echo "#endif" >> t-float.h-cross
764 mv t-float.h-cross float.h-cross
766 # Used to compile enquire with standard cc, but have forgotten why.
767 # Let's try with GCC.
768 enquire: enquire.o $(GCC_PARTS)
769 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
770 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
771 # Breaking this line caused a problem with one version of GNU make.
772 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
774 # Build the version of limits.h that we will install.
775 xlimits.h: glimits.h limitx.h limity.h
776 if $(LIMITS_H_TEST) ; then \
777 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
778 else \
779 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
781 mv tmp-xlimits.h xlimits.h
783 # Build libgcc.a.
784 # This is done in two parts because some functions, in libgcc1.c,
785 # must be compiled with something other than GCC,
786 # while the rest, in libgcc2.c, must be compiled with xgcc.
787 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
789 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
790 # LIBCONVERT should put its output in libgcc1.conv.
791 libgcc1.conv: libgcc1.a
792 $(LIBCONVERT) libgcc1.a libgcc1.conv
794 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
795 # Make an empty file instead.
796 libgcc1.null: $(GCC_PASSES)
797 echo "__foo () {}" > dummy.c
798 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
799 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
800 rm -f dummy$(objext) dummy.c
802 # This is $(LIBGCC1) for a cross-compiler.
803 # We have no automatic way of building libgcc1.a,
804 # so it's up to the installer to find a way to do that.
805 # This rule deliberately does not depend on libgcc1.a
806 # so that it will fail if the installer hasn't provided it.
807 libgcc1.cross:
808 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
810 # Compile the library of arithmetic subroutines with the native compiler.
811 # Don't compile it with GCC!
812 # (That would cause most arithmetic functions to call themselves.)
814 # NOTE: If you modify these rules substantially, please be sure to
815 # check at least config/i386/t-sco5 and possibly other makefile
816 # fragments.
817 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
818 -rm -f tmplibgcc1.a
819 # Actually build it in tmplibgcc1.a, then rename at end,
820 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
821 # -e causes any failing command to make this rule fail.
822 # -e doesn't work in certain shells, so we test $$? as well.
823 # lynx has a broken ar, it always complains when the initial library is
824 # empty, thus this command works only if we don't do -e
825 # There is a trailing backslash (\) deleted from the following line.
826 # set -e;
827 for name in $(LIB1FUNCS); \
828 do \
829 echo $${name}; \
830 rm -f $${name}$(objext); \
831 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
832 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
833 mv libgcc1$(objext) $${name}$(objext); \
834 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
835 rm -f $${name}$(objext); \
836 done
837 # Some shells crash when a loop has no items.
838 # So make sure there is always at least one--`..'.
839 # Then ignore it.
840 # We don't use -e here because there are if statements
841 # that should not make the command give up when the if condition is false.
842 # Instead, we test for failure after each command where it matters.
843 for file in .. $(LIB1FUNCS_EXTRA); \
844 do \
845 if [ x$${file} != x.. ]; then \
846 name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
847 echo $${name}; \
848 if [ $${name}.asm = $${file} ]; then \
849 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
850 else true; fi; \
851 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
852 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
853 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
854 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
855 rm -f $${name}.s $${name}$(objext); \
856 else true; \
857 fi; \
858 done
859 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
860 mv tmplibgcc1.a libgcc1.a
862 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
863 # functions. LIB1ASMSRC is the name of the source file in the config
864 # subdirectory.
865 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
866 -rm -f tmplibgcc1.a libgcc1.S
867 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
868 # Actually build it in tmplibgcc1.a, then rename at end,
869 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
870 # -e causes any failing command to make this rule fail.
871 # -e doesn't work in certain shells, so we test $$? as well.
872 # lynx has a broken ar, it always complains when the initial library is
873 # empty, thus this command works only if we don't do -e
874 # There is a trailing backslash (\) deleted from the following line.
875 # set -e;
876 for name in $(LIB1ASMFUNCS); \
877 do \
878 echo $${name}; \
879 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
880 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
881 mv libgcc1$(objext) $${name}$(objext); \
882 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
883 rm -f $${name}$(objext); \
884 done
885 -rm -f libgcc1.S
886 mv tmplibgcc1.a libgcc1-asm.a
888 # Generate assembly versions of the functions required for libgcc1.
889 # You'll still need to massage the code by hand (possibly hacking
890 # underscores and local labels) but this will get you started.
891 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
892 -rm -f libgcc1.S
893 touch libgcc1.S
894 for name in $(LIB1FUNCS); \
895 do \
896 echo $${name}; \
897 $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
898 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
899 echo '#ifdef ' L$${name} >> libgcc1.S; \
900 cat libgcc1.s >> libgcc1.S; \
901 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
902 echo "" >> libgcc1.S; \
903 done
905 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
906 # But recompiling cc1 should not force recompilation of libgcc2.a.
907 # If you want to force recompilation, delete libgcc2.a.
908 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
909 -if [ -f libgcc2.ready ] ; then \
910 true; \
911 else \
912 touch libgcc2.ready; \
915 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
916 $(LANG_LIB2FUNCS) machmode.h longlong.h gbl-ctors.h config.status
917 # Actually build it in tmplibgcc2.a, then rename at end,
918 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
919 -rm -f tmplibgcc2.a
920 # -e causes any failing command to make this rule fail.
921 # -e doesn't work in certain shells, so we test $$? as well.
922 # lynx has a broken ar, it always complains when the initial library is
923 # empty, thus this command works only if we don't do -e
924 # There is a trailing backslash (\) deleted from the following line.
925 # set -e;
926 for name in $(LIB2FUNCS); \
927 do \
928 echo $${name}; \
929 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
930 $(srcdir)/libgcc2.c -o $${name}$(objext); \
931 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
932 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
933 rm -f $${name}$(objext); \
934 done
935 # Some shells crash when a loop has no items.
936 # So make sure there is always at least one--`..'.
937 # Then ignore it.
938 # We don't use -e here because there are if statements
939 # that should not make the command give up when the if condition is false.
940 # Instead, we test for failure after each command where it matters.
941 for file in .. $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS); \
942 do \
943 if [ x$${file} != x.. ]; then \
944 name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
945 oname=` echo $${name} | sed -e 's,.*/,,'`; \
946 if [ $${name}.txt = $${file} ]; then \
947 for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
948 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
949 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
950 CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
951 HOST_PREFIX_1="$(HOST_PREFIX_1)" \
952 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
953 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
954 $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
955 rm -f $${f}; \
956 fi; done; \
957 else \
958 echo $${name}; \
959 if [ $${name}.asm = $${file} ]; then \
960 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
961 else true; fi; \
962 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
963 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
964 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
965 rm -f $${name}.s $${oname}$(objext); \
966 fi; \
967 else true; \
968 fi; \
969 done
970 mv tmplibgcc2.a libgcc2.a
971 # These lines were deleted from above the mv command
972 # because ranlibing libgcc.a itself should suffice.
973 # -if [ x${HPUX_GAS} = x ] ; then \
974 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
975 # else true; fi
977 # Combine the various libraries into a single library, libgcc.a.
978 libgcc.a: $(LIBGCC1) $(LIBGCC2)
979 -rm -rf tmplibgcc.a libgcc.a tmpcopy
980 mkdir tmpcopy
981 -if [ x$(LIBGCC1) != x ]; \
982 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
983 else true; \
985 # Some versions of ar (specifically the one in RISC/os 5.x), create an
986 # unwritable table of contents file, and then print an error message when
987 # the second ar command tries to overwrite this file. To avoid the error
988 # message from ar, we make sure all files are writable.
989 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
990 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
991 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
992 rm -rf tmpcopy
993 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
994 # Actually build it in tmplibgcc.a, then rename at end,
995 # so that libgcc.a itself remains nonexistent if compilation is aborted.
996 mv tmplibgcc.a libgcc.a
998 # Use the genmultilib shell script to generate the information the gcc
999 # driver program needs to select the library directory based on the
1000 # switches.
1001 multilib.h: stamp-mlib; @true
1002 stamp-mlib: $(srcdir)/genmultilib Makefile
1003 $(SHELL) $(srcdir)/genmultilib \
1004 "$(MULTILIB_OPTIONS)" \
1005 "$(MULTILIB_DIRNAMES)" \
1006 "$(MULTILIB_MATCHES)" \
1007 "$(MULTILIB_EXCEPTIONS)" \
1008 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1009 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1010 touch stamp-mlib
1012 # Build multiple copies of libgcc.a, one for each target switch.
1013 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
1014 $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS) machmode.h longlong.h gbl-ctors.h \
1015 config.status
1016 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
1017 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1018 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1019 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1020 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1021 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
1022 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1023 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
1024 MULTILIB_CFLAGS="$${flags}" \
1025 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
1026 dir="$${dir}" stmp-multilib-sub; \
1027 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
1028 done
1029 touch stmp-multilib
1031 # Subroutine of stmp-multilib so make -n works.
1032 stmp-multilib-sub:
1033 rm -f $(LIBGCC2)
1034 if [ -d $(dir) ]; then \
1035 cd $(dir); \
1036 rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
1037 else true; \
1039 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1040 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1041 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1042 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
1043 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1044 then true; \
1045 else rm -f $(LIBGCC1); \
1047 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
1048 then true; \
1049 else \
1050 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1051 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1052 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1053 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
1055 rm -rf tmplibgcc.a tmpcopy
1056 mkdir tmpcopy
1057 if [ x$(LIBGCC1) != x ]; \
1058 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
1059 else true; \
1061 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
1062 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
1063 rm -rf libgcc2.a tmpcopy
1064 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
1065 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
1066 mv tmplibgcc.a $(dir)/libgcc.a
1067 for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
1068 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
1069 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
1070 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
1071 MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
1072 mv t$${f} $(dir)/$${f}; \
1073 else true; \
1074 fi; done
1076 objc-runtime: libobjc.a
1078 # Build the Objective C runtime library.
1079 libobjc.a: cc1obj specs stmp-int-hdrs libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
1080 if [ -d objc ]; then true; else mkdir objc; fi
1081 thisdir1=`pwd`; \
1082 srcdir1=`cd $(srcdir); pwd`; \
1083 cd objc; \
1084 $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
1085 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1086 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
1087 GCC_CFLAGS="$(GCC_CFLAGS)" OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
1088 -rm -f libobjc.a
1089 ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
1090 -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
1092 # This is used by objc/Makefile if the user runs that directly.
1093 sublibobjc.a: cc1obj specs stmp-int-hdrs libgcc2.ready
1094 thisdir1=`pwd`; \
1095 srcdir1=`cd $(srcdir); pwd`; \
1096 cd objc; \
1097 $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
1098 srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1099 GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
1100 GCC_CFLAGS="$(GCC_CFLAGS)" OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
1102 # Compile two additional files that are linked with every program
1103 # linked using GCC on systems using COFF or ELF, for the sake of C++
1104 # constructors.
1105 $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1106 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1107 -finhibit-size-directive -fno-inline-functions $(CRTSTUFF_T_CFLAGS) \
1108 -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext)
1110 $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1111 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
1112 -finhibit-size-directive -fno-inline-functions $(CRTSTUFF_T_CFLAGS) \
1113 -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
1115 # On some systems we also want to install versions of these files
1116 # compiled using PIC for use in shared libraries.
1117 crtbeginS.o crtendS.o: stamp-crtS ; @true
1119 stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1120 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1121 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1122 -g0 -c $(srcdir)/crtstuff.c
1123 mv crtstuff$(objext) crtbeginS$(objext)
1124 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
1125 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1126 -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
1127 touch stamp-crtS
1129 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1130 crt0.o: stamp-crt0 ; @true
1131 mcrt0.o: stamp-crt0; @true
1133 stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
1134 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1135 -o crt0.o -c $(CRT0_S)
1136 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
1137 -o mcrt0.o -c $(MCRT0_S)
1138 touch stamp-crt0
1140 # Compiling object files from source files.
1142 # Note that dependencies on obstack.h are not written
1143 # because that file is not part of GCC.
1145 # C language specific files.
1147 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1148 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1149 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1150 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1151 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1152 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1153 $(srcdir)/c-parse.y: c-parse.in
1154 echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1155 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1156 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1157 $(srcdir)/c-parse.in >>tmp-c-parse.y
1158 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1160 $(srcdir)/c-gperf.h: c-parse.gperf
1161 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1162 $(srcdir)/c-parse.gperf >tmp-gperf.h
1163 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1165 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1166 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1167 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1168 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
1169 input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1170 c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1171 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1172 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) except.h function.h \
1173 defaults.h c-pragma.h
1174 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1176 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1177 ld: collect2
1178 rm -f ld$(exeext)
1179 ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
1180 || cp collect2$(exeext) ld$(exeext)
1182 collect2 : collect2.o cplus-dem.o underscore.o version.o \
1183 choose-temp.o $(LIBDEPS)
1184 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1185 -rm -f collect2$(exeext)
1186 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \
1187 cplus-dem.o underscore.o version.o choose-temp.o $(LIBS)
1189 collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
1190 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1191 -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
1192 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1194 cplus-dem.o: cplus-dem.c demangle.h
1196 underscore.c: stamp-under ; @true
1198 stamp-under: $(GCC_PASSES)
1199 echo "int xxy_us_dummy;" >tmp-dum.c
1200 $(GCC_FOR_TARGET) -S tmp-dum.c
1201 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1202 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1203 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1204 else \
1205 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1207 $(srcdir)/move-if-change tmp-under.c underscore.c
1208 -rm -f tmp-dum.c tmp-dum.s
1209 touch stamp-under
1211 # Objective C language specific files.
1213 objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1214 c-tree.h input.h flags.h objc-act.h
1215 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
1216 $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
1217 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
1218 $(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
1219 echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
1220 sed -e "/^ifc$$/,/^end ifc$$/d" \
1221 -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
1222 $(srcdir)/c-parse.in >>tmp-objc-prs.y
1223 $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc-parse.y
1225 objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
1226 flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
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 config.status $(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 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 real.o : real.c $(CONFIG_H) $(TREE_H)
1309 getpwd.o : getpwd.c $(CONFIG_H)
1311 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1312 insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h function.h \
1313 bytecode.h
1315 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1316 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1317 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1319 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1320 insn-config.h recog.h
1321 profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
1322 tree.h output.h
1323 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1324 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1325 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1326 integrate.h regs.h flags.h expr.h loop.h
1327 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1328 basic-block.h regs.h hard-reg-set.h output.h
1329 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
1330 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1331 basic-block.h recog.h real.h hard-reg-set.h
1332 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1333 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1334 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
1335 regs.h hard-reg-set.h insn-config.h recog.h output.h
1336 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
1337 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1339 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
1340 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1341 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1342 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1343 basic-block.h recog.h output.h
1344 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1345 regs.h hard-reg-set.h insn-codes.h insn-config.h basic-block.h recog.h \
1346 reload.h expr.h
1347 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1348 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1349 flags.h output.h
1350 sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
1351 flags.h insn-config.h insn-attr.h
1352 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1353 recog.h conditions.h insn-config.h insn-attr.h except.h real.h output.h \
1354 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1355 recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1356 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1357 insn-flags.h insn-codes.h real.h
1358 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1359 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1361 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
1362 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1363 insn-flags.h output.h insn-attr.h insn-codes.h
1364 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1366 # Build auxiliary files that support ecoff format.
1367 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1368 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1370 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1372 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1373 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1375 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1377 # Build file to support OSF/rose half-pic format.
1378 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1380 # Normally this target is not used; but it is used if you
1381 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1382 # from the GNU Emacs distribution.
1383 alloca.o: alloca.c
1384 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1385 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1386 $(ALLOCA_FINISH)
1388 # Generate header and source files from the machine description,
1389 # and compile them.
1391 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1392 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1393 insn-attr.h insn-attrtab.c
1395 # The following pair of rules has this effect:
1396 # genconfig is run only if the md has changed since genconfig was last run;
1397 # but the file insn-config.h is touched only when its contents actually change.
1399 # Each of the other insn-* files is handled by a similar pair of rules.
1401 # This causes an anomaly in the results of make -n
1402 # because insn-* is older than stamp-*
1403 # and thus make -n thinks that insn-* will be updated
1404 # and force recompilation of things that depend on it.
1405 # We use move-if-change precisely to avoid such recompilation.
1406 # But there is no way to teach make -n that it will be avoided.
1408 # Each of the insn-*.[ch] rules has a semicolon at the end,
1409 # for otherwise the system Make on SunOS 4.1 never tries
1410 # to recompile insn-*.o. To avoid problems and extra noise from
1411 # versions of make which don't like empty commands (nothing after the
1412 # trailing `;'), we call true for each.
1414 insn-config.h: stamp-config ; @true
1415 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1416 ./genconfig $(md_file) > tmp-config.h
1417 $(srcdir)/move-if-change tmp-config.h insn-config.h
1418 touch stamp-config
1420 insn-flags.h: stamp-flags ; @true
1421 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1422 ./genflags $(md_file) > tmp-flags.h
1423 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1424 touch stamp-flags
1426 insn-codes.h: stamp-codes ; @true
1427 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1428 ./gencodes $(md_file) > tmp-codes.h
1429 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1430 touch stamp-codes
1432 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1433 insn-config.h insn-flags.h insn-codes.h
1434 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1436 insn-emit.c: stamp-emit ; @true
1437 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1438 ./genemit $(md_file) > tmp-emit.c
1439 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1440 touch stamp-emit
1442 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1443 real.h output.h flags.h
1444 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1446 insn-recog.c: stamp-recog ; @true
1447 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1448 ./genrecog $(md_file) > tmp-recog.c
1449 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1450 touch stamp-recog
1452 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1453 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1454 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1456 insn-opinit.c: stamp-opinit ; @true
1457 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1458 ./genopinit $(md_file) > tmp-opinit.c
1459 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1460 touch stamp-opinit
1462 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1463 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1465 insn-extract.c: stamp-extract ; @true
1466 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1467 ./genextract $(md_file) > tmp-extract.c
1468 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1469 touch stamp-extract
1471 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1472 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1474 insn-peep.c: stamp-peep ; @true
1475 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1476 ./genpeep $(md_file) > tmp-peep.c
1477 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1478 touch stamp-peep
1480 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1481 insn-attr.h insn-config.h
1482 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1484 insn-attr.h: stamp-attr ; @true
1485 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1486 ./genattr $(md_file) > tmp-attr.h
1487 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1488 touch stamp-attr
1490 insn-attrtab.c: stamp-attrtab ; @true
1491 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1492 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1493 then \
1494 echo Using $(PREMADE_ATTRTAB); \
1495 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1496 else \
1497 ./genattrtab $(md_file) > tmp-attrtab.c; \
1499 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1500 touch stamp-attrtab
1502 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1503 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1504 insn-codes.h
1505 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1507 insn-output.c: stamp-output ; @true
1508 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1509 ./genoutput $(md_file) > tmp-output.c
1510 $(srcdir)/move-if-change tmp-output.c insn-output.c
1511 touch stamp-output
1513 # Compile the programs that generate insn-* from the machine description.
1514 # They are compiled with $(HOST_CC), and associated libraries,
1515 # since they need to run on this machine
1516 # even if GCC is being compiled to run on some other machine.
1518 # $(CONFIG_H) is omitted from the deps of the gen*.o
1519 # because these programs don't really depend on anything
1520 # about the target machine. They do depend on config.h itself,
1521 # since that describes the host machine.
1523 # Pass the md file through cpp if the target requests it.
1524 $(MD_FILE): $(MD_DEPS)
1525 rm -f $@
1526 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1527 mv tmp-$@ $@
1529 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1530 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1531 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1533 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1534 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1536 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1537 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1538 genflags.o $(HOST_RTL) $(HOST_LIBS)
1540 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1541 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1543 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1544 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1545 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1547 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1548 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1550 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1551 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1552 genemit.o $(HOST_RTL) $(HOST_LIBS)
1554 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1555 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1557 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1558 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1559 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1561 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1562 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1564 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1565 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1566 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1568 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1569 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1571 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1572 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1573 genextract.o $(HOST_RTL) $(HOST_LIBS)
1575 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1576 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1578 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1579 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1580 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1582 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1583 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1585 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1586 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1587 genattr.o $(HOST_RTL) $(HOST_LIBS)
1589 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1590 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1592 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1593 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1594 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1596 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
1597 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1599 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1600 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1601 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1603 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1604 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1606 # Compile the libraries to be used by gen*.
1607 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1608 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1609 # with the rules for rtl.o, alloca.o, etc.
1610 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1611 rm -f $(HOST_PREFIX)rtl.c
1612 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1613 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1615 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1616 rm -f $(HOST_PREFIX)print-rtl.c
1617 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1618 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1620 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1621 rm -f $(HOST_PREFIX)rtlanal.c
1622 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1623 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1625 $(HOST_PREFIX_1)alloca.o: alloca.c
1626 rm -f $(HOST_PREFIX)alloca.c
1627 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1628 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1630 $(HOST_PREFIX_1)obstack.o: obstack.c
1631 rm -f $(HOST_PREFIX)obstack.c
1632 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1633 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1635 $(HOST_PREFIX_1)malloc.o: malloc.c
1636 rm -f $(HOST_PREFIX)malloc.c
1637 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1638 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1640 # This satisfies the dependency that we get if you cross-compile a compiler
1641 # that does not need to compile alloca, malloc or whatever.
1642 $(HOST_PREFIX_1):
1643 touch $(HOST_PREFIX_1)
1645 # Remake bytecode files.
1646 BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1648 bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
1649 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1650 bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
1651 bc-opcode.h bc-typecd.h bc-typecd.def
1653 bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
1654 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1655 bi-arity.o $(BI_OBJ) $(HOST_LIBS)
1656 bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
1657 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1658 bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
1659 bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
1660 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1661 bi-opname.o $(BI_OBJ) $(HOST_LIBS)
1663 $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1664 $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
1665 cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
1667 bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
1668 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1669 $(srcdir)/bi-parser.c
1670 bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
1671 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1672 $(srcdir)/bi-lexer.c
1673 bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
1674 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1675 $(srcdir)/bi-arity.c
1676 bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
1677 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1678 $(srcdir)/bi-opcode.c
1679 bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
1680 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1681 $(srcdir)/bi-opname.c
1682 bi-reverse.o: bi-reverse.c bi-defs.h
1683 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1684 $(srcdir)/bi-reverse.c
1686 bc-arity.h: stamp-bcarity ; @true
1687 stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
1688 ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1689 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1690 touch stamp-bcarity
1692 bc-opcode.h: stamp-bcopcode ; @true
1693 stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
1694 ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1695 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1696 touch stamp-bcopcode
1698 bc-opname.h: stamp-bcopname ; @true
1699 stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
1700 ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1701 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1702 touch stamp-bcopname
1704 bytecode.mostlyclean:
1705 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1707 bytecode.distclean bytecode.clean: bytecode.mostlyclean
1708 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1710 bytecode.maintainer-clean: bytecode.clean
1711 -rm -f bi-parser.c bi-parser.h
1714 # Remake cpp and protoize.
1716 # Making the preprocessor
1717 cpp: $(CCCP)
1718 -rm -f cpp$(exeext)
1719 ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
1720 || cp $(CCCP)$(exeext) cpp$(exeext)
1721 cccp: cccp.o cexp.o version.o $(LIBDEPS)
1722 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1723 version.o $(LIBS)
1724 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1725 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1726 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1727 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1729 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1730 # The reason we use $(libdir)/g++-include rather than using libsubdir
1731 # is for compatibility with the current version of libg++.
1732 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1733 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1734 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1735 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1736 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1737 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1738 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1739 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1741 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1742 version.o $(LIBDEPS)
1743 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1744 cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
1746 cppmain.o: cppmain.c $(CONFIG_H) cpplib.h
1748 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1749 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1750 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1751 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1752 -DOLD_GPLUSPLUS_INCLUDE_DIR=\"$(old_gxx_include_dir)\" \
1753 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1754 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1755 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1756 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1758 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1760 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1762 cpphash.o: cpphash.c cpplib.h cpphash.h
1764 cppalloc.o: cppalloc.c $(CONFIG_H)
1766 # Note for the stamp targets, we run the program `true' instead of
1767 # having an empty command (nothing following the semicolon).
1769 proto: config.status protoize unprotoize SYSCALLS.c.X
1771 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
1772 pexecute.o choose-temp.o $(LIBDEPS)
1773 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1774 protoize.o getopt.o getopt1.o getpwd.o version.o \
1775 pexecute.o choose-temp.o $(LIBS)
1776 protoize.o: stamp-proto ; @true
1778 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1779 pexecute.o choose-temp.o $(LIBDEPS)
1780 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1781 unprotoize.o getopt.o getopt1.o getpwd.o version.o \
1782 pexecute.o choose-temp.o $(LIBS)
1783 unprotoize.o: stamp-proto ; @true
1785 stamp-proto: protoize.c getopt.h $(CONFIG_H)
1786 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1787 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1788 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1789 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1790 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1791 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1792 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1793 -DUNPROTOIZE $(srcdir)/protoize.c
1794 mv protoize$(objext) unprotoize$(objext)
1795 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1796 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1797 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1798 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1799 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1800 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1801 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1802 $(srcdir)/protoize.c
1803 touch stamp-proto
1805 getopt.o: getopt.c getopt.h
1806 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1807 getopt1.o: getopt1.c getopt.h
1808 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1810 # This info describes the target machine, so compile with GCC just built.
1811 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1812 stmp-int-hdrs
1813 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1814 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1815 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1816 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1817 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1820 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1821 -rm -f tmp-proto.[cso]
1822 cp $(srcdir)/protoize.c tmp-proto.c
1823 chmod u+w tmp-proto.c
1824 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1825 $(CFLAGS) $(INCLUDES) \
1826 -DGCC_INCLUDE_DIR=0 \
1827 -DGPLUSPLUS_INCLUDE_DIR=0 \
1828 -DCROSS_INCLUDE_DIR=0 \
1829 -DTOOL_INCLUDE_DIR=0 \
1830 -DSTD_PROTO_DIR=0" tmp-proto.c
1831 @echo '**********' Expect 400 lines of differences.
1832 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1833 -wc -l tmp-proto.diff
1834 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1835 $(CFLAGS) $(INCLUDES) \
1836 -DGCC_INCLUDE_DIR=0 \
1837 -DGPLUSPLUS_INCLUDE_DIR=0 \
1838 -DCROSS_INCLUDE_DIR=0 \
1839 -DTOOL_INCLUDE_DIR=0 \
1840 -DSTD_PROTO_DIR=0" tmp-proto.c
1841 @echo Expect zero differences.
1842 diff $(srcdir)/protoize.c tmp-proto.c | cat
1843 -rm -f tmp-proto.[cs] tmp-proto$(objext)
1845 gcov.o: gcov.c gcov-io.h
1847 gcov: gcov.o $(LIBDEPS)
1848 $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
1850 # Build the include directory. The stamp files are stmp-* rather than
1851 # stamp-* so that mostlyclean does not force the include directory to
1852 # be rebuilt.
1854 # Build the include directory except for float.h (which depends upon
1855 # enquire).
1856 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h objc-headers
1857 # Copy in the headers provided with gcc.
1858 # The sed command gets just the last file name component;
1859 # this is necessary because VPATH could add a dirname.
1860 # Using basename would be simpler, but some systems don't have it.
1861 for file in .. $(USER_H); do \
1862 if [ X$$file != X.. ]; then \
1863 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1864 rm -f include/$$realfile; \
1865 cp $$file include; \
1866 chmod a+r include/$$realfile; \
1867 fi; \
1868 done
1869 rm -f include/limits.h
1870 cp xlimits.h include/limits.h
1871 chmod a+r include/limits.h
1872 # Install the README
1873 rm -f include/README
1874 cp $(srcdir)/README-fixinc include/README
1875 chmod a+r include/README
1876 touch stmp-int-hdrs
1878 # Build the complete include directory.
1879 stmp-headers: stmp-int-hdrs gfloat.h
1880 rm -f include/float.h
1881 cp gfloat.h include/float.h
1882 chmod a+r include/float.h
1883 touch stmp-headers
1885 # Build fixed copies of system files.
1886 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1887 rm -rf include
1888 mkdir include
1889 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1890 then \
1891 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1892 if [ -d $$dir ]; \
1893 then \
1894 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1895 else true; fi; \
1896 done; \
1897 else true; \
1899 rm -f include/syslimits.h
1900 if [ -f include/limits.h ]; then \
1901 mv include/limits.h include/syslimits.h; \
1902 else \
1903 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1905 chmod a+r include/syslimits.h
1906 touch stmp-fixinc
1908 # copy objc header files into build directory
1909 objc-headers: stmp-fixinc
1910 if [ -d include ]; then true; else mkdir include; fi
1911 if [ -d objc ]; then true; else mkdir objc; fi
1912 thisdir1=`pwd`; \
1913 srcdir1=`cd $(srcdir); pwd`; \
1914 cd objc; \
1915 if [ -f $${srcdir1}/objc/Makefile ]; then \
1916 $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
1917 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1918 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
1919 GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include; \
1921 touch objc-headers
1923 # Files related to the fixproto script.
1925 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1926 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1927 export CC; \
1928 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1929 mv tmp-deduced.h deduced.h
1931 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1932 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1933 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1935 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1936 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1938 scan.o: scan.c scan.h $(build_xm_file)
1939 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1941 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1942 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1943 mv tmp-fixtmp.c fixtmp.c
1944 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1945 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1946 | ./gen-protos >xsys-protos.hT
1947 mv xsys-protos.hT xsys-protos.h
1948 rm -rf fixtmp.c
1950 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1951 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1952 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1953 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1954 cppexp.o $(HOST_LIBS)
1956 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1957 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1959 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1960 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1962 # stmp-fixproto depends on this, not on fix-header directly.
1963 # The idea is to make sure fix-header gets built,
1964 # but not rerun fixproto after each stage
1965 # just because fix-header's mtime has changed.
1966 fixhdr.ready: fix-header
1967 -if [ -f fixhdr.ready ] ; then \
1968 true; \
1969 else \
1970 touch fixhdr.ready; \
1973 # stmp-headers is to make sure fixincludes has already finished.
1974 # The if statement is so that we don't run fixproto a second time
1975 # if it has already been run on the files in `include'.
1976 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1977 @echo "Various warnings and error messages from fixproto are normal"
1978 -if [ -d include ] ; then true; else mkdir include; fi
1979 -if [ -f include/fixed ] ; then true; \
1980 else \
1981 : This line works around a 'make' bug in BSDI 1.1.; \
1982 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1983 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1984 touch include/fixed; \
1986 touch stmp-fixproto
1988 # Remake the info files.
1990 doc: info
1991 info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
1993 $(srcdir)/cpp.info: cpp.texi
1994 cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) cpp.texi
1996 $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
1997 md.texi rtl.texi tm.texi gcov.texi
1998 cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) gcc.texi
2000 dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
2002 # This works with GNU Make's default rule.
2003 $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
2004 md.texi rtl.texi tm.texi gcov.texi
2005 $(TEXI2DVI) $<
2007 # This works with GNU Make's default rule.
2008 $(srcdir)/cpp.dvi: cpp.texi
2009 $(TEXI2DVI) $<
2011 $(srcdir)/INSTALL: install1.texi install.texi
2012 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
2013 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
2015 # Deletion of files made during compilation.
2016 # There are four levels of this:
2017 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2018 # `mostlyclean' is useful while working on a particular type of machine.
2019 # It deletes most, but not all, of the files made by compilation.
2020 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2021 # `clean' deletes everything made by running `make all'.
2022 # `distclean' also deletes the files made by config.
2023 # `maintainer-clean' also deletes everything that could be regenerated
2024 # automatically. We remove as much from the language subdirectories as we can
2025 # (less duplicated code).
2028 mostlyclean: bytecode.mostlyclean lang.mostlyclean
2029 -rm -f $(STAGESTUFF)
2030 # Clean the objc subdir if we created one.
2031 if [ -d objc ]; then \
2032 srcdir1=`cd $(srcdir); pwd`; \
2033 cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
2034 else true; fi
2035 -rm -f libobjc.a
2036 # Delete the temporary source copies for cross compilation.
2037 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
2038 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
2039 -rm -f $(HOST_PREFIX_1)obstack.c
2040 # Delete the temp files made in the course of building libgcc.a.
2041 -rm -f tmplibgcc* tmpcopy xlimits.h
2042 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
2043 # Delete other temporary files.
2044 -rm -f tmp-float.h tmp-gcc.xtar.gz
2045 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
2046 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
2047 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
2048 -rm -f tmp-fixtmp.c xsys-protos.hT
2049 # Delete the stamp files.
2050 -rm -f stamp-* tmp-*
2051 -rm -f */stamp-* */tmp-*
2052 # Delete debugging dump files.
2053 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
2054 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
2055 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
2056 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
2057 -rm -f */*.sched2 */*.stack
2058 # Delete some files made during installation.
2059 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
2060 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2061 # Delete files generated for fixproto
2062 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2063 gen-protos fixproto.list fixtmp.* fixhdr.ready
2064 # Delete unwanted output files from TeX.
2065 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
2066 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
2067 # Delete sorted indices we don't actually use.
2068 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2069 # Delete core dumps.
2070 -rm -f core */core
2071 -rm -f *.bp */*.bp
2073 # Delete all files made by compilation
2074 # that don't exist in the distribution.
2075 clean: mostlyclean bytecode.clean lang.clean
2076 # It may not be quite desirable to delete unprotoize.c here,
2077 # but the spec for `make clean' requires it.
2078 # Using unprotoize.c is not quite right in the first place,
2079 # but what better way is there?
2080 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2081 -rm -f libgcc1.null
2082 -rm -f *.dvi
2083 -rm -f */*.dvi
2084 -if [ -f md.pre-cpp ]; then \
2085 rm -f md ; \
2087 # Delete the include directory.
2088 -rm -rf stmp-* include objc-headers
2089 -rm -f */stmp-*
2090 # Delete files used by the "multilib" facility (including libgcc subdirs).
2091 -rm -f multilib.h tmpmultilib*
2092 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
2093 rm -rf $(MULTILIB_DIRNAMES); \
2094 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
2095 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2096 fi ; fi
2098 # Delete all files that users would normally create
2099 # while building and installing GCC.
2100 distclean: clean bytecode.distclean lang.distclean
2101 -rm -f tm.h config.h tconfig.h hconfig.h md
2102 -rm -f config.status config.run config.cache
2103 -rm -f Make-host Make-target Make-lang Make-hooks
2104 -rm -f Makefile specs.h options.h *.oaux
2105 -rm -fr stage1 stage2 stage3 stage4
2106 -rm -f */stage1 */stage2 */stage3 */stage4 */include
2107 -rm -f objc-parse.output
2108 -rm -f c-parse.output
2109 -rm -f *.asm
2110 -rm -f float.h
2112 # Delete anything likely to be found in the source directory
2113 # that shouldn't be in the distribution.
2114 extraclean: distclean lang.extraclean
2115 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
2116 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
2117 -rm -f config/*/=* config/*/"#"* config/*/*~*
2118 -rm -f config/*/*.orig config/*/*.rej
2119 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
2120 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
2121 -rm -f *lose config/*lose config/*/*lose
2122 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
2123 -rm -f */=* */"#"* */*~*
2124 -rm -f */patch* */*.orig */*.rej
2125 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
2126 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
2127 -rm -f */*lose */*.s */*.s[0-9] */*.i
2129 # Get rid of every file that's generated from some other file.
2130 # Most of these files ARE PRESENT in the GCC distribution.
2131 maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean
2132 -rm -f c-parse.y c-gperf.h objc-parse.y
2133 -rm -f objc-parse.c objc-parse.output
2134 -rm -f c-parse.c c-parse.h c-parse.output
2135 -rm -f cexp.c cexp.output TAGS
2136 -rm -f cpp.info* cpp.??s cpp.*aux
2137 -rm -f gcc.info* gcc.??s gcc.*aux
2138 -rm -f configure
2140 # Entry points `install' and `uninstall'.
2141 # Also use `install-collect2' to install collect2 when the config files don't.
2143 # The semicolon is to prevent the install.sh -> install default rule
2144 # from doing anything. Having it run true helps avoid problems and
2145 # noise from versions of make which don't like to have null commands.
2146 install: $(INSTALL_TARGET) ; @true
2148 # Copy the compiler files into directories where they will be run.
2149 # Install the driver last so that the window when things are
2150 # broken is small.
2151 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2152 install-libobjc install-man install-info lang.install-normal install-driver
2154 # Do nothing while making gcc with a cross-compiler. The person who
2155 # makes gcc for the target machine has to know how to put a complete
2156 # gcc together by hand.
2157 install-build: force
2158 @echo You have to install gcc on your target machine by hand.
2160 # Run this on the target machine
2161 # to finish installation of cross compiler.
2162 install-cross-rest: install-float-h-cross
2164 # Install float.h for cross compiler.
2165 # Run this on the target machine!
2166 install-float-h-cross: installdirs
2167 # if [ -f enquire ] ; then true; else false; fi
2168 # Note: don't use -. We should fail right away if enquire was not made.
2169 ./enquire -f > $(tmpdir)/float.h
2170 -rm -f $(libsubdir)/include/float.h
2171 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2172 -rm -f $(tmpdir)/float.h
2173 chmod a-x $(libsubdir)/include/float.h
2175 # Create the installation directories.
2176 installdirs:
2177 -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
2178 -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
2179 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2180 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2181 # This dir isn't currently searched by cpp.
2182 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2183 -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
2184 -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
2185 -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
2186 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2187 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2188 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2189 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2190 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2191 # We don't use mkdir -p to create the parents of mandir,
2192 # because some systems don't support it.
2193 # Instead, we use this technique to create the immediate parent of mandir.
2194 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2195 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2196 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2198 # Install the compiler executables built during cross compilation.
2199 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
2200 for file in $(COMPILERS); do \
2201 if [ -f $$file ] ; then \
2202 rm -f $(libsubdir)/$$file; \
2203 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2204 else true; \
2205 fi; \
2206 done
2207 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2208 if [ x"$$file" != x.. ]; then \
2209 rm -f $(libsubdir)/$$file; \
2210 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2211 else true; fi; \
2212 done
2213 for file in $(EXTRA_PARTS) ..; do \
2214 if [ x"$$file" != x.. ]; then \
2215 rm -f $(libsubdir)/$$file; \
2216 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2217 else true; fi; \
2218 done
2219 # Don't mess with specs if it doesn't exist yet.
2220 -if [ -f specs ] ; then \
2221 rm -f $(libsubdir)/specs; \
2222 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2224 # Install protoize if it was compiled.
2225 -if [ -f protoize$(exeext) ]; \
2226 then \
2227 rm -f $(bindir)/protoize$(exeext); \
2228 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2229 rm -f $(bindir)/unprotoize$(exeext); \
2230 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2231 rm -f $(libsubdir)/SYSCALLS.c.X; \
2232 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2233 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2235 -rm -f $(libsubdir)/cpp$(exeext)
2236 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2237 # Install gcov if it was compiled.
2238 -if [ -f gcov$(exeext) ]; \
2239 then \
2240 rm -f $(bindir)/gcov$(exeext); \
2241 $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
2242 chmod a+x $(bindir)/gcov$(exeext); \
2245 # Install the driver program as $(target_alias)-gcc
2246 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2247 install-driver: xgcc
2248 -if [ -f gcc-cross$(exeext) ] ; then \
2249 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2250 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2251 if [ -d $(tooldir)/bin/. ] ; then \
2252 rm -f $(tooldir)/bin/gcc$(exeext); \
2253 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2254 else true; fi; \
2255 else \
2256 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2257 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2258 rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \
2259 ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext) \
2260 > /dev/null 2>&1 \
2261 || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \
2262 mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \
2265 # Install the info files.
2266 install-info: doc installdirs lang.install-info
2267 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2268 cd $(srcdir); for f in cpp.info* gcc.info*; \
2269 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
2270 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2272 # Install the man pages.
2273 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2274 -if [ -f gcc-cross ] ; then \
2275 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2276 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2277 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2278 else \
2279 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2280 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2281 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2283 -rm -f $(mandir)/cccp$(manext)
2284 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2285 -chmod a-x $(mandir)/cccp$(manext)
2287 # Install the library.
2288 install-libgcc: libgcc.a installdirs
2289 -if [ -f libgcc.a ] ; then \
2290 rm -f $(libsubdir)/libgcc.a; \
2291 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2292 if $(RANLIB_TEST) ; then \
2293 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2294 chmod a-x $(libsubdir)/libgcc.a; \
2295 else true; fi
2297 # Install multiple versions of libgcc.a.
2298 install-multilib: stmp-multilib installdirs
2299 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2300 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2301 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2302 for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \
2303 rm -f $(libsubdir)/$${dir}/$${f}; \
2304 $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
2305 done; \
2306 if $(RANLIB_TEST); then \
2307 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2308 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2309 done
2311 # Install the objc run time library.
2312 install-libobjc: installdirs
2313 -if [ -f libobjc.a ] ; then \
2314 rm -f $(libsubdir)/libobjc.a; \
2315 $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
2316 if $(RANLIB_TEST) ; then \
2317 (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
2318 chmod a-x $(libsubdir)/libobjc.a; \
2319 else true; fi
2321 # Install all the header files built in the include subdirectory.
2322 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
2323 # Fix symlinks to absolute paths in the installed include directory to
2324 # point to the installed directory, not the build directory.
2325 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2326 if [ $$? -eq 0 ]; then \
2327 dir=`cd include; pwd`; \
2328 for i in $$files; do \
2329 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2330 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2331 rm -f $(libsubdir)/include/$$i; \
2332 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2333 fi; \
2334 done; \
2337 # Create or recreate the gcc private include file directory.
2338 install-include-dir: installdirs
2339 -rm -rf $(libsubdir)/include
2340 mkdir $(libsubdir)/include
2341 -chmod a+rx $(libsubdir)/include
2343 # Install the include directory using tar.
2344 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2345 (cd include; \
2346 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2347 # /bin/sh on some systems returns the status of the first tar,
2348 # and that can lose with GNU tar which always writes a full block.
2349 # So use `exit 0' to ignore its exit status.
2351 # Install the include directory using cpio.
2352 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2353 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2355 # Put assert.h where it won't override GNU libc's assert.h.
2356 # It goes in a dir that is searched after GNU libc's headers;
2357 # thus, the following conditionals are no longer needed.
2358 # But it's not worth deleting them now.
2359 ## Don't replace the assert.h already there if it is not from GCC.
2360 ## This code would be simpler if it tested for -f ... && ! grep ...
2361 ## but supposedly the ! operator is missing in sh on some systems.
2362 install-assert-h: assert.h installdirs
2363 if [ -f $(assertdir)/assert.h ]; \
2364 then \
2365 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2366 then \
2367 rm -f $(assertdir)/assert.h; \
2368 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2369 chmod a-x $(assertdir)/assert.h; \
2370 else true; \
2371 fi; \
2372 else \
2373 rm -f $(assertdir)/assert.h; \
2374 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2375 chmod a-x $(assertdir)/assert.h; \
2378 # Use this target to install the program `collect2' under the name `ld'.
2379 install-collect2: collect2 installdirs
2380 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2381 # Install the driver program as $(libsubdir)/gcc for collect2.
2382 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2384 # Cancel installation by deleting the installed files.
2385 uninstall: lang.uninstall
2386 -rm -rf $(libsubdir)
2387 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2388 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2389 -rm -rf $(bindir)/protoize$(exeext)
2390 -rm -rf $(bindir)/unprotoize$(exeext)
2391 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2392 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2393 -rm -rf $(mandir)/cccp$(manext)
2394 -rm -rf $(mandir)/protoize$(manext)
2395 -rm -rf $(mandir)/unprotoize$(manext)
2397 # These exist for maintenance purposes.
2399 # Update the tags table.
2400 TAGS: force
2401 cd $(srcdir); \
2402 mkdir temp; \
2403 mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
2404 etags *.y *.h *.c; \
2405 mv temp/* .; \
2406 rmdir temp
2408 # Create the distribution tar file.
2409 #dist: gcc-$(version).tar.gz
2410 dist: gcc.xtar.gz
2412 gcc.xtar.gz: gcc.xtar
2413 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2414 mv tmp-gcc.xtar.gz gcc.xtar.gz
2416 #gcc-$(version).tar.gz: gcc-$(version).tar
2417 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2419 #gcc-$(version).tar:
2420 gcc.xtar: distdir
2421 # Make the distribution.
2422 tar -chf gcc.xtar gcc-$(version)
2424 # This target exists to do the initial work before the language specific
2425 # stuff gets done.
2426 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2427 $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2428 $(srcdir)/cexp.c
2429 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2430 then true; \
2431 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2433 # Update the version number in README
2434 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2435 { $$6 = version; print $$0 } \
2436 $$1 " " $$2 " " $$3 != "This directory contains"' \
2437 version=$(version) README > tmp.README
2438 mv tmp.README README
2439 -rm -rf gcc-$(version) tmp
2440 # Put all the files in a temporary subdirectory
2441 # which has the name that we want to have in the tar file.
2442 mkdir tmp
2443 mkdir tmp/config
2444 mkdir tmp/ginclude
2445 mkdir tmp/objc
2446 for file in *[0-9a-zA-Z+]; do \
2447 ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
2448 done
2449 cd config; \
2450 for file in *[0-9a-zA-Z+]; do \
2451 if test -d $$file && test "$$file" != RCS; then \
2452 mkdir ../tmp/config/$$file; \
2453 cd $$file; \
2454 for subfile in *[0-9a-zA-Z+]; do \
2455 ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
2456 || cp $$subfile ../../tmp/config/$$file; \
2457 done; \
2458 cd ..; \
2459 else \
2460 ln $$file ../tmp/config >/dev/null 2>&1 \
2461 || cp $$file ../tmp/config; \
2462 fi; \
2463 done
2464 cd ginclude; \
2465 for file in *[0-9a-zA-Z+]; do \
2466 ln $$file ../tmp/ginclude >/dev/null 2>&1 \
2467 || cp $$file ../tmp/ginclude; \
2468 done
2469 cd objc; \
2470 for file in *[0-9a-zA-Z+]; do \
2471 ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
2472 done
2473 ln .gdbinit tmp
2475 # Finish making `distdir', after the languages have done their thing.
2476 distdir-finish:
2477 mv tmp gcc-$(version)
2478 # Get rid of everything we don't want in the distribution. We'd want
2479 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2480 # expanded.
2481 cd gcc-$(version); make extraclean
2483 distdir: distdir-start lang.distdir distdir-finish
2485 # make diff oldversion=M.N
2486 # creates a diff file between an older distribution and this one.
2487 # The -P option assumes this is GNU diff.
2488 diff:
2489 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2490 -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2491 -x TAGS \
2492 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2493 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2494 $(LANG_DIFF_EXCLUDES) \
2495 gcc-$(oldversion) gcc-$(version) > diffs
2497 bootstrap: force
2498 # Only build the C compiler for stage1, because that is the only one that
2499 # we can guarantee will build with the native compiler, and also it is the
2500 # only thing useful for building stage2.
2501 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
2502 $(MAKE) stage1
2503 # This used to define ALLOCA as empty, but that would lead to bad results
2504 # for a subsequent `make install' since that would not have ALLOCA empty.
2505 # To prevent `make install' from compiling alloca.o and then relinking cc1
2506 # because alloca.o is newer, we permit these recursive makes to compile
2507 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2508 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2509 $(MAKE) stage2
2510 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2512 bootstrap2: force
2513 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2514 $(MAKE) stage2
2515 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2517 bootstrap3: force
2518 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2520 # Compare the object files in the current directory with those in the
2521 # stage2 directory.
2523 # ./ avoids bug in some versions of tail.
2524 compare: force
2525 for file in *$(objext); do \
2526 tail +16c ./$$file > tmp-foo1; \
2527 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
2528 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2529 done
2530 for dir in tmp-foo $(SUBDIRS); do \
2531 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2532 for file in $$dir/*$(objext); do \
2533 tail +16c ./$$file > tmp-foo1; \
2534 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
2535 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2536 done; \
2537 fi; \
2538 done
2539 -rm -f tmp-foo*
2541 # Similar, but compare with stage3 directory
2542 compare3: force
2543 for file in *$(objext); do \
2544 tail +16c ./$$file > tmp-foo1; \
2545 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2546 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2547 done
2548 for dir in tmp-foo $(SUBDIRS); do \
2549 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2550 for file in $$dir/*$(objext); do \
2551 tail +16c ./$$file > tmp-foo1; \
2552 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2553 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
2554 done; \
2555 fi; \
2556 done
2557 -rm -f tmp-foo*
2559 # Compare the object files in the current directory with those in the
2560 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2561 # running tail and the overhead of twice copying each object file.
2563 gnucompare: force
2564 for file in *$(objext); do \
2565 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2566 done
2567 for dir in tmp-foo $(SUBDIRS); do \
2568 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2569 for file in $$dir/*$(objext); do \
2570 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2571 done; \
2572 fi; \
2573 done
2575 # Similar, but compare with stage3 directory
2576 gnucompare3: force
2577 for file in *$(objext); do \
2578 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2579 done
2580 for dir in tmp-foo $(SUBDIRS); do \
2581 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2582 for file in $$dir/*$(objext); do \
2583 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2584 done; \
2585 fi; \
2586 done
2588 # Copy the object files from a particular stage into a subdirectory.
2589 stage1-start:
2590 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2591 -for dir in . $(SUBDIRS) ; \
2592 do \
2593 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2594 done
2595 -mv $(STAGESTUFF) stage1
2596 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2597 # dir will work properly.
2598 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
2599 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
2600 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
2601 -rm -f stage1/libgcc.a
2602 -cp libgcc.a stage1
2603 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2604 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2605 cp stage1/$${f} . ; \
2606 fi; done
2607 stage1: force stage1-start lang.stage1
2609 stage2-start:
2610 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2611 -for dir in . $(SUBDIRS) ; \
2612 do \
2613 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2614 done
2615 -mv $(STAGESTUFF) stage2
2616 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2617 # dir will work properly.
2618 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
2619 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
2620 -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
2621 -rm -f stage2/libgcc.a
2622 -cp libgcc.a stage2
2623 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2624 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2625 cp stage2/$${f} . ; \
2626 fi; done
2627 stage2: force stage2-start lang.stage2
2629 stage3-start:
2630 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2631 -for dir in . $(SUBDIRS) ; \
2632 do \
2633 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2634 done
2635 -mv $(STAGESTUFF) stage3
2636 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2637 # dir will work properly.
2638 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
2639 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
2640 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
2641 -rm -f stage3/libgcc.a
2642 -cp libgcc.a stage3
2643 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2644 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2645 cp stage3/$${f} . ; \
2646 fi; done
2647 stage3: force stage3-start lang.stage3
2649 stage4-start:
2650 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2651 -for dir in . $(SUBDIRS) ; \
2652 do \
2653 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2654 done
2655 -mv $(STAGESTUFF) stage4
2656 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2657 # dir will work properly.
2658 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
2659 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
2660 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
2661 -rm -f stage4/libgcc.a
2662 -cp libgcc.a stage4
2663 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2664 -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
2665 cp stage4/$${f} . ; \
2666 fi; done
2667 stage4: force stage4-start lang.stage4
2669 # Copy just the executable files from a particular stage into a subdirectory,
2670 # and delete the object files. Use this if you're just verifying a version
2671 # that is pretty sure to work, and you are short of disk space.
2672 risky-stage1: stage1
2673 - make clean
2675 risky-stage2: stage2
2676 -make clean
2678 risky-stage3: stage3
2679 -make clean
2681 risky-stage4: stage4
2682 -make clean
2684 #In GNU Make, ignore whether `stage*' exists.
2685 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2686 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2688 force: