1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-97, 1998 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)
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
29 # Directory where sources are, from where we are.
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.
40 # Selection of languages to be made.
41 # This is overridden by configure.
42 LANGUAGES
= c proto gcov @all_languages@
44 # Selection of languages to be made during stage1 build.
45 # This is overridden by configure.
46 BOOT_LANGUAGES
= c @all_boot_languages@
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.
61 BOOT_CFLAGS
= -O
$(CFLAGS
)
62 # These exists to be overridden by the x-* and t-* files, respectively.
80 # on sysV, define this as cp.
82 # These permit overriding just for certain files.
83 INSTALL_PROGRAM
= $(INSTALL
)
84 INSTALL_DATA
= $(INSTALL
)
88 # For GNUmake: let us decide what gets passed to recursive makes.
92 # Define this as & to perform parallel make on a Sequent.
93 # Note that this has some bugs, and it seems currently necessary
94 # to compile all the gen* files first by hand to avoid erroneous results.
97 # How to invoke ranlib.
99 # Test to use to see whether ranlib exists on the system.
100 RANLIB_TEST
= [ -f
/usr
/bin
/ranlib
-o
-f
/bin
/ranlib
]
102 # Compiler to use for compiling libgcc1.a.
103 # OLDCC should not be the GNU C compiler,
104 # since that would compile typical libgcc1.a functions such as mulsi3
105 # into infinite recursions.
108 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
109 # NOTE: -O does not work on some Unix systems!
112 # Version of ar to use when compiling libgcc1.a.
116 # Target to use when installing include directory. Either
117 # install-headers-tar or install-headers-cpio.
118 INSTALL_HEADERS_DIR
= @build_install_headers_dir@
120 # Header files that are made available under the same name
121 # to programs compiled with GCC.
122 USER_H
= $(srcdir)/ginclude
/stdarg.h
$(srcdir)/ginclude
/stddef.h \
123 $(srcdir)/ginclude
/varargs.h
$(srcdir)/ginclude
/va-alpha.h \
124 $(srcdir)/ginclude
/va-h8300.h
$(srcdir)/ginclude
/va-i860.h \
125 $(srcdir)/ginclude
/va-i960.h
$(srcdir)/ginclude
/va-mips.h \
126 $(srcdir)/ginclude
/va-m88k.h
$(srcdir)/ginclude
/va-mn10200.h \
127 $(srcdir)/ginclude
/va-mn10300.h
$(srcdir)/ginclude
/va-pa.h \
128 $(srcdir)/ginclude
/va-pyr.h
$(srcdir)/ginclude
/va-sparc.h \
129 $(srcdir)/ginclude
/va-clipper.h
$(srcdir)/ginclude
/va-spur.h \
130 $(srcdir)/ginclude
/va-m32r.h
$(srcdir)/ginclude
/va-sh.h \
131 $(srcdir)/ginclude
/va-v850.h
$(srcdir)/ginclude
/va-arc.h \
132 $(srcdir)/ginclude
/iso646.h
$(srcdir)/ginclude
/va-ppc.h \
133 $(srcdir)/ginclude
/proto.h
$(EXTRA_HEADERS
) \
134 $(LANG_EXTRA_HEADERS
)
136 # Target to use whe installing assert.h. Some systems may
137 # want to set this empty.
138 INSTALL_ASSERT_H
= install-assert-h
140 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
141 # Usually the one we just built.
142 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
143 GCC_FOR_TARGET
= .
/xgcc
-B.
/
145 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
146 # It omits XCFLAGS, and specifies -B./.
147 # It also specifies -I./include to find, e.g., stddef.h.
148 GCC_CFLAGS
=$(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) -I.
/include $(TCFLAGS
)
150 # Special flags for compiling enquire.
151 # We disable optimization to make floating point more reliable.
152 ENQUIRE_CFLAGS
= -DNO_MEM
-DNO_LONG_DOUBLE_IO
-O0
153 ENQUIRE_LDFLAGS
= $(LDFLAGS
)
155 # Sed command to transform gcc to installed name. Overwritten by configure.
156 program_transform_name
= -e s
,x
,x
,
157 program_transform_cross_name
= -e s
,^
,$(target_alias
)-,
159 # Tools to use when building a cross-compiler.
160 # These are used because `configure' appends `cross-make'
161 # to the makefile when making a cross-compiler.
163 TARGET_TOOLPREFIX
= $(tooldir
)/bin
/
164 AR_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ar
165 AR_FOR_TARGET_FLAGS
= rc
166 RANLIB_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ranlib
167 RANLIB_TEST_FOR_TARGET
= [ -f
$(TARGET_TOOLPREFIX
)ranlib
]
169 # Dir to search for system headers. Overridden by cross-make.
170 SYSTEM_HEADER_DIR
= /usr
/include
172 # Control whether to run fixproto.
173 STMP_FIXPROTO
= stmp-fixproto
175 # Test to see whether <float.h> exists in the system header files,
176 # and is not derived from GCC.
178 [ -f
$(SYSTEM_HEADER_DIR
)/float.h
] && \
179 if grep
'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR
)/float.h
>/dev
/null
; \
183 # Test to see whether <limits.h> exists in the system header files.
184 LIMITS_H_TEST
= [ -f
$(SYSTEM_HEADER_DIR
)/limits.h
]
186 # There may be a premade insn-attrtab.c for this machine.
187 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
188 # PREMADE_ATTRTAB is the file name of the file to use.
189 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
190 PREMADE_ATTRTAB_MD
= Makefile
# Guaranteed not to cmp equal to md.
194 target_alias
=@target_alias@
195 xmake_file
=@dep_host_xmake_file@
196 tmake_file
=@dep_tmake_file@
197 out_file
=$(srcdir)/config
/@out_file@
198 out_object_file
=@out_object_file@
199 md_file
=$(srcdir)/config
/@md_file@
200 tm_file
=@tm_file_list@
201 build_xm_file
=@build_xm_file_list@
202 host_xm_file
=@host_xm_file_list@
203 lang_specs_files
=@lang_specs_files@
204 lang_options_files
=@lang_options_files@
205 GCC_THREAD_FILE
=@thread_file@
207 mainversion
=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
209 # Common prefix for installation directories.
210 # NOTE: This directory must exist when you start installation.
212 # Directory in which to put localized header files. On the systems with
213 # gcc as the native cc, `local_prefix' may not be `prefix' which is
215 # NOTE: local_prefix *should not* default from prefix.
216 local_prefix
= @local_prefix@
217 # Directory in which to put host dependent programs and libraries
218 exec_prefix = @
exec_prefix@
219 # Directory in which to put the executable for the command `gcc'
221 # Directory in which to put the directories used by the compiler.
223 # Directory in which the compiler finds executables, libraries, etc.
224 libsubdir
= $(libdir)/gcc-lib
/$(target_alias
)/$(version
)
225 # Directory in which the compiler finds g++ includes.
226 gxx_include_dir
= @gxx_include_dir@
227 # Directory in which the old g++ header files may be found.
228 # The reason we use $(libdir)/g++-include rather than using libsubdir
229 # is for compatibility with older versions of libg++.
230 old_gxx_include_dir
= $(libdir)/g
++-include
231 # Directory to search for site-specific includes.
232 includedir = $(local_prefix
)/include
233 # assertdir is overridden in cross-make.
234 # (But this currently agrees with what is in cross-make.)
235 assertdir
= $(tooldir
)/include
236 # where the info files go
238 # where the locale files go
239 datadir = $(prefix)/@DATADIRNAME@
240 localedir
= $(datadir)/locale
241 # Extension (if any) to put in installed man-page filename.
244 exeext
= @build_exeext@
246 # Directory in which to put man pages.
247 mandir = @
mandir@
/man1
248 # Directory in which to find other cross-compilation tools and headers.
249 # Used in install-cross.
250 tooldir
= $(exec_prefix)/$(target_alias
)
251 # Dir for temp files.
254 # Top build directory, relative to here.
257 # Whether we were configured with NLS.
260 # Internationalization library.
261 INTLLIBS
= @INTLLIBS@
263 # List of internationalization subdirectories.
265 INTL_SUBDIRS
= intl
$(POSUB
)
267 # Additional system libraries to link with.
270 # Change this to a null string if obstacks are installed in the
274 # Specify the rule for actually making libgcc.a,
276 # and the rule for installing it.
277 INSTALL_LIBGCC
= install-libgcc
279 # Specify the rule for actually making libgcc1.a.
280 # The value may be empty; that means to do absolutely nothing
281 # with or for libgcc1.a.
284 # Specify the rule for making libgcc1.a for a cross-compiler.
285 # The default rule assumes that libgcc1.a is supplied by the user.
286 CROSS_LIBGCC1
= libgcc1.cross
288 # Specify the rule for actually making libgcc2.a.
291 # Options to use when compiling libgcc2.a.
292 # -g1 causes output of debug info only for file-scope entities.
293 # we use this here because that should be enough, and also
294 # so that -g1 will be tested.
295 LIBGCC2_DEBUG_CFLAGS
= -g1
296 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) $(TARGET_LIBGCC2_CFLAGS
) $(LIBGCC2_DEBUG_CFLAGS
) -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED
-fexceptions
298 # Additional options to use when compiling libgcc2.a.
299 # Some targets override this to -Iinclude
302 # Additional target-dependent options for compiling libgcc2.a.
303 TARGET_LIBGCC2_CFLAGS
=
305 # Things which must be built before building libgcc2.a.
306 # Some targets override this to stmp-int-hdrs
309 # Enquire target (This is a variable so that a target can choose not to
313 # libgcc1-test target (must also be overridable for a target)
314 LIBGCC1_TEST
= libgcc1-test
316 # List of extra executables that should be compiled for this target machine
317 # that are used for compiling from source code to object code.
318 # The rules for compiling them should be in the t-* file for the machine.
319 EXTRA_PASSES
=@extra_passes@
321 # Like EXTRA_PASSES, but these are used when linking.
322 EXTRA_PROGRAMS
= @extra_programs@
324 # List of extra object files that should be compiled for this target machine.
325 # The rules for compiling them should be in the t-* file for the machine.
326 EXTRA_PARTS
= @extra_parts@
328 # List of extra object files that should be compiled and linked with
329 # compiler proper (cc1, cc1obj, cc1plus).
330 EXTRA_OBJS
= @extra_objs@
332 # List of extra object files that should be compiled and linked with
334 EXTRA_GCC_OBJS
=@host_extra_gcc_objs@
336 # List of additional header files to install.
337 # Often this is edited directly by `configure'.
338 EXTRA_HEADERS
=@extra_headers_list@
340 # Set this to `ld' to enable use of collect2.
341 USE_COLLECT2
= @will_use_collect2@
342 MAYBE_USE_COLLECT2
= @maybe_use_collect2@
343 # It is convenient for configure to add the assignment at the beginning,
344 # so don't override it here.
346 # List of extra C and assembler files to add to libgcc1.a.
347 # Assembler files should have names ending in `.asm'.
350 # List of extra C and assembler files to add to libgcc2.a.
351 # Assembler files should have names ending in `.asm'.
354 # Default float.h source to use for cross-compiler.
355 # This is overridden by configure.
356 CROSS_FLOAT_H
=$(srcdir)/config
/float-@float_format@.h
358 # Program to convert libraries.
361 # Control whether header files are installed.
362 INSTALL_HEADERS
=install-headers
364 # Options for tar when copying trees. So HPUX can override it.
367 # Select which version of fixincludes to use (I.E. regular versus SVR4)
368 # This value is overridden directly by configure.
369 FIXINCLUDES
= @fixincludes@
371 # Set to ChangeLog if we are in a CVS working directory. This lets
372 # us automatically build version.c.
373 VERSION_DEP
= @version_dep@
375 # Additional directories of header files to run fixincludes on.
376 # These should be directories searched automatically by default
377 # just as /usr/include is.
378 # *Do not* use this for directories that happen to contain
379 # header files, but are not searched automatically by default.
380 # On most systems, this is empty.
381 OTHER_FIXINCLUDES_DIRS
=
383 # A list of all the language-specific executables.
384 # This is overridden by configure.
385 COMPILERS
= cc1
$(exeext
) @all_compilers@
387 # List of things which should already be built whenever we try to use xgcc
388 # to compile anything (without linking).
389 GCC_PASSES
=xgcc cc1
cpp $(EXTRA_PASSES
)
391 # List of things which should already be built whenever we try to use xgcc
393 GCC_PARTS
=$(GCC_PASSES
) $(LIBGCC
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
395 # Directory to link to, when using the target `maketest'.
398 # Guaranteed to not exist when not passing md through cpp.
399 # This value is overridden directly by configure.
400 MD_FILE
= md-cpp-not-used
402 # Flags to use when cross-building GCC.
403 # Prefix to apply to names of object files when using them
404 # to run on the machine we are compiling on.
406 # Prefix to apply to names of object files when compiling them
407 # to run on the machine we are compiling on.
408 # The default for this variable is chosen to keep these rules
409 # out of the way of the other rules for compiling the same source files.
412 HOST_CFLAGS
=$(ALL_CFLAGS
)
414 HOST_INTLLIBS
=$(INTLLIBS
)
415 HOST_LDFLAGS
=$(LDFLAGS
)
416 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
417 HOST_ALLOCA
=$(ALLOCA
)
418 HOST_MALLOC
=$(MALLOC
)
419 HOST_OBSTACK
=$(OBSTACK
)
421 # Actual name to use when installing a native compiler.
422 GCC_INSTALL_NAME
= `t='$(program_transform_name)'; echo gcc | sed $$t`
424 # Actual name to use when installing a cross-compiler.
425 GCC_CROSS_NAME
= `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
427 # Choose the real default target.
430 # Choose the real install target.
431 INSTALL_TARGET
=install-normal
433 # Source for float.h. Overridden by cross-make.
436 # Extra symbols for fixproto to define when parsing headers.
439 # Extra flags to use when compiling crt{begin,end}.o.
442 # Extra flags to use when compiling [m]crt0.o.
445 # "t" or nothing, for building multilibbed versions of, say, crtbegin.o.
448 # End of variables for you to override.
450 # Definition of `all' is here so that new rules inserted by sed
451 # do not specify the default target.
452 # The real definition is under `all.internal' (for native compilers)
453 # or `all.cross' (for cross compilers).
456 # This tells GNU Make version 3 not to put all variables in the environment.
459 # sed inserts variable overrides after the following line.
473 # Now figure out from those variables how to compile and link.
477 # IN_GCC tells a few source files (e.g. config.h) that we are compiling gcc.
478 INTERNAL_CFLAGS
= $(CROSS
) -DIN_GCC @extra_c_flags@
480 # This is the variable actually used when we compile.
481 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
) \
485 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
487 # Even if ALLOCA is set, don't use it if compiling with GCC.
488 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
489 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
490 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
491 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
493 # Dependency on obstack, alloca, malloc or whatever library facilities
494 # are not installed in the system libraries.
495 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
496 LIBDEPS
= $(INTLLIBS
) $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
498 # Likewise, for use in the tools that must run on this machine
499 # even if we are cross-building GCC.
500 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
501 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_INTLLIBS
) $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
503 # How to link with both our special library facilities
504 # and the system's installed libraries.
505 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(INTLLIBS
) @LIBS@
$(CLIB
)
507 # Likewise, for use in the tools that must run on this machine
508 # even if we are cross-building GCC.
509 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
510 $(HOST_INTLLIBS
) $(HOST_CLIB
)
512 HOST_RTL
= $(HOST_PREFIX
)rtl.o
513 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
514 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
516 # Specify the directories to be searched for header files.
517 # Both . and srcdir are used, in that order,
518 # so that tm.h and config.h will be found in the compilation
519 # subdirectory rather than in the source directory.
520 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
522 # Always use -I$(srcdir)/config when compiling.
524 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
526 # This tells GNU make version 3 not to export all the variables
527 # defined in this file into the environment.
530 # Support for additional languages (other than c and objc).
531 # ??? objc can be supported this way too (leave for later).
533 # These next lines are overridden by configure.
534 LANG_MAKEFILES
= @all_lang_makefiles@
535 LANG_STAGESTUFF
= @all_stagestuff@
536 LANG_DIFF_EXCLUDES
= @all_diff_excludes@
537 LANG_LIB2FUNCS
= @all_lib2funcs@
538 LANG_EXTRA_HEADERS
= @all_headers@
540 # Flags to pass to recursive makes.
541 # CC is set by configure. Hosts without symlinks need special handling
542 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
544 # ??? The choices here will need some experimenting with.
545 ORDINARY_FLAGS_TO_PASS
= \
546 "AR_FLAGS=$(AR_FLAGS)" \
547 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
549 "BISONFLAGS=$(BISONFLAGS)" \
552 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
553 "LDFLAGS=$(LDFLAGS)" \
555 "LEXFLAGS=$(LEXFLAGS)" \
557 "MAKEINFO=$(MAKEINFO)" \
558 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
559 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
560 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
562 "STAGE_PREFIX=@stage_prefix_set_by_configure@" \
565 "exec_prefix=$(exec_prefix)" \
567 "tooldir=$(tooldir)" \
569 "libsubdir=$(libsubdir)" \
570 "datadir=$(datadir)" \
571 "distdir=../tmp/\$$(subdir)" \
572 "localedir=$(localedir)"
573 FLAGS_TO_PASS
= $(ORDINARY_FLAGS_TO_PASS
) "CC=@cc_set_by_configure@"
574 PREPEND_DOTDOT_TO_RELATIVE_PATHS
= sed \
575 -e
's|^ *[^ /][^ /]*/|%&|' \
577 -e
's|% *[^- /]|%&|g' \
580 SUBDIR_FLAGS_TO_PASS
= $(ORDINARY_FLAGS_TO_PASS
) \
581 "CC=`echo @cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
583 # Lists of files for various purposes.
585 # Language-specific object files for C and Objective C.
586 C_AND_OBJC_OBJS
= c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \
587 c-aux-info.o c-common.o c-iterate.o mbchar.o @extra_c_objs@
589 # Language-specific object files for C.
590 C_OBJS
= c-parse.o c-lang.o
$(C_AND_OBJC_OBJS
)
592 # Files specific to the C interpreter bytecode compiler(s).
593 BC_OBJS
= bc-emit.o bc-optab.o
595 # Bytecode header files constructed at build time; vmsconfig.com wants this.
596 BC_ALL
= bc-arity.h bc-opcode.h bc-opname.h
598 # Language-independent object files.
599 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
600 function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
601 intl.o varasm.o genrtl.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
602 dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o dyn-string.o \
603 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
604 regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \
605 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
606 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
607 profile.o insn-attrtab.o
$(out_object_file
) getpwd.o convert.o
$(EXTRA_OBJS
)
609 # GEN files are listed separately, so they can be built before doing parallel
610 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
611 # them before rtl.o is compiled.
612 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig \
613 genpeep gengenrtl gencheck
616 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
619 # Files to be copied away after each stage in building.
620 STAGESTUFF
= *$(objext
) insn-flags.h insn-config.h insn-codes.h \
621 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
622 insn-attr.h insn-attrtab.c insn-opinit.c tree-check.h \
623 s-flags s-config s-codes s-mlib s-unders s-genrtl \
624 s-output s-recog s-emit s-extract s-peep s-check \
625 s-attr s-attrtab s-opinit s-proto s-crt s-crtS s-crt0 \
626 genemit
$(exeext
) genoutput
$(exeext
) genrecog
$(exeext
) genextract
$(exeext
) \
627 genflags
$(exeext
) gencodes
$(exeext
) genconfig
$(exeext
) genpeep
$(exeext
) \
628 genattrtab
$(exeext
) genattr
$(exeext
) genopinit
$(exeext
) gengenrtl
$(exeext
) \
631 s-bcarity s-bcopcode s-bcopname \
632 bi-arity
$(exeext
) bi-opcode
$(exeext
) bi-opname
$(exeext
) \
633 xgcc
$(exeext
) cc1
$(exeext
) cpp$(exeext
) $(EXTRA_PASSES
) \
634 $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) \
635 $(CCCP
)$(exeext
) cc1obj
$(exeext
) enquire
$(exeext
) \
636 protoize
$(exeext
) unprotoize
$(exeext
) \
637 specs collect2
$(exeext
) $(USE_COLLECT2
) underscore.c \
639 *.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop \
640 *.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack \
644 # Members of libgcc1.a.
645 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
646 _lshrsi3 _ashrsi3 _ashlsi3 \
647 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
648 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
649 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
650 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
651 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
653 # Library members defined in libgcc2.c.
654 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
655 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
656 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
657 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
658 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
659 _fixtfdi _fixunstfdi _floatditf \
660 __gcc_bcmp _varargs __dummy _eprintf _op_new _op_vnew _new_handler \
661 _op_delete _op_vdel _bb _shtab _clear_cache _trampoline __main _exit \
664 # The files that "belong" in CONFIG_H are deliberately omitted
665 # because having them there would not be useful in actual practice.
666 # All they would do is cause complete recompilation every time
667 # one of the machine description files is edited.
668 # That may or may not be what one wants to do.
669 # If it is, rm *.o is an easy way to do it.
670 # CONFIG_H = $(host_xm_file) $(tm_file)
672 RTL_BASE_H
= rtl.h rtl.def gansidecl.h machmode.h machmode.def
673 RTL_H
= $(RTL_BASE_H
) genrtl.h
674 TREE_H
= tree.h real.h tree.def gansidecl.h machmode.h machmode.def tree-check.h
675 BYTECODE_H
= bytecode.h bc-emit.h bc-optab.h
676 BASIC_BLOCK_H
= basic-block.h bitmap.h
677 DEMANGLE_H
= demangle.h gansidecl.h
678 RECOG_H
= recog.h gansidecl.h
680 # Language makefile fragments.
682 # The following targets define the interface between us and the languages.
684 # all.build, all.cross, start.encap, rest.encap,
686 # install-normal, install-common, install-info, install-man,
687 # uninstall, distdir,
688 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
689 # stage1, stage2, stage3, stage4
691 # Each language is linked in with a series of hooks (since we can't use `::'
692 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
693 # Configure computes and adds these here.
698 # sed inserts language fragments after the following line.
699 ####language fragments
702 # End of language makefile fragments.
704 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
707 $(srcdir)/version.c
: $(VERSION_DEP
)
708 (cd
$(srcdir); cvs log
-h
`basename $?`) >tmp-ver
709 tag
=`sed '1,/^sym/d;s/ *gcc-//;s/:.*$$//;q' tmp-ver`; \
710 ver
=`echo $${tag} | sed 's/-.*//' | sed 's/_/./g'`; \
711 date
=`echo $${tag} | sed 's/.*-//'`; \
712 if
[ $${date} != RELEASE
]; then ver
="testgcc-$${ver} $${date} experimental"; fi
; \
713 echo
"char *version_string = \"$${ver}\";" >tmp-version.c
715 $(srcdir)/move-if-change tmp-version.c
$(srcdir)/version.c
717 Makefile
: $(srcdir)/Makefile.in config.status
$(srcdir)/version.c \
718 $(xmake_file
) $(tmake_file
) $(LANG_MAKEFILES
)
719 $(SHELL
) $(srcdir)/configure.frag
$(srcdir) "$(SUBDIRS)" \
720 "$(xmake_file)" "$(tmake_file)"
721 cp config.status config.run
725 $(srcdir)/configure
: $(srcdir)/configure.in
726 cd
$(srcdir); autoconf
728 # cstamp-h.in controls rebuilding of config.in.
729 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
730 # delete it. A stamp file is needed as autoheader won't update the file if
731 # nothing has changed.
732 # It remains in the source directory and is part of the distribution.
733 # This follows what is done in shellutils, fileutils, etc.
734 # "echo timestamp" is used instead of touch to be consistent with other
735 # packages that use autoconf (??? perhaps also to avoid problems with patch?).
736 # ??? Newer versions have a maintainer mode that may be useful here.
737 $(srcdir)/config.in
: $(srcdir)/cstamp-h.in
738 $(srcdir)/cstamp-h.in
: $(srcdir)/configure.in
$(srcdir)/acconfig.h
739 cd
$(srcdir) && autoheader
740 echo timestamp
> $(srcdir)/cstamp-h.in
741 auto-config.h
: cstamp-h
; @true
742 cstamp-h
: config.in config.status
743 CONFIG_HEADERS
=auto-config.h
:config.in
$(SHELL
) config.status
745 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
746 # a target to build even if it is up-to-date. So we must verify that
747 # config.status does not exist before failing.
748 config.status
: $(srcdir)/configure version.c
749 @if
[ ! -f config.status
] ; then \
750 echo You must configure gcc. Look at the INSTALL file for details.
; \
753 $(SHELL
) config.status
--recheck
; \
756 all.internal
: start.encap rest.encap
757 # This is what to compile if making a cross-compiler.
758 # Note that we can compile enquire using the cross-compiler just built,
759 # although we can't run it on this machine.
760 all.cross
: native gcc-cross specs stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) \
761 $(LIBGCC1_TEST
) $(EXTRA_PARTS
) lang.
all.cross
762 # This is what to compile if making gcc with a cross-compiler.
763 all.build
: native xgcc
$(EXTRA_PARTS
) lang.
all.build
764 # This is what must be made before installing GCC and converting libraries.
765 start.encap
: native xgcc specs
$(LIBGCC1
) xlimits.h lang.start.encap
766 # These can't be made until after GCC can run.
767 rest.encap
: stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) $(EXTRA_PARTS
) lang.rest.encap
768 # This is what is made with the host's compiler
769 # whether making a cross compiler or not.
770 native
: config.status auto-config.h
cpp intl.
all $(LANGUAGES
) \
771 $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
773 # Define the names for selecting languages in LANGUAGES.
777 # Tell GNU make these are phony targets.
778 .PHONY
: C c PROTO proto
780 # On the target machine, finish building a cross compiler.
781 # This does the things that can't be done on the host machine.
782 rest.cross
: $(LIBGCC
) gfloat.h specs
784 # Verify that it works to compile and link libgcc1-test.
785 # If it does, then there are sufficient replacements for libgcc1.a.
786 libgcc1-test
: libgcc1-test.o native
$(GCC_PARTS
)
787 @echo
"Testing libgcc1. Ignore linker warning messages."
788 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) libgcc1-test.o
-o libgcc1-test \
789 -nostartfiles
-nostdlib
`$(GCC_FOR_TARGET) --print-libgcc-file-name`
790 libgcc1-test.o
: libgcc1-test.c native xgcc
791 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) -c
$(srcdir)/libgcc1-test.c
793 # Recompile all the language-independent object files.
794 # This is used only if the user explicitly asks for it.
795 compilations
: ${OBJS}
797 # Create a list of the language-independent object files so the language
798 # subdirectories needn't mention their names explicitly.
799 stamp-objlist
: $(OBJS
) $(BC_OBJS
)
800 echo
" $(OBJS) $(BC_OBJS)" | sed
-e
's, \([a-z0-9]\), ../\1,g' -e
's/\.o/$(objext)/g' >stamp-objlist
802 # We call this executable `xgcc' rather than `gcc'
803 # to avoid confusion if the current directory is in the path
804 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
805 GCC_OBJS
= gcc.o choose-temp.o intl.o pexecute.o
prefix.o version.o
806 xgcc
: $(GCC_OBJS
) $(EXTRA_GCC_OBJS
) $(LIBDEPS
)
807 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
808 $(GCC_OBJS
) $(EXTRA_GCC_OBJS
) $(LIBS
)
810 # Dump a specs file to make -B./ read these specs over installed ones.
812 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
815 # We do want to create an executable named `xgcc', so we can use it to
817 # Also create gcc-cross, so that install-common will install properly.
819 cp xgcc
$(exeext
) gcc-cross
$(exeext
)
821 cc1
: $(P
) $(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
822 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
824 # Copy float.h from its source.
827 cp
$(FLOAT_H
) gfloat.h
829 # Create float.h source for the native machine.
830 # Make it empty if we can use the system float.h without changes.
832 -.
/enquire
-f
> tmp-float.h
833 grep
'#define [^_]' tmp-float.h
>/dev
/null || true
> tmp-float.h
834 mv tmp-float.h float.h-nat
836 # Create a dummy float.h source for a cross-compiler.
837 # ??? This isn't used anymore. Should we create config/float-unkn.h
838 # and make that the default float_format in configure?
840 echo
"#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross
841 echo
"#error float.h values not known for cross-compiler" >> t-float.h-cross
842 echo
"#endif" >> t-float.h-cross
843 mv t-float.h-cross float.h-cross
845 # Used to compile enquire with standard cc, but have forgotten why.
846 # Let's try with GCC.
847 enquire
: enquire.o
$(GCC_PARTS
)
848 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o
$@
849 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
) stmp-int-hdrs
850 rm -f
include/float.h
851 if
$(FLOAT_H_TEST
); then \
852 SYS_FLOAT_H_WRAP
=1; \
854 SYS_FLOAT_H_WRAP
=0; \
856 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) \
857 -DSYS_FLOAT_H_WRAP
=$$SYS_FLOAT_H_WRAP \
858 -I.
-c
$(srcdir)/enquire.c
860 # Build the version of limits.h that we will install.
861 xlimits.h
: glimits.h limitx.h limity.h
862 if
$(LIMITS_H_TEST
) ; then \
863 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
865 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
867 mv tmp-xlimits.h xlimits.h
870 # This is done in two parts because some functions, in libgcc1.c,
871 # must be compiled with something other than GCC,
872 # while the rest, in libgcc2.c, must be compiled with xgcc.
873 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
875 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
876 # LIBCONVERT should put its output in libgcc1.conv.
877 libgcc1.conv
: libgcc1.a
878 $(LIBCONVERT
) libgcc1.a libgcc1.conv
880 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
881 # Make an empty file instead.
882 libgcc1.null
: $(GCC_PASSES
)
883 echo
"__foo () {}" > dummy.c
884 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
885 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy
$(objext
)
886 rm -f dummy
$(objext
) dummy.c
888 # This is $(LIBGCC1) for a cross-compiler.
889 # We have no automatic way of building libgcc1.a,
890 # so it's up to the installer to find a way to do that.
891 # This rule deliberately does not depend on libgcc1.a
892 # so that it will fail if the installer hasn't provided it.
894 mv libgcc1.a libgcc1.cross ||
(echo You must find a way to make libgcc1.a
; false
)
896 # Compile the library of arithmetic subroutines with the native compiler.
897 # Don't compile it with GCC!
898 # (That would cause most arithmetic functions to call themselves.)
900 # NOTE: If you modify these rules substantially, please be sure to
901 # check at least config/i386/t-sco5 and possibly other makefile
903 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
905 # Actually build it in tmplibgcc1.a, then rename at end,
906 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
907 # -e causes any failing command to make this rule fail.
908 # -e doesn't work in certain shells, so we test $$? as well.
909 # lynx has a broken ar, it always complains when the initial library is
910 # empty, thus this command works only if we don't do -e
911 # There is a trailing backslash (\) deleted from the following line.
913 for name in
$(LIB1FUNCS
); \
916 rm -f
$${name}$(objext
); \
917 $(OLDCC
) -DIN_LIBGCC1
$(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
918 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
919 mv libgcc1
$(objext
) $${name}$(objext
); \
920 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
921 rm -f
$${name}$(objext
); \
923 # Some shells crash when a loop has no items.
924 # So make sure there is always at least one--`..'.
926 # We don't use -e here because there are if statements
927 # that should not make the command give up when the if condition is false.
928 # Instead, we test for failure after each command where it matters.
929 for file in ..
$(LIB1FUNCS_EXTRA
); \
931 if
[ x
$${file} != x..
]; then \
932 name
=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
934 if
[ $${name}.asm
= $${file} ]; then \
935 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
937 $(OLDCC
) -DIN_LIBGCC1
$(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
938 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
939 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
940 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
941 rm -f
$${name}.s
$${name}$(objext
); \
945 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc1.a
; else true
; fi
946 mv tmplibgcc1.a libgcc1.a
948 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
949 # functions. LIB1ASMSRC is the name of the source file in the config
951 libgcc1-asm.a
: libgcc2.ready config.status
$(srcdir)/config
/$(LIB1ASMSRC
)
952 -rm -f tmplibgcc1.a libgcc1.S
953 cp
$(srcdir)/config
/$(LIB1ASMSRC
) libgcc1.S
954 # Actually build it in tmplibgcc1.a, then rename at end,
955 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
956 # -e causes any failing command to make this rule fail.
957 # -e doesn't work in certain shells, so we test $$? as well.
958 # lynx has a broken ar, it always complains when the initial library is
959 # empty, thus this command works only if we don't do -e
960 # There is a trailing backslash (\) deleted from the following line.
962 for name in
$(LIB1ASMFUNCS
); \
965 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} libgcc1.S
; \
966 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
967 mv libgcc1
$(objext
) $${name}$(objext
); \
968 $(AR
) $(AR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
969 rm -f
$${name}$(objext
); \
972 mv tmplibgcc1.a libgcc1-asm.a
974 # Generate assembly versions of the functions required for libgcc1.
975 # You'll still need to massage the code by hand (possibly hacking
976 # underscores and local labels) but this will get you started.
977 libgcc1.S
: libgcc1.c
$(CONFIG_H
) config.status
980 for name in
$(LIB1FUNCS
); \
983 $(OLDCC
) -DIN_LIBGCC1
$(CCLIBFLAGS
) $(INCLUDES
) -S
-DL
$${name} $(srcdir)/libgcc1.c
; \
984 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
985 echo
'#ifdef ' L
$${name} >> libgcc1.S
; \
986 cat libgcc1.s
>> libgcc1.S
; \
987 echo
'#endif /*' L
$${name} '*/' >> libgcc1.S
; \
988 echo
"" >> libgcc1.S
; \
991 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
992 # But recompiling cc1 should not force recompilation of libgcc2.a.
993 # If you want to force recompilation, delete libgcc2.a.
994 libgcc2.ready
: $(GCC_PASSES
) $(LIBGCC2_DEPS
) stmp-int-hdrs
995 -if
[ -f libgcc2.ready
] ; then \
998 touch libgcc2.ready
; \
1001 LIB2ADD
= $(srcdir)/frame.c
$(LIB2FUNCS_EXTRA
) $(LANG_LIB2FUNCS
)
1002 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2ADD
) \
1003 machmode.h longlong.h frame.h gansidecl.h gbl-ctors.h config.status
1004 # Actually build it in tmplibgcc2.a, then rename at end,
1005 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
1007 # -e causes any failing command to make this rule fail.
1008 # -e doesn't work in certain shells, so we test $$? as well.
1009 # lynx has a broken ar, it always complains when the initial library is
1010 # empty, thus this command works only if we don't do -e
1011 # There is a trailing backslash (\) deleted from the following line.
1013 for name in
$(LIB2FUNCS
); \
1016 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
1017 $(srcdir)/libgcc2.c
-o
$${name}$(objext
); \
1018 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
1019 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}$(objext
); \
1020 rm -f
$${name}$(objext
); \
1022 # Some shells crash when a loop has no items.
1023 # So make sure there is always at least one--`..'.
1025 # We don't use -e here because there are if statements
1026 # that should not make the command give up when the if condition is false.
1027 # Instead, we test for failure after each command where it matters.
1028 for file in
$(LIB2ADD
); do \
1029 name
=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
1030 oname
=` echo $${name} | sed -e 's,.*/,,'`; \
1031 if
[ $${name}.txt
= $${file} ]; then \
1032 for f in ..
`cat $${file}`; do if
[ x
$${f} != x..
]; then \
1033 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
1034 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" \
1035 CFLAGS
="$(CFLAGS)" HOST_PREFIX
="$(HOST_PREFIX)" \
1036 HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
1037 LANGUAGES
="$(LANGUAGES)" \
1038 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $${f}; \
1039 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
1040 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${f}; \
1046 if
[ $${name}.asm
= $${file} ]; then \
1047 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
1049 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
1050 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
1051 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${oname}$(objext
); \
1052 rm -f
$${name}.s
$${oname}$(objext
); \
1055 mv tmplibgcc2.a libgcc2.a
1056 # These lines were deleted from above the mv command
1057 # because ranlibing libgcc.a itself should suffice.
1058 # -if [ x${HPUX_GAS} = x ] ; then \
1059 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
1062 # Combine the various libraries into a single library, libgcc.a.
1063 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
1064 -rm -rf tmplibgcc.a libgcc.a tmpcopy
1066 -if
[ x
$(LIBGCC1
) != x
]; \
1067 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
1070 # Some versions of ar (specifically the one in RISC/os 5.x), create an
1071 # unwritable table of contents file, and then print an error message when
1072 # the second ar command tries to overwrite this file. To avoid the error
1073 # message from ar, we make sure all files are writable.
1074 -(cd tmpcopy
; chmod
+w
* > /dev
/null
2>&1)
1075 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
1076 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
1078 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
1079 # Actually build it in tmplibgcc.a, then rename at end,
1080 # so that libgcc.a itself remains nonexistent if compilation is aborted.
1081 mv tmplibgcc.a libgcc.a
1083 # Use the genmultilib shell script to generate the information the gcc
1084 # driver program needs to select the library directory based on the
1086 multilib.h
: s-mlib
; @true
1087 s-mlib
: $(srcdir)/genmultilib Makefile
1088 $(SHELL
) $(srcdir)/genmultilib \
1089 "$(MULTILIB_OPTIONS)" \
1090 "$(MULTILIB_DIRNAMES)" \
1091 "$(MULTILIB_MATCHES)" \
1092 "$(MULTILIB_EXCEPTIONS)" \
1093 "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
1094 $(srcdir)/move-if-change tmp-mlib.h multilib.h
1097 # Build multiple copies of libgcc.a, one for each target switch.
1098 stmp-multilib
: $(LIBGCC1
) libgcc2.c libgcc2.ready
$(CONFIG_H
) \
1099 frame.h gansidecl.h \
1100 $(LIB2ADD
) machmode.h longlong.h gbl-ctors.h config.status
1101 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
1102 dir=`echo $$i | sed -e 's/;.*$$//'`; \
1103 flags
=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
1104 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
1105 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
1106 RANLIB
="$(RANLIB)" RANLIB_TEST
="$(RANLIB_TEST)" \
1107 LANGUAGES
="$(LANGUAGES)" \
1108 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
1109 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS) $${flags}" \
1110 MULTILIB_CFLAGS
="$${flags}" \
1111 LIBGCC1
="$(LIBGCC1)" LIBGCC2
="$(LIBGCC2)" \
1112 dir="$${dir}" stmp-multilib-sub
; \
1113 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
1117 # Subroutine of stmp-multilib so make -n works.
1120 if
[ -d
$(dir) ]; then \
1122 rm -f libgcc.a
$(EXTRA_MULTILIB_PARTS
); \
1125 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
1126 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
1127 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
1128 LANGUAGES
="$(LANGUAGES)" \
1129 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC2
)
1130 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
1132 else rm -f
$(LIBGCC1
); \
1134 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
1137 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
1138 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
1139 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
1140 LANGUAGES
="$(LANGUAGES)" \
1141 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC1
); \
1143 rm -rf tmplibgcc.a tmpcopy
1145 if
[ x
$(LIBGCC1
) != x
]; \
1146 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
1149 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
1150 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
1151 rm -rf libgcc2.a tmpcopy
1152 if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
1153 if
[ -d
$(dir) ]; then true
; else mkdir
$(dir); fi
1154 mv tmplibgcc.a
$(dir)/libgcc.a
1155 for f in ..
$(EXTRA_MULTILIB_PARTS
); do if
[ x
$${f} != x..
]; then \
1156 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
1157 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
1158 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
1159 LANGUAGES
="$(LANGUAGES)" \
1160 MULTILIB_CFLAGS
="$(MULTILIB_CFLAGS)" T
="t" t
$${f}; \
1161 mv t
$${f} $(dir)/$${f}; \
1165 # Compile two additional files that are linked with every program
1166 # linked using GCC on systems using COFF or ELF, for the sake of C++
1168 $(T
)crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) \
1169 defaults.h frame.h gbl-ctors.h
1170 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(MULTILIB_CFLAGS
) -g0 \
1171 -finhibit-size-directive
-fno-inline-functions
-fno-exceptions
$(CRTSTUFF_T_CFLAGS
) \
1172 -c
$(srcdir)/crtstuff.c
-DCRT_BEGIN
-o
$(T
)crtbegin
$(objext
)
1174 $(T
)crtend.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) \
1175 defaults.h frame.h gbl-ctors.h
1176 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(MULTILIB_CFLAGS
) -g0 \
1177 -finhibit-size-directive
-fno-inline-functions
-fno-exceptions
$(CRTSTUFF_T_CFLAGS
) \
1178 -c
$(srcdir)/crtstuff.c
-DCRT_END
-o
$(T
)crtend
$(objext
)
1180 # On some systems we also want to install versions of these files
1181 # compiled using PIC for use in shared libraries.
1182 crtbeginS.o crtendS.o
: s-crtS
; @true
1184 s-crtS
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) \
1185 defaults.h frame.h gbl-ctors.h
1186 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS_S
) \
1187 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
1188 -g0
-c
$(srcdir)/crtstuff.c
1189 mv crtstuff
$(objext
) crtbeginS
$(objext
)
1190 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS_S
) \
1191 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
1192 -g0
-c
$(srcdir)/crtstuff.c
-o crtendS
$(objext
)
1195 # Compile the start modules crt0.o and mcrt0.o that are linked with every program
1196 crt0.o
: s-crt0
; @true
1197 mcrt0.o
: s-crt0
; @true
1199 s-crt0
: $(CRT0_S
) $(MCRT0_S
) $(GCC_PASSES
) $(CONFIG_H
)
1200 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(CRT0STUFF_T_CFLAGS
) \
1201 -o crt0.o
-c
$(CRT0_S
)
1202 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(CRT0STUFF_T_CFLAGS
) \
1203 -o mcrt0.o
-c
$(MCRT0_S
)
1206 # Compiling object files from source files.
1208 # Note that dependencies on obstack.h are not written
1209 # because that file is not part of GCC.
1211 # C language specific files.
1213 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) system.h
$(TREE_H
) c-lex.h \
1214 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1215 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
1216 $(srcdir)/c-parse.h
: $(srcdir)/c-parse.c
1217 $(srcdir)/c-parse.c
: $(srcdir)/c-parse.y
1218 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
1219 $(srcdir)/c-parse.y
: c-parse.in
1220 echo
'/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1221 sed
-e
"/^ifobjc$$/,/^end ifobjc$$/d" \
1222 -e
"/^ifc$$/d" -e
"/^end ifc$$/d" \
1223 $(srcdir)/c-parse.in
>>tmp-c-parse.y
1224 $(srcdir)/move-if-change tmp-c-parse.y
$(srcdir)/c-parse.y
1226 $(srcdir)/c-gperf.h
: c-parse.gperf
1227 gperf
-p
-j1
-i
1 -g
-o
-t
-G
-N is_reserved_word
-k1
,3,$$ \
1228 $(srcdir)/c-parse.gperf
>tmp-gperf.h
1229 $(srcdir)/move-if-change tmp-gperf.h
$(srcdir)/c-gperf.h
1231 c-decl.o
: c-decl.c
$(CONFIG_H
) system.h
$(TREE_H
) c-tree.h c-lex.h flags.h \
1233 c-typeck.o
: c-typeck.c
$(CONFIG_H
) system.h
$(TREE_H
) c-tree.h flags.h \
1235 c-lang.o
: c-lang.c
$(CONFIG_H
) system.h
$(TREE_H
)
1236 c-lex.o
: c-lex.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) c-lex.h c-tree.h \
1237 mbchar.h
$(srcdir)/c-parse.h input.h intl.h flags.h
$(srcdir)/c-gperf.h \
1239 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) system.h
$(TREE_H
) c-tree.h flags.h
1240 c-convert.o
: c-convert.c
$(CONFIG_H
) system.h
$(TREE_H
) flags.h
1241 c-pragma.o
: c-pragma.c
$(CONFIG_H
) system.h
$(TREE_H
) except.h function.h \
1242 defaults.h c-pragma.h
1243 c-iterate.o
: c-iterate.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) c-tree.h \
1245 mbchar.o
: $(CONFIG_H
) mbchar.c system.h gansidecl.h mbchar.h
1247 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1250 ln collect2
$(exeext
) ld$(exeext
) > /dev
/null
2>&1 \
1251 || cp collect2
$(exeext
) ld$(exeext
)
1253 COLLECT2_OBJS
= collect2.o choose-temp.o cplus-dem.o \
1254 intl.o underscore.o version.o
1256 collect2
: $(COLLECT2_OBJS
) $(LIBDEPS
)
1257 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1258 -rm -f collect2
$(exeext
)
1259 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(COLLECT2_OBJS
) $(LIBS
)
1261 collect2.o
: collect2.c
$(CONFIG_H
) system.h gansidecl.h gstab.h intl.h \
1262 obstack.h
$(DEMANGLE_H
)
1263 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1264 -DTARGET_MACHINE
=\"$(target_alias
)\" $(MAYBE_USE_COLLECT2
) \
1265 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1267 cplus-dem.o
: cplus-dem.c
$(DEMANGLE_H
)
1269 underscore.c
: s-under
; @true
1271 s-under
: $(GCC_PASSES
)
1272 echo
"int xxy_us_dummy;" >tmp-dum.c
1273 $(GCC_FOR_TARGET
) -S tmp-dum.c
1274 echo
'/*WARNING: This file is automatically generated!*/' >tmp-under.c
1275 if grep _xxy_us_dummy tmp-dum.s
> /dev
/null
; then \
1276 echo
"int prepends_underscore = 1;" >>tmp-under.c
; \
1278 echo
"int prepends_underscore = 0;" >>tmp-under.c
; \
1280 $(srcdir)/move-if-change tmp-under.c underscore.c
1281 -rm -f tmp-dum.c tmp-dum.s
1284 # A file used by all variants of C.
1286 c-common.o
: c-common.c
$(CONFIG_H
) system.h
$(TREE_H
) c-tree.h c-lex.h flags.h
1288 # Language-independent files.
1291 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
1292 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
1293 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1294 -DDEFAULT_TARGET_MACHINE
=\"$(target_alias
)\" \
1295 -DTOOLDIR_BASE_PREFIX
=\"$(exec_prefix)/\"
1296 gcc.o
: gcc.c
$(CONFIG_H
) system.h gansidecl.h intl.h multilib.h \
1297 Makefile
$(lang_specs_files
)
1298 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1300 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1302 tree-check.h
: s-check
; @true
1303 s-check
: tree.def gencheck
$(srcdir)/move-if-change
1304 .
/gencheck
> tmp-check.h
1305 $(srcdir)/move-if-change tmp-check.h tree-check.h
1308 gencheck
: gencheck.o
$(HOST_LIBDEPS
)
1309 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1310 gencheck.o
$(HOST_LIBS
)
1312 gencheck.o
: gencheck.c tree.def
$(CONFIG_H
) system.h
1313 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1314 $(srcdir)/gencheck.c
1316 dumpvers
: dumpvers.c
1318 version.o
: version.c
1319 obstack.o
: obstack.c
$(CONFIG_H
)
1320 choose-temp.o
: choose-temp.c
$(CONFIG_H
) gansidecl.h
1321 pexecute.o
: pexecute.c
$(CONFIG_H
) gansidecl.h
1322 prefix.o
: prefix.c
$(CONFIG_H
) system.h gansidecl.h Makefile
1323 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1324 -DPREFIX
=\"$(prefix)\" \
1325 -c
`echo $(srcdir)/prefix.c | sed 's,^\./,,'`
1327 convert.o
: convert.c
$(CONFIG_H
) system.h
$(TREE_H
) flags.h convert.h
1329 tree.o
: tree.c
$(CONFIG_H
) system.h
$(TREE_H
) flags.h function.h
1330 print-tree.o
: print-tree.c
$(CONFIG_H
) system.h
$(TREE_H
)
1331 stor-layout.o
: stor-layout.c
$(CONFIG_H
) system.h
$(TREE_H
) flags.h function.h
1332 fold-const.o
: fold-const.c
$(CONFIG_H
) system.h
$(TREE_H
) flags.h
1333 toplev.o
: toplev.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) bytecode.h \
1334 bc-emit.h flags.h input.h insn-attr.h insn-codes.h insn-config.h intl.h \
1335 recog.h xcoffout.h defaults.h output.h Makefile \
1336 $(lang_options_files
)
1337 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(MAYBE_USE_COLLECT2
) \
1338 -DTARGET_NAME
=\"$(target_alias
)\" \
1339 -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1341 rtl.o
: rtl.c
$(CONFIG_H
) system.h
$(RTL_H
)
1343 print-rtl.o
: print-rtl.c
$(CONFIG_H
) system.h
$(RTL_H
)
1344 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1346 varasm.o
: varasm.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) flags.h \
1347 function.h defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1348 output.h bytecode.h c-pragma.h
1349 function.o
: function.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1350 function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
1351 insn-config.h
$(RECOG_H
) output.h bytecode.h bc-emit.h
1352 stmt.o
: stmt.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h function.h \
1353 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
1354 loop.h
$(RECOG_H
) bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h \
1355 bc-optab.h bc-emit.h
1356 except.o
: except.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1357 function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
1358 insn-config.h
$(RECOG_H
) output.h except.h
1359 expr.o
: expr.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h function.h \
1360 regs.h insn-flags.h insn-codes.h expr.h insn-config.h
$(RECOG_H
) output.h \
1361 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1362 bc-emit.h modemap.def hard-reg-set.h
1363 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
1365 expmed.o
: expmed.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1366 insn-flags.h insn-config.h insn-codes.h expr.h
$(RECOG_H
) real.h
1367 explow.o
: explow.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1368 hard-reg-set.h insn-config.h expr.h
$(RECOG_H
) insn-flags.h insn-codes.h
1369 optabs.o
: optabs.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1370 insn-flags.h insn-config.h insn-codes.h expr.h
$(RECOG_H
) reload.h
1371 dbxout.o
: dbxout.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) flags.h regs.h \
1372 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1373 sdbout.o
: sdbout.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) flags.h except.h \
1374 function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
1375 insn-config.h bytecode.h obstack.h xcoffout.h c-pragma.h
1376 dwarfout.o
: dwarfout.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) dwarf.h \
1377 flags.h insn-config.h reload.h output.h defaults.h
1378 dwarf2out.o
: dwarf2out.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) dwarf2.h \
1379 flags.h insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h \
1381 xcoffout.o
: xcoffout.c
$(CONFIG_H
) system.h
$(TREE_H
) $(RTL_H
) xcoffout.h \
1383 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1384 except.h function.h regs.h insn-config.h
$(RECOG_H
) real.h expr.h \
1385 obstack.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1386 bc-emit.h bc-opname.h hard-reg-set.h
1387 real.o
: real.c
$(CONFIG_H
) system.h
$(TREE_H
)
1388 getpwd.o
: getpwd.c
$(CONFIG_H
)
1390 integrate.o
: integrate.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h \
1391 integrate.h insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h \
1392 function.h intl.h bytecode.h output.h
$(RECOG_H
) except.h
1394 jump.o
: jump.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h hard-reg-set.h regs.h \
1395 insn-config.h insn-flags.h
$(RECOG_H
) expr.h real.h except.h
1396 stupid.o
: stupid.c
$(CONFIG_H
) system.h
$(RTL_H
) regs.h hard-reg-set.h flags.h
1398 cse.o
: cse.c
$(CONFIG_H
) system.h
$(RTL_H
) regs.h hard-reg-set.h flags.h \
1399 real.h insn-config.h
$(RECOG_H
) expr.h
1400 profile.o
: profile.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h insn-flags.h \
1401 gcov-io.h
$(TREE_H
) output.h regs.h
1402 loop.o
: loop.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h loop.h insn-config.h \
1403 insn-flags.h insn-codes.h regs.h hard-reg-set.h
$(RECOG_H
) expr.h real.h
1404 unroll.o
: unroll.c
$(CONFIG_H
) system.h
$(RTL_H
) insn-config.h integrate.h \
1405 regs.h
$(RECOG_H
) flags.h expr.h loop.h
1406 flow.o
: flow.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h insn-config.h \
1407 $(BASIC_BLOCK_H
) regs.h hard-reg-set.h output.h
1408 combine.o
: combine.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h \
1409 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1410 $(BASIC_BLOCK_H
) $(RECOG_H
) real.h hard-reg-set.h
1411 regclass.o
: regclass.c
$(CONFIG_H
) system.h
$(RTL_H
) hard-reg-set.h flags.h \
1412 $(BASIC_BLOCK_H
) regs.h insn-config.h
$(RECOG_H
) reload.h real.h bytecode.h
1413 local-alloc.o
: local-alloc.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h \
1414 $(BASIC_BLOCK_H
) regs.h hard-reg-set.h insn-config.h
$(RECOG_H
) output.h
1415 dyn-string.o
: dyn-string.c dyn-string.h
$(CONFIG_H
) system.h
1416 bitmap.o
: bitmap.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h
$(BASIC_BLOCK_H
) \
1418 global.o
: global.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h \
1419 $(BASIC_BLOCK_H
) regs.h hard-reg-set.h insn-config.h output.h
1421 reload.o
: reload.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h output.h expr.h\
1422 reload.h
$(RECOG_H
) hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1423 reload1.o
: reload1.c
$(CONFIG_H
) system.h
$(RTL_H
) real.h flags.h expr.h \
1424 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1425 $(BASIC_BLOCK_H
) $(RECOG_H
) output.h
1426 caller-save.o
: caller-save.c
$(CONFIG_H
) system.h
$(RTL_H
) flags.h \
1427 regs.h hard-reg-set.h insn-codes.h insn-config.h
$(BASIC_BLOCK_H
) \
1428 $(RECOG_H
) reload.h expr.h
1429 reorg.o
: reorg.c
$(CONFIG_H
) system.h
$(RTL_H
) conditions.h hard-reg-set.h \
1430 $(BASIC_BLOCK_H
) regs.h insn-config.h insn-attr.h insn-flags.h
$(RECOG_H
) \
1432 regmove.o
: regmove.c
$(CONFIG_H
) system.h
$(RTL_H
) insn-config.h \
1433 insn-codes.h recog.h output.h reload.h regs.h hard-reg-set.h flags.h \
1435 sched.o
: $(SCHED_PREFIX
)sched.c
$(CONFIG_H
) system.h
$(RTL_H
) \
1436 $(BASIC_BLOCK_H
) regs.h hard-reg-set.h flags.h insn-config.h insn-attr.h
1437 final.o
: final.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) flags.h intl.h \
1438 regs.h
$(RECOG_H
) conditions.h insn-config.h insn-attr.h except.h real.h \
1439 output.h hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h \
1441 recog.o
: recog.c
$(CONFIG_H
) system.h
$(RTL_H
) \
1442 regs.h
$(RECOG_H
) hard-reg-set.h flags.h insn-config.h insn-attr.h \
1443 insn-flags.h insn-codes.h real.h
1444 reg-stack.o
: reg-stack.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
) \
1445 regs.h hard-reg-set.h flags.h insn-config.h insn-flags.h
1447 $(out_object_file
): $(out_file
) $(CONFIG_H
) system.h
$(TREE_H
) \
1448 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1449 insn-flags.h output.h insn-attr.h insn-codes.h
1450 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(out_file
)
1452 # Build auxiliary files that support ecoff format.
1453 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1454 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tfile.o version.o
$(LIBS
)
1456 mips-tfile.o
: mips-tfile.c
$(CONFIG_H
) system.h
$(RTL_H
)
1458 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1459 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tdump.o version.o
$(LIBS
)
1461 mips-tdump.o
: mips-tdump.c
$(CONFIG_H
) system.h
$(RTL_H
)
1463 # Build file to support OSF/rose half-pic format.
1464 halfpic.o
: halfpic.c
$(CONFIG_H
) system.h
$(RTL_H
) $(TREE_H
)
1466 # Normally this target is not used; but it is used if you
1467 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1468 # from the GNU Emacs distribution.
1470 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
1471 -c
`echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1474 # Generate header and source files from the machine description,
1477 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
1478 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1479 insn-attr.h insn-attrtab.c
1481 # The following pair of rules has this effect:
1482 # genconfig is run only if the md has changed since genconfig was last run;
1483 # but the file insn-config.h is touched only when its contents actually change.
1485 # Each of the other insn-* files is handled by a similar pair of rules.
1487 # This causes an anomaly in the results of make -n
1488 # because insn-* is older than s-*
1489 # and thus make -n thinks that insn-* will be updated
1490 # and force recompilation of things that depend on it.
1491 # We use move-if-change precisely to avoid such recompilation.
1492 # But there is no way to teach make -n that it will be avoided.
1494 # Each of the insn-*.[ch] rules has a semicolon at the end,
1495 # for otherwise the system Make on SunOS 4.1 never tries
1496 # to recompile insn-*.o. To avoid problems and extra noise from
1497 # versions of make which don't like empty commands (nothing after the
1498 # trailing `;'), we call true for each.
1500 insn-config.h
: s-config
; @true
1501 s-config
: $(md_file
) genconfig
$(srcdir)/move-if-change
1502 .
/genconfig
$(md_file
) > tmp-config.h
1503 $(srcdir)/move-if-change tmp-config.h insn-config.h
1506 insn-flags.h
: s-flags
; @true
1507 s-flags
: $(md_file
) genflags
$(srcdir)/move-if-change
1508 .
/genflags
$(md_file
) > tmp-flags.h
1509 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1512 insn-codes.h
: s-codes
; @true
1513 s-codes
: $(md_file
) gencodes
$(srcdir)/move-if-change
1514 .
/gencodes
$(md_file
) > tmp-codes.h
1515 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1518 insn-emit.o
: insn-emit.c
$(CONFIG_H
) system.h
$(RTL_H
) expr.h real.h \
1519 output.h insn-config.h insn-flags.h insn-codes.h
1520 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
1522 insn-emit.c
: s-emit
; @true
1523 s-emit
: $(md_file
) genemit
$(srcdir)/move-if-change
1524 .
/genemit
$(md_file
) > tmp-emit.c
1525 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1528 insn-recog.o
: insn-recog.c
$(CONFIG_H
) system.h
$(RTL_H
) insn-config.h \
1529 $(RECOG_H
) real.h output.h flags.h
1530 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
1532 insn-recog.c
: s-recog
; @true
1533 s-recog
: $(md_file
) genrecog
$(srcdir)/move-if-change
1534 .
/genrecog
$(md_file
) > tmp-recog.c
1535 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1538 insn-opinit.o
: insn-opinit.c
$(CONFIG_H
) system.h
$(RTL_H
) insn-codes.h \
1539 insn-flags.h insn-config.h flags.h
$(RECOG_H
) expr.h reload.h
1540 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-opinit.c
1542 insn-opinit.c
: s-opinit
; @true
1543 s-opinit
: $(md_file
) genopinit
$(srcdir)/move-if-change
1544 .
/genopinit
$(md_file
) > tmp-opinit.c
1545 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1548 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
1549 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
1551 insn-extract.c
: s-extract
; @true
1552 s-extract
: $(md_file
) genextract
$(srcdir)/move-if-change
1553 .
/genextract
$(md_file
) > tmp-extract.c
1554 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1557 insn-peep.o
: insn-peep.c
$(CONFIG_H
) system.h
$(RTL_H
) regs.h output.h real.h
1558 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
1560 insn-peep.c
: s-peep
; @true
1561 s-peep
: $(md_file
) genpeep
$(srcdir)/move-if-change
1562 .
/genpeep
$(md_file
) > tmp-peep.c
1563 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1566 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) system.h
$(RTL_H
) regs.h real.h \
1567 output.h insn-attr.h insn-config.h
1568 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
1570 insn-attr.h
: s-attr
; @true
1571 s-attr
: $(md_file
) genattr
$(srcdir)/move-if-change
1572 .
/genattr
$(md_file
) > tmp-attr.h
1573 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1576 insn-attrtab.c
: s-attrtab
; @true
1577 s-attrtab
: $(md_file
) genattrtab
$(srcdir)/move-if-change
1578 if cmp
-s
$(PREMADE_ATTRTAB_MD
) $(md_file
); \
1580 echo Using
$(PREMADE_ATTRTAB
); \
1581 cp
$(PREMADE_ATTRTAB
) tmp-attrtab.c
; \
1583 .
/genattrtab
$(md_file
) > tmp-attrtab.c
; \
1585 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1588 insn-output.o
: insn-output.c
$(CONFIG_H
) system.h
$(RTL_H
) regs.h real.h \
1589 conditions.h hard-reg-set.h insn-config.h insn-flags.h insn-attr.h \
1590 output.h
$(RECOG_H
) insn-codes.h
1591 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
1593 insn-output.c
: s-output
; @true
1594 s-output
: $(md_file
) genoutput
$(srcdir)/move-if-change
1595 .
/genoutput
$(md_file
) > tmp-output.c
1596 $(srcdir)/move-if-change tmp-output.c insn-output.c
1599 genrtl.o
: genrtl.c
$(CONFIG_H
) $(RTL_H
) system.h
1600 genrtl.c genrtl.h
: s-genrtl
1601 @true
# force gnu make to recheck modification times.
1603 s-genrtl
: gengenrtl
$(srcdir)/move-if-change
$(RTL_BASE_H
)
1604 .
/gengenrtl
-h
>tmp-genrtl.h
1605 $(srcdir)/move-if-change tmp-genrtl.h genrtl.h
1606 .
/gengenrtl
>tmp-genrtl.c
1607 $(srcdir)/move-if-change tmp-genrtl.c genrtl.c
1610 # Compile the programs that generate insn-* from the machine description.
1611 # They are compiled with $(HOST_CC), and associated libraries,
1612 # since they need to run on this machine
1613 # even if GCC is being compiled to run on some other machine.
1615 # $(CONFIG_H) is omitted from the deps of the gen*.o
1616 # because these programs don't really depend on anything
1617 # about the target machine. They do depend on config.h itself,
1618 # since that describes the host machine.
1620 # Pass the md file through cpp if the target requests it.
1621 $(MD_FILE
): $(MD_DEPS
)
1623 $(MD_CPP
) $(MD_CPPFLAGS
) $(md_file
) | sed
's/^# /; /g' > tmp-
$@
1626 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1627 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1628 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
1630 genconfig.o
: genconfig.c
$(RTL_H
) $(build_xm_file
)
1631 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
1633 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1634 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1635 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
1637 genflags.o
: genflags.c
$(RTL_H
) $(build_xm_file
)
1638 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
1640 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1641 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1642 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
1644 gencodes.o
: gencodes.c
$(RTL_H
) $(build_xm_file
)
1645 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
1647 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1648 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1649 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
1651 genemit.o
: genemit.c
$(RTL_H
) $(build_xm_file
)
1652 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
1654 genopinit
: genopinit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1655 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1656 genopinit.o
$(HOST_RTL
) $(HOST_LIBS
)
1658 genopinit.o
: genopinit.c
$(RTL_H
) $(build_xm_file
)
1659 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genopinit.c
1661 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1662 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1663 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
1665 genrecog.o
: genrecog.c
$(RTL_H
) $(build_xm_file
)
1666 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
1668 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1669 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1670 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
1672 genextract.o
: genextract.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1673 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
1675 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1676 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1677 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
1679 genpeep.o
: genpeep.c
$(RTL_H
) $(build_xm_file
)
1680 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
1682 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1683 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1684 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
1686 genattr.o
: genattr.c
$(RTL_H
) $(build_xm_file
)
1687 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1689 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1690 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1691 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1693 genattrtab.o
: genattrtab.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1694 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1696 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1697 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1698 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1700 genoutput.o
: genoutput.c
$(RTL_H
) $(build_xm_file
)
1701 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1703 gengenrtl
: gengenrtl.o
$(HOST_LIBDEPS
)
1704 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1705 gengenrtl.o
$(HOST_LIBS
)
1707 gengenrtl.o
: gengenrtl.c
$(RTL_BASE_H
) system.h
1708 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gengenrtl.c
1710 # Compile the libraries to be used by gen*.
1711 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1712 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1713 # with the rules for rtl.o, alloca.o, etc.
1714 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1715 rm -f
$(HOST_PREFIX
)rtl.c
1716 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtl.c
> $(HOST_PREFIX
)rtl.c
1717 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1719 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1720 rm -f
$(HOST_PREFIX
)print-rtl.c
1721 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c
> $(HOST_PREFIX
)print-rtl.c
1722 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1724 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1725 rm -f
$(HOST_PREFIX
)rtlanal.c
1726 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c
> $(HOST_PREFIX
)rtlanal.c
1727 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1729 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1730 rm -f
$(HOST_PREFIX
)alloca.c
1731 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1732 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1734 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1735 rm -f
$(HOST_PREFIX
)obstack.c
1736 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/obstack.c
> $(HOST_PREFIX
)obstack.c
1737 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1739 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1740 rm -f
$(HOST_PREFIX
)malloc.c
1741 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/malloc.c
> $(HOST_PREFIX
)malloc.c
1742 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1744 # This satisfies the dependency that we get if you cross-compile a compiler
1745 # that does not need to compile alloca, malloc or whatever.
1747 touch
$(HOST_PREFIX_1
)
1749 # Remake bytecode files.
1750 BI_OBJ
=bi-parser.o bi-lexer.o bi-reverse.o
1752 bc-emit.o
: bc-emit.c
$(CONFIG_H
) $(RTL_H
) real.h
$(BYTECODE_H
) \
1753 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1754 bc-optab.o
: bc-optab.c
$(CONFIG_H
) $(REAL_H
) $(BYTECODE_H
) \
1755 bc-opcode.h bc-typecd.h bc-typecd.def
1757 bi-arity
: bi-arity.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1758 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1759 bi-arity.o
$(BI_OBJ
) $(HOST_LIBS
)
1760 bi-opcode
: bi-opcode.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1761 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1762 bi-opcode.o
$(BI_OBJ
) $(HOST_LIBS
)
1763 bi-opname
: bi-opname.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1764 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1765 bi-opname.o
$(BI_OBJ
) $(HOST_LIBS
)
1767 $(srcdir)/bi-parser.h
: $(srcdir)/bi-parser.c
1768 $(srcdir)/bi-parser.c
: $(srcdir)/bi-parser.y
1769 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d bi-parser.y
-o bi-parser.c
1771 bi-parser.o
: $(srcdir)/bi-parser.c bi-defs.h
$(build_xm_file
)
1772 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1773 $(srcdir)/bi-parser.c
1774 bi-lexer.o
: bi-lexer.c
$(srcdir)/bi-parser.h
$(build_xm_file
)
1775 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1776 $(srcdir)/bi-lexer.c
1777 bi-arity.o
: bi-arity.c bi-defs.h
$(build_xm_file
)
1778 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1779 $(srcdir)/bi-arity.c
1780 bi-opcode.o
: bi-opcode.c bi-defs.h
$(build_xm_file
)
1781 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1782 $(srcdir)/bi-opcode.c
1783 bi-opname.o
: bi-opname.c bi-defs.h
$(build_xm_file
)
1784 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1785 $(srcdir)/bi-opname.c
1786 bi-reverse.o
: bi-reverse.c bi-defs.h
1787 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1788 $(srcdir)/bi-reverse.c
1790 bc-arity.h
: s-bcarity
; @true
1791 s-bcarity
: $(srcdir)/bytecode.def bi-arity
$(srcdir)/move-if-change
1792 .
/bi-arity
< $(srcdir)/bytecode.def
>tmp-bc-arity.h
1793 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1796 bc-opcode.h
: s-bcopcode
; @true
1797 s-bcopcode
: $(srcdir)/bytecode.def bi-opcode
$(srcdir)/move-if-change
1798 .
/bi-opcode
< $(srcdir)/bytecode.def
>tmp-bcopcd.h
1799 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1802 bc-opname.h
: s-bcopname
; @true
1803 s-bcopname
: $(srcdir)/bytecode.def bi-opname
$(srcdir)/move-if-change
1804 .
/bi-opname
< $(srcdir)/bytecode.def
>tmp-bcopnm.h
1805 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1808 bytecode.
mostlyclean:
1809 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1811 bytecode.
distclean bytecode.
clean: bytecode.
mostlyclean
1812 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1814 bytecode.maintainer-clean
: bytecode.
clean
1815 -rm -f bi-parser.c bi-parser.h
1817 # Remake internationalization support.
1819 intl.o
: intl.c intl.h gansidecl.h Makefile
1820 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1821 -DLOCALEDIR
=\"$(localedir
)\" \
1822 -c
`echo $(srcdir)/intl.c | sed 's,^\./,,'`
1824 # This is needed to when doing a partial build after a `make clean'.
1825 # libintl.a does not depend on intl.all,
1826 # as that would force a lot of recompiling.
1827 $(top_builddir
)/intl
/libintl.a
:
1828 @echo
"$(MAKE) intl.all"
1829 @
$(MAKE
) $(FLAGS_TO_PASS
) intl.
all
1831 # Make sure all the headers are there for xgettext to scan.
1832 # FIXME: extend the language interface
1833 # so that we needn't jump into language build internals like this.
1834 intl.
all intl.
install intl.distdir
: \
1835 $(srcdir)/bi-parser.c
$(srcdir)/bi-parser.h
$(srcdir)/c-gperf.h \
1836 $(srcdir)/c-parse.c
$(srcdir)/c-parse.h
$(srcdir)/cexp.c \
1837 $(srcdir)/cp
/parse.c
$(srcdir)/objc
/objc-parse.c
1838 $(srcdir)/cp
/parse.c
:
1839 @cp_srcdir
=`sed -n 's/^srcdir[ ]*=[ ]*//p' cp/Makefile` && \
1840 echo
"cd cp && $(MAKE) $$cp_srcdir/parse.c" && \
1842 $(MAKE
) $(SUBDIR_FLAGS_TO_PASS
) $(CXX_FLAGS_TO_PASS
) \
1845 intl.
all intl.
install intl.
uninstall intl.distdir \
1846 intl.
mostlyclean intl.
clean intl.
distclean intl.maintainer-clean
:
1847 @for d in
$(INTL_SUBDIRS
); do \
1848 target
=`expr $@ : 'intl.\(.*\)'` && \
1849 echo
"(cd $$d && $(MAKE) $$target)" && \
1850 (cd
$$d && AWK
='$(AWK)' $(MAKE
) $(SUBDIR_FLAGS_TO_PASS
) $$target); \
1853 # intl.distdir doesn't copy the intl makefiles (since they aren't distributed),
1854 # but we need them for the `make extraclean' in distdir-finish.
1856 for d in
$(INTL_SUBDIRS
); do \
1857 ln
$$d/Makefile tmp
/$$d || cp
$$d/Makefile tmp
/$$d || exit
; \
1860 # Remake cpp and protoize.
1862 # Making the preprocessor
1865 ln
$(CCCP
)$(exeext
) cpp$(exeext
) > /dev
/null
2>&1 \
1866 || cp
$(CCCP
)$(exeext
) cpp$(exeext
)
1867 CCCP_OBJS
= cccp.o cexp.o intl.o
prefix.o version.o mbchar.o
1868 cccp
: $(CCCP_OBJS
) $(LIBDEPS
)
1869 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(CCCP_OBJS
) $(LIBS
)
1870 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
) system.h mbchar.h gansidecl.h
1871 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1872 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1873 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1875 cccp.o
: cccp.c
$(CONFIG_H
) system.h mbchar.h intl.h pcp.h version.c \
1877 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1878 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1879 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1880 -DOLD_GPLUSPLUS_INCLUDE_DIR
=\"$(old_gxx_include_dir
)\" \
1881 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1882 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1883 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1884 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1886 CPPMAIN_OBJS
= cppmain.o cppalloc.o cpperror.o cppexp.o cpphash.o cpplib.o \
1887 intl.o
prefix.o version.o mbchar.o
1888 cppmain
: $(CPPMAIN_OBJS
) $(LIBDEPS
)
1889 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(CPPMAIN_OBJS
) $(LIBS
)
1891 cppmain.o
: cppmain.c
$(CONFIG_H
) cpplib.h intl.h
1893 cpplib.o
: cpplib.c
$(CONFIG_H
) cpplib.h cpphash.h intl.h config.status
1894 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1895 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1896 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1897 -DOLD_GPLUSPLUS_INCLUDE_DIR
=\"$(old_gxx_include_dir
)\" \
1898 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1899 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1900 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1901 -c
`echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1903 cpperror.o
: cpperror.c
$(CONFIG_H
) cpplib.h intl.h
1905 cppexp.o
: cppexp.c
$(CONFIG_H
) cpplib.h
1907 cpphash.o
: cpphash.c cpplib.h cpphash.h
1909 cppalloc.o
: cppalloc.c
$(CONFIG_H
)
1911 # Note for the stamp targets, we run the program `true' instead of
1912 # having an empty command (nothing following the semicolon).
1914 proto
: config.status protoize unprotoize SYSCALLS.c.X
1916 PROTO_OBJS
= choose-temp.o getopt.o getopt1.o getpwd.o \
1917 intl.o pexecute.o version.o
1919 protoize
: protoize.o
$(PROTO_OBJS
) $(LIBDEPS
)
1920 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ protoize.o
$(PROTO_OBJS
) $(LIBS
)
1921 protoize.o
: s-proto
; @true
1923 unprotoize
: unprotoize.o
$(OTHER_PROTO_OBJS
) $(LIBDEPS
)
1924 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ unprotoize.o
$(PROTO_OBJS
) $(LIBS
)
1925 unprotoize.o
: s-proto
; @true
1927 s-proto
: protoize.c getopt.h
$(CONFIG_H
) intl.h
1928 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1929 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1930 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1931 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1932 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1933 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1934 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1935 -DUNPROTOIZE
$(srcdir)/protoize.c
1936 mv protoize
$(objext
) unprotoize
$(objext
)
1937 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1938 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1939 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1940 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1941 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1942 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1943 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1944 $(srcdir)/protoize.c
1947 getopt.o
: getopt.c getopt.h
1948 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1949 getopt1.o
: getopt1.c getopt.h
1950 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1952 # This info describes the target machine, so compile with GCC just built.
1953 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) \
1955 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1956 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1957 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1958 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
1959 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1962 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1963 -rm -f tmp-proto.
[cso
]
1964 cp
$(srcdir)/protoize.c tmp-proto.c
1965 chmod u
+w tmp-proto.c
1966 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1967 $(CFLAGS) $(INCLUDES) \
1968 -DGCC_INCLUDE_DIR=0 \
1969 -DGPLUSPLUS_INCLUDE_DIR=0 \
1970 -DCROSS_INCLUDE_DIR=0 \
1971 -DTOOL_INCLUDE_DIR=0 \
1972 -DSTD_PROTO_DIR=0" tmp-proto.c
1973 @echo
'**********' Expect
400 lines of differences.
1974 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
1975 -wc
-l tmp-proto.diff
1976 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1977 $(CFLAGS) $(INCLUDES) \
1978 -DGCC_INCLUDE_DIR=0 \
1979 -DGPLUSPLUS_INCLUDE_DIR=0 \
1980 -DCROSS_INCLUDE_DIR=0 \
1981 -DTOOL_INCLUDE_DIR=0 \
1982 -DSTD_PROTO_DIR=0" tmp-proto.c
1983 @echo Expect zero differences.
1984 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1985 -rm -f tmp-proto.
[cs
] tmp-proto
$(objext
)
1987 gcov.o
: gcov.c gcov-io.h intl.h
1989 GCOV_OBJS
= gcov.o intl.o
1990 gcov
: $(GCOV_OBJS
) $(LIBDEPS
)
1991 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) $(GCOV_OBJS
) $(LIBS
) -o
$@
1993 # Build the include directory. The stamp files are stmp-* rather than
1994 # s-* so that mostlyclean does not force the include directory to
1997 # Build the include directory except for float.h (which depends upon
1999 stmp-int-hdrs
: stmp-fixinc
$(USER_H
) xlimits.h
2000 # Copy in the headers provided with gcc.
2001 # The sed command gets just the last file name component;
2002 # this is necessary because VPATH could add a dirname.
2003 # Using basename would be simpler, but some systems don't have it.
2004 # The touch command is here to workaround an AIX/Linux NFS bug.
2005 for file in ..
$(USER_H
); do \
2006 if
[ X
$$file != X..
]; then \
2007 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2008 touch
include/$$realfile; \
2009 rm -f
include/$$realfile; \
2010 cp
$$file include; \
2011 chmod a
+r
include/$$realfile; \
2014 rm -f
include/limits.h
2015 cp xlimits.h
include/limits.h
2016 chmod a
+r
include/limits.h
2017 # Install the README
2018 rm -f
include/README
2019 cp
$(srcdir)/README-fixinc
include/README
2020 chmod a
+r
include/README
2023 # Build the complete include directory, including float.h.
2024 stmp-headers
: stmp-int-hdrs gfloat.h
2025 rm -f
include/float.h
2026 if
[ -s gfloat.h
]; then \
2027 cp gfloat.h
include/float.h
&& \
2028 chmod a
+r
include/float.h
; \
2032 # Build fixed copies of system files.
2033 stmp-fixinc
: $(FIXINCLUDES
) gsyslimits.h
2037 if
[ x
$(FIXINCLUDES
) != xMakefile.in
]; \
2039 for
dir in
$(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
); do \
2042 $(SHELL
) $(srcdir)/$(FIXINCLUDES
) include $$dir; \
2047 rm -f
include/syslimits.h
2048 if
[ -f
include/limits.h
]; then \
2049 mv
include/limits.h
include/syslimits.h
; \
2051 cp
$(srcdir)/gsyslimits.h
include/syslimits.h
; \
2053 chmod a
+r
include/syslimits.h
2056 # Files related to the fixproto script.
2058 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
2059 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
2061 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
2062 mv tmp-deduced.h deduced.h
2064 GEN_PROTOS_OBJS
= gen-protos.o cppalloc.o cpperror.o cppexp.o \
2065 cpphash.o cpplib.o
prefix.o scan.o version.o
2066 gen-protos
: $(GEN_PROTOS_OBJS
) $(HOST_LIBDEPS
)
2067 ${HOST_CC} $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
2068 $(GEN_PROTOS_OBJS
) $(HOST_LIBS
)
2070 gen-protos.o
: gen-protos.c scan.h
$(build_xm_file
)
2071 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gen-protos.c
2073 scan.o
: scan.c scan.h
$(build_xm_file
)
2074 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan.c
2076 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
2077 cat deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
2078 mv tmp-fixtmp.c fixtmp.c
2079 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
2080 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
2081 | .
/gen-protos
>xsys-protos.hT
2082 mv xsys-protos.hT xsys-protos.h
2085 fix-header
: fix-header.o scan-decls.o scan.o xsys-protos.h
$(HOST_LIBDEPS
) \
2086 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o
prefix.o version.o
2087 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ fix-header.o \
2088 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o
prefix.o \
2089 version.o cppexp.o
$(HOST_LIBS
)
2091 fix-header.o
: fix-header.c obstack.h scan.h xsys-protos.h
$(build_xm_file
)
2092 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/fix-header.c
2094 scan-decls.o
: scan-decls.c scan.h cpplib.h
$(build_xm_file
)
2095 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan-decls.c
2097 # stmp-fixproto depends on this, not on fix-header directly.
2098 # The idea is to make sure fix-header gets built,
2099 # but not rerun fixproto after each stage
2100 # just because fix-header's mtime has changed.
2101 fixhdr.ready
: fix-header
2102 -if
[ -f fixhdr.ready
] ; then \
2105 touch fixhdr.ready
; \
2108 # stmp-headers is to make sure fixincludes has already finished.
2109 # The if statement is so that we don't run fixproto a second time
2110 # if it has already been run on the files in `include'.
2111 stmp-fixproto
: fixhdr.ready fixproto stmp-headers
2112 @echo
"Various warnings and error messages from fixproto are normal"
2113 -if
[ -d
include ] ; then true
; else mkdir
include; chmod a
+rx
include; fi
2114 -if
[ -f
include/fixed
] ; then true
; \
2116 : This line works around a
'make' bug in BSDI
1.1.
; \
2117 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
2118 $(SHELL
) ${srcdir}/fixproto
include include $(SYSTEM_HEADER_DIR
); \
2119 touch
include/fixed
; \
2123 # Remake the info files.
2126 info: $(srcdir)/cpp.
info $(srcdir)/gcc.
info lang.
info
2128 $(srcdir)/cpp.
info: cpp.texi
2129 cd
$(srcdir); $(MAKEINFO
) $(MAKEINFOFLAGS
) cpp.texi
2131 $(srcdir)/gcc.
info: gcc.texi extend.texi
install.texi invoke.texi \
2132 md.texi rtl.texi tm.texi gcov.texi
2133 cd
$(srcdir); $(MAKEINFO
) $(MAKEINFOFLAGS
) gcc.texi
2135 dvi: $(srcdir)/gcc.
dvi $(srcdir)/cpp.
dvi lang.
dvi
2137 # This works with GNU Make's default rule.
2138 $(srcdir)/gcc.
dvi: gcc.texi extend.texi
install.texi invoke.texi \
2139 md.texi rtl.texi tm.texi gcov.texi
2142 # This works with GNU Make's default rule.
2143 $(srcdir)/cpp.
dvi: cpp.texi
2146 $(srcdir)/INSTALL
: install1.texi
install.texi
2147 cd
$(srcdir); $(MAKEINFO
) -D INSTALLONLY
--no-header \
2148 --no-split install1.texi
-o INSTALL
2150 # Deletion of files made during compilation.
2151 # There are four levels of this:
2152 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
2153 # `mostlyclean' is useful while working on a particular type of machine.
2154 # It deletes most, but not all, of the files made by compilation.
2155 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
2156 # `clean' deletes everything made by running `make all'.
2157 # `distclean' also deletes the files made by config.
2158 # `maintainer-clean' also deletes everything that could be regenerated
2159 # automatically, except for `configure'.
2160 # We remove as much from the language subdirectories as we can
2161 # (less duplicated code).
2164 mostlyclean: bytecode.
mostlyclean intl.
mostlyclean lang.
mostlyclean
2165 -rm -f
$(STAGESTUFF
)
2166 # Delete the temporary source copies for cross compilation.
2167 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
2168 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
2169 -rm -f
$(HOST_PREFIX_1
)obstack.c
2170 # Delete the temp files made in the course of building libgcc.a.
2171 -rm -f tmplibgcc
* tmpcopy xlimits.h libgcc1-test
2172 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
2173 # Delete other built files.
2174 -rm -f t-float.h-cross xsys-protos.hT fp-bit.c dp-bit.c
2175 # Delete the stamp and temporary files.
2176 -rm -f s-
* tmp-
* stamp-
* stmp-
*
2177 -rm -f
*/stamp-
* */tmp-
*
2178 # Delete debugging dump files.
2179 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
2180 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
*.addressof
*.regmove
2181 -rm -f
*/*.greg
*/*.lreg
*/*.combine
*/*.flow
*/*.cse
*/*.jump
*/*.rtl
2182 -rm -f
*/*.tree
*/*.loop
*/*.dbr
*/*.jump2
*/*.sched
*/*.cse2
2183 -rm -f
*/*.sched2
*/*.stack
*/*.regmove
2184 # Delete some files made during installation.
2185 -rm -f specs gfloat.h float.h-
* enquire SYSCALLS.c.X SYSCALLS.c
2186 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
2187 # Delete files generated for fixproto
2188 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
2189 gen-protos fixproto.list fixtmp.
* fixhdr.ready
2190 # Delete unwanted output files from TeX.
2191 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
2192 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
2193 # Delete sorted indices we don't actually use.
2194 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
2195 # Delete core dumps.
2199 # Delete all files made by compilation
2200 # that don't exist in the distribution.
2201 clean: mostlyclean bytecode.
clean intl.
clean lang.
clean
2202 # It may not be quite desirable to delete unprotoize.c here,
2203 # but the spec for `make clean' requires it.
2204 # Using unprotoize.c is not quite right in the first place,
2205 # but what better way is there?
2206 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
2210 -if
[ -f md.pre-cpp
]; then \
2213 # Delete the include directory.
2215 # Delete files used by the "multilib" facility (including libgcc subdirs).
2216 -rm -f multilib.h tmpmultilib
*
2217 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
2218 rm -rf
$(MULTILIB_DIRNAMES
); \
2219 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
2220 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
2223 # Delete all files that users would normally create
2224 # while building and installing GCC.
2225 INTL_DISTCLEAN
= intl.
distclean
2226 distclean: clean bytecode.
distclean $(INTL_DISTCLEAN
) lang.
distclean
2227 -rm -f tm.h config.h auto-config.h tconfig.h hconfig.h md cstamp-h
2228 -rm -f config.status config.run config.cache config.bak
2229 -rm -f Make-lang Make-hooks Make-host Make-target
2230 -rm -f Makefile specs.h options.h
*.oaux
2231 -rm -fr stage1 stage2 stage3 stage4
2232 -rm -f
*/stage1
*/stage2
*/stage3
*/stage4
*/include
2233 -rm -f c-parse.output
2236 -rm -f intl
/libintl.h libintl.h
2238 # Delete anything likely to be found in the source directory
2239 # that shouldn't be in the distribution.
2240 extraclean
: distclean lang.extraclean
2241 -rm -rf
=* .
/"#"* *~
* config
/=* config
/"#"* config
/*~
*
2242 -rm -f patch
* *.orig
*.rej config
/patch
* config
/*.orig config
/*.rej
2243 -rm -f config
/*/=* config
/*/"#"* config
/*/*~
*
2244 -rm -f config
/*/*.orig config
/*/*.rej
2245 -rm -f
*.
dvi *.ps
*.oaux
*.d
*.
[zZ
] *.gz
2246 -rm -f
*.
tar *.xtar
*diff
*.diff.
* *.
tar.
* *.xtar.
* *diffs
2247 -rm -f
*lose config
/*lose config
/*/*lose
2248 -rm -f
*.s
*.s
[0-9] *.i config
/ChangeLog
2249 -rm -f y.tab.c
yacc.
*
2250 -rm -f
*/=* */"#"* */*~
*
2251 -rm -f
*/patch
* */*.orig
*/*.rej
2252 -rm -f
*/*.
dvi */*.oaux
*/*.d
*/*.
[zZ
] */*.gz
2253 -rm -f
*/*.
tar */*.xtar
*/*diff
*/*.diff.
* */*.
tar.
* */*.xtar.
* */*diffs
2254 -rm -f
*/*lose
*/*.s
*/*.s
[0-9] */*.i
2256 # Get rid of every file that's generated from some other file, except for `configure'.
2257 # Most of these files ARE PRESENT in the GCC distribution.
2258 # We define INTL_DISTCLEAN to be empty in the submake, so that
2259 # we don't descend into intl after its makefile has been removed.
2261 @echo
'This command is intended for maintainers to use; it'
2262 @echo
'deletes files that may need special tools to rebuild.'
2263 $(MAKE
) INTL_DISTCLEAN
= distclean bytecode.maintainer-clean \
2264 intl.maintainer-clean lang.maintainer-clean
2265 -rm -f c-parse.y c-gperf.h
2266 -rm -f c-parse.c c-parse.h c-parse.output
2267 -rm -f cexp.c cexp.output TAGS
2268 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
2269 -rm -f gcc.
info* gcc.??s gcc.
*aux
2271 # Entry points `install' and `uninstall'.
2272 # Also use `install-collect2' to install collect2 when the config files don't.
2274 # The semicolon is to prevent the install.sh -> install default rule
2275 # from doing anything. Having it run true helps avoid problems and
2276 # noise from versions of make which don't like to have null commands.
2277 install: $(INSTALL_TARGET
) ; @true
2279 # Copy the compiler files into directories where they will be run.
2280 # Install the driver last so that the window when things are
2282 install-normal
: install-common
$(INSTALL_HEADERS
) $(INSTALL_LIBGCC
) \
2283 install-man install-info intl.
install lang.install-normal install-driver
2285 # Do nothing while making gcc with a cross-compiler. The person who
2286 # makes gcc for the target machine has to know how to put a complete
2287 # gcc together by hand.
2288 install-build
: force
2289 @echo You have to
install gcc on your target machine by hand.
2291 # Run this on the target machine
2292 # to finish installation of cross compiler.
2293 install-cross-rest
: install-float-h-cross
2295 # Install float.h for cross compiler.
2296 # Run this on the target machine!
2297 install-float-h-cross
: installdirs
2298 # if [ -f enquire ] ; then true; else false; fi
2299 # Note: don't use -. We should fail right away if enquire was not made.
2300 .
/enquire
-f
> $(tmpdir
)/float.h
2301 -rm -f
$(libsubdir
)/include/float.h
2302 $(INSTALL_DATA
) $(tmpdir
)/float.h
$(libsubdir
)/include/float.h
2303 -rm -f
$(tmpdir
)/float.h
2304 chmod a-x
$(libsubdir
)/include/float.h
2306 # Create the installation directories.
2308 -if
[ -d
$(prefix) ] ; then true
; else mkdir
$(prefix) ; chmod a
+rx
$(prefix) ; fi
2309 -if
[ -d
$(exec_prefix) ] ; then true
; else mkdir
$(exec_prefix) ; chmod a
+rx
$(exec_prefix) ; fi
2310 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; chmod a
+rx
$(libdir) ; fi
2311 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; chmod a
+rx
$(libdir)/gcc-lib
; fi
2312 # This dir isn't currently searched by cpp.
2313 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2314 -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
2315 -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
2316 -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
2317 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; chmod a
+rx
$(bindir) ; fi
2318 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; chmod a
+rx
$(includedir) ; fi
2319 -if
[ -d
$(tooldir
) ] ; then true
; else mkdir
$(tooldir
) ; chmod a
+rx
$(tooldir
) ; fi
2320 -if
[ -d
$(assertdir
) ] ; then true
; else mkdir
$(assertdir
) ; chmod a
+rx
$(assertdir
) ; fi
2321 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; chmod a
+rx
$(infodir) ; fi
2322 # We don't use mkdir -p to create the parents of mandir,
2323 # because some systems don't support it.
2324 # Instead, we use this technique to create the immediate parent of mandir.
2325 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2326 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; chmod a
+rx
$$parent ; fi
2327 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; chmod a
+rx
$(mandir) ; fi
2329 # Install the compiler executables built during cross compilation.
2330 install-common
: native
installdirs $(EXTRA_PARTS
) lang.install-common
2331 for file in
$(COMPILERS
); do \
2332 if
[ -f
$$file ] ; then \
2333 rm -f
$(libsubdir
)/$$file; \
2334 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2338 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
2339 if
[ x
"$$file" != x..
]; then \
2340 rm -f
$(libsubdir
)/$$file; \
2341 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2344 for file in
$(EXTRA_PARTS
) ..
; do \
2345 if
[ x
"$$file" != x..
]; then \
2346 rm -f
$(libsubdir
)/$$file; \
2347 $(INSTALL_DATA
) $$file $(libsubdir
)/$$file; \
2348 chmod a-x
$(libsubdir
)/$$file; \
2351 # Don't mess with specs if it doesn't exist yet.
2352 -if
[ -f specs
] ; then \
2353 rm -f
$(libsubdir
)/specs
; \
2354 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
; \
2355 chmod a-x
$(libsubdir
)/specs
; \
2357 # Install protoize if it was compiled.
2358 -if
[ -f protoize
$(exeext
) ]; \
2360 rm -f
$(bindir)/protoize
$(exeext
); \
2361 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(bindir)/protoize
$(exeext
); \
2362 rm -f
$(bindir)/unprotoize
$(exeext
); \
2363 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(bindir)/unprotoize
$(exeext
); \
2364 rm -f
$(libsubdir
)/SYSCALLS.c.X
; \
2365 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
; \
2366 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
; \
2368 -rm -f
$(libsubdir
)/cpp$(exeext
)
2369 $(INSTALL_PROGRAM
) cpp$(exeext
) $(libsubdir
)/cpp$(exeext
)
2370 # Install gcov if it was compiled.
2371 -if
[ -f gcov
$(exeext
) ]; \
2373 rm -f
$(bindir)/gcov
$(exeext
); \
2374 $(INSTALL_PROGRAM
) gcov
$(exeext
) $(bindir)/gcov
$(exeext
); \
2375 chmod a
+x
$(bindir)/gcov
$(exeext
); \
2378 # Install the driver program as $(target_alias)-gcc
2379 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2380 install-driver
: xgcc
2381 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2382 rm -f
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2383 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2384 if
[ -d
$(tooldir
)/bin
/.
] ; then \
2385 rm -f
$(tooldir
)/bin
/gcc
$(exeext
); \
2386 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(tooldir
)/bin
/gcc
$(exeext
); \
2389 rm -f
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2390 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2391 rm -f
$(bindir)/$(target_alias
)-gcc-1
$(exeext
); \
2392 ln
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target_alias
)-gcc-1
$(exeext
) \
2394 || cp
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target_alias
)-gcc-1
$(exeext
); \
2395 mv
$(bindir)/$(target_alias
)-gcc-1
$(exeext
) $(bindir)/$(target_alias
)-gcc
$(exeext
); \
2398 # Install the info files.
2399 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
2400 # to do the install. The sed rule was copied from stmp-int-hdrs.
2401 install-info
: doc
installdirs lang.install-info
2402 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2403 for f in
$(srcdir)/cpp.
info* $(srcdir)/gcc.
info*; do \
2404 realfile
=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
2405 $(INSTALL_DATA
) $$f $(infodir)/$$realfile; \
2407 -chmod a-x
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2409 # Install the man pages.
2410 install-man
: installdirs $(srcdir)/gcc
.1 $(srcdir)/cccp
.1 lang.install-man
2411 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2412 rm -f
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2413 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2414 chmod a-x
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2416 rm -f
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2417 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2418 chmod a-x
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2420 -rm -f
$(mandir)/cccp
$(manext)
2421 -$(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
2422 -chmod a-x
$(mandir)/cccp
$(manext)
2424 # Install the library.
2425 install-libgcc
: libgcc.a
installdirs
2426 -if
[ -f libgcc.a
] ; then \
2427 rm -f
$(libsubdir
)/libgcc.a
; \
2428 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
2429 if
$(RANLIB_TEST
) ; then \
2430 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
2431 chmod a-x
$(libsubdir
)/libgcc.a
; \
2434 # Install multiple versions of libgcc.a.
2435 install-multilib
: stmp-multilib
installdirs
2436 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
2437 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2438 if
[ -d
$(libsubdir
)/$${dir} ]; then true
; else mkdir
$(libsubdir
)/$${dir}; chmod a
+rx
$(libsubdir
)/$${dir}; fi
; \
2439 for f in libgcc.a
$(EXTRA_MULTILIB_PARTS
); do \
2440 rm -f
$(libsubdir
)/$${dir}/$${f}; \
2441 $(INSTALL_DATA
) $${dir}/$${f} $(libsubdir
)/$${dir}/$${f}; \
2443 if
$(RANLIB_TEST
); then \
2444 (cd
$(libsubdir
)/$${dir}; $(RANLIB
) libgcc.a
); else true
; fi
; \
2445 chmod a-x
$(libsubdir
)/$${dir}/libgcc.a
; \
2448 # Install all the header files built in the include subdirectory.
2449 install-headers
: install-include-dir
$(INSTALL_HEADERS_DIR
) $(INSTALL_ASSERT_H
)
2450 # Fix symlinks to absolute paths in the installed include directory to
2451 # point to the installed directory, not the build directory.
2452 -files
=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2453 if
[ $$?
-eq
0 ]; then \
2454 dir=`cd include; pwd`; \
2455 for i in
$$files; do \
2456 dest
=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2457 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2458 rm -f
$(libsubdir
)/include/$$i; \
2459 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir
)/include/$$i; \
2464 # Create or recreate the gcc private include file directory.
2465 install-include-dir
: installdirs
2466 -rm -rf
$(libsubdir
)/include
2467 mkdir
$(libsubdir
)/include
2468 -chmod a
+rx
$(libsubdir
)/include
2470 # Install the include directory using tar.
2471 install-headers-tar
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2473 tar -cf
- .
; exit
0) |
(cd
$(libsubdir
)/include; tar $(TAROUTOPTS
) - )
2474 # /bin/sh on some systems returns the status of the first tar,
2475 # and that can lose with GNU tar which always writes a full block.
2476 # So use `exit 0' to ignore its exit status.
2478 # Install the include directory using cpio.
2479 install-headers-cpio
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2480 (cd
include; find .
-print) |
(cd
include; cpio
-pdum
$(libsubdir
)/include)
2482 # Put assert.h where it won't override GNU libc's assert.h.
2483 # It goes in a dir that is searched after GNU libc's headers;
2484 # thus, the following conditionals are no longer needed.
2485 # But it's not worth deleting them now.
2486 ## Don't replace the assert.h already there if it is not from GCC.
2487 ## This code would be simpler if it tested for -f ... && ! grep ...
2488 ## but supposedly the ! operator is missing in sh on some systems.
2489 install-assert-h
: assert.h
installdirs
2490 if
[ -f
$(assertdir
)/assert.h
]; \
2492 if grep
"__eprintf" $(assertdir
)/assert.h
>/dev
/null
; \
2494 rm -f
$(assertdir
)/assert.h
; \
2495 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2496 chmod a-x
$(assertdir
)/assert.h
; \
2500 rm -f
$(assertdir
)/assert.h
; \
2501 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2502 chmod a-x
$(assertdir
)/assert.h
; \
2505 # Use this target to install the program `collect2' under the name `ld'.
2506 install-collect2
: collect2
installdirs
2507 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(libsubdir
)/ld$(exeext
)
2508 # Install the driver program as $(libsubdir)/gcc for collect2.
2509 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(libsubdir
)/gcc
$(exeext
)
2511 # Cancel installation by deleting the installed files.
2512 uninstall: intl.
uninstall lang.
uninstall
2513 -rm -rf
$(libsubdir
)
2514 -rm -rf
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2515 -rm -rf
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
)
2516 -rm -rf
$(bindir)/protoize
$(exeext
)
2517 -rm -rf
$(bindir)/unprotoize
$(exeext
)
2518 -rm -rf
$(bindir)/gcov
$(exeext
)
2519 -rm -rf
$(mandir)/$(GCC_INSTALL_NAME
)$(manext)
2520 -rm -rf
$(mandir)/$(GCC_CROSS_NAME
)$(manext)
2521 -rm -rf
$(mandir)/cccp
$(manext)
2522 -rm -rf
$(mandir)/protoize
$(manext)
2523 -rm -rf
$(mandir)/unprotoize
$(manext)
2524 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2526 # These exist for maintenance purposes.
2528 # Update the tags table.
2532 mv
-f c-parse.
[ch
] cexp.c
=*.
[chy
] tmp-tags
; \
2533 etags
*.y
*.h
*.c
; \
2537 # Create the distribution tar.gz file.
2539 gzip
--best
< tmp-gcc.xtar
> tmp-gcc.xtar.gz
2540 mv tmp-gcc.xtar.gz gcc-
$(version
).
tar.gz
2542 tmp-gcc.xtar
: distdir
2543 # Make the distribution.
2544 tar -chf tmp-gcc.xtar gcc-
$(version
)
2547 if
[ -d
$(srcdir)/CVS
]; then cvs
-r update
; fi
2549 # This target exists to do the initial work before the language specific
2551 distdir-start
: doc
$(srcdir)/INSTALL
$(srcdir)/c-parse.y
$(srcdir)/c-gperf.h \
2552 $(srcdir)/c-parse.c
$(srcdir)/cexp.c
$(srcdir)/config.in \
2553 $(srcdir)/bi-parser.h
$(srcdir)/bi-parser.c
$(srcdir)/version.c TAGS
2554 @case
'$(USE_NLS)' in \
2556 *) echo
"configure with --enable-nls before making a distribution"; \
2559 @if grep
-s
"for version ${mainversion}" gcc.texi
> /dev
/null
; \
2561 else echo
"You must update the version number in \`gcc.texi'"; sleep
10;\
2563 # Update the version number in README
2564 $(AWK
) '$$1 " " $$2 " " $$3 == "This directory contains" \
2565 { $$6 = version; print $$0 } \
2566 $$1 " " $$2 " " $$3 != "This directory contains"' \
2567 version
=$(version
) README
> tmp.README
2568 mv tmp.README README
2569 -rm -rf gcc-
$(version
) tmp
2570 # Put all the files in a temporary subdirectory
2571 # which has the name that we want to have in the tar file.
2577 for file in
*[0-9a-zA-Z
+]; do \
2578 ln
$$file tmp
> /dev
/null
2>&1 || cp
$$file tmp
; \
2581 for file in
*[0-9a-zA-Z
+]; do \
2582 if
test -d
$$file && test "$$file" != RCS
&& test "$$file" != CVS
; then \
2583 mkdir ..
/tmp
/config
/$$file; \
2585 for subfile in
*[0-9a-zA-Z
+]; do \
2586 ln
$$subfile ..
/..
/tmp
/config
/$$file >/dev
/null
2>&1 \
2587 || cp
$$subfile ..
/..
/tmp
/config
/$$file; \
2591 ln
$$file ..
/tmp
/config
>/dev
/null
2>&1 \
2592 || cp
$$file ..
/tmp
/config
; \
2596 for file in
*[0-9a-zA-Z
+]; do \
2597 ln
$$file ..
/tmp
/ginclude
>/dev
/null
2>&1 \
2598 || cp
$$file ..
/tmp
/ginclude
; \
2602 # Finish making `distdir', after the languages have done their thing.
2604 mv tmp gcc-
$(version
)
2605 # Get rid of everything we don't want in the distribution. We'd want
2606 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2608 cd gcc-
$(version
); make extraclean distdir-check VERSION_DEP
=
2611 ($(AWK
) '/^[^#]/{print} /^#[A-Za-z]/{print substr($$1, 2)}' |
sort) \
2612 < po
/POTFILES.in
> tmp.POTFILES
2613 ls
[A-Za-z
]*.
[ch
] [a-z
]*/[A-Za-z
]*.
[ch
] \
2614 [a-z
]*/[a-z
]*/[A-Za-z
]*.
[ch
] |
sort > tmp.src
2615 diff tmp.POTFILES tmp.src ||
{ \
2616 echo
"po/POTFILES.in and sources do not match -- please fix"; \
2621 distdir
: distdir-cvs distdir-start intl.distdir intl.distdir-fixup \
2622 lang.distdir distdir-finish
2624 # make diff oldversion=M.N
2625 # creates a diff file between an older distribution and this one.
2626 # The -P option assumes this is GNU diff.
2628 diff
-rc2P
-x c-parse.y
-x c-parse.c
-x c-parse.h
-x c-gperf.h \
2629 -x cexp.c
-x bi-parser.c
-x bi-parser.h
-x TAGS
-x INSTALL \
2630 -x configure
-x config.in \
2631 -x
"gcc.??" -x
"gcc.??s" -x gcc.aux
-x
"gcc.info*" \
2632 -x
"cpp.??" -x
"cpp.??s" -x
cpp.aux
-x
"cpp.info*" \
2633 $(LANG_DIFF_EXCLUDES
) \
2634 gcc-
$(oldversion
) gcc-
$(version
) > gcc-
$(oldversion
)-$(version
).diff
2637 # Only build the C compiler for stage1, because that is the only one that
2638 # we can guarantee will build with the native compiler, and also it is the
2639 # only thing useful for building stage2.
2640 $(MAKE
) CC
="$(CC)" libdir=$(libdir) LANGUAGES
="$(BOOT_LANGUAGES)"
2642 # This used to define ALLOCA as empty, but that would lead to bad results
2643 # for a subsequent `make install' since that would not have ALLOCA empty.
2644 # To prevent `make install' from compiling alloca.o and then relinking cc1
2645 # because alloca.o is newer, we permit these recursive makes to compile
2646 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2647 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2649 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2652 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2654 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2657 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2659 # Compare the object files in the current directory with those in the
2662 # ./ avoids bug in some versions of tail.
2664 for file in
*$(objext
); do \
2665 tail
+16c .
/$$file > tmp-foo1
; \
2666 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2667 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2669 for
dir in intl
$(SUBDIRS
); do \
2670 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2671 for file in
$$dir/*$(objext
); do \
2672 tail
+16c .
/$$file > tmp-foo1
; \
2673 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2674 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2680 # Similar, but compare with stage3 directory
2682 for file in
*$(objext
); do \
2683 tail
+16c .
/$$file > tmp-foo1
; \
2684 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2685 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2687 for
dir in intl
$(SUBDIRS
); do \
2688 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2689 for file in
$$dir/*$(objext
); do \
2690 tail
+16c .
/$$file > tmp-foo1
; \
2691 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2692 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2698 # Compare the object files in the current directory with those in the
2699 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2700 # running tail and the overhead of twice copying each object file.
2703 for file in
*$(objext
); do \
2704 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2706 for
dir in intl
$(SUBDIRS
); do \
2707 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2708 for file in
$$dir/*$(objext
); do \
2709 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2714 # Similar, but compare with stage3 directory
2716 for file in
*$(objext
); do \
2717 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2719 for
dir in intl
$(SUBDIRS
); do \
2720 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2721 for file in
$$dir/*$(objext
); do \
2722 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2727 # Copy the object files from a particular stage into a subdirectory.
2729 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2730 -for
dir in intl
$(SUBDIRS
) ; \
2732 if
[ -d stage1
/$$dir ] ; then true
; else mkdir stage1
/$$dir ; fi
; \
2734 -mv
$(STAGESTUFF
) stage1
2735 -mv intl
/*$(objext
) stage1
/intl
2736 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2737 # dir will work properly.
2738 -if
[ -f
as$(exeext
) ] ; then
$(LN
) ..
/as$(exeext
) stage1
; else true
; fi
2739 -if
[ -f
ld$(exeext
) ] ; then
$(LN
) ..
/ld$(exeext
) stage1
; else true
; fi
2740 -if
[ -f collect-ld
$(exeext
) ] ; then
$(LN
) ..
/collect-ld
$(exeext
) stage1
; else true
; fi
2741 -rm -f stage1
/libgcc.a
2743 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
2744 -for f in ..
$(EXTRA_MULTILIB_PARTS
); do if
[ x
$${f} != x..
]; then \
2745 cp stage1
/$${f} .
; \
2748 stage1
: force stage1-start lang.stage1
2751 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2752 -for
dir in intl
$(SUBDIRS
) ; \
2754 if
[ -d stage2
/$$dir ] ; then true
; else mkdir stage2
/$$dir ; fi
; \
2756 -mv
$(STAGESTUFF
) stage2
2757 -mv intl
/*$(objext
) stage2
/intl
2758 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2759 # dir will work properly.
2760 -if
[ -f
as$(exeext
) ] ; then
$(LN
) ..
/as$(exeext
) stage2
; else true
; fi
2761 -if
[ -f
ld$(exeext
) ] ; then
$(LN
) ..
/ld$(exeext
) stage2
; else true
; fi
2762 -if
[ -f collect-ld
] ; then
$(LN
) ..
/collect-ld
$(exeext
) stage2
; else true
; fi
2763 -rm -f stage2
/libgcc.a
2765 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
2766 -for f in ..
$(EXTRA_MULTILIB_PARTS
); do if
[ x
$${f} != x..
]; then \
2767 cp stage2
/$${f} .
; \
2770 stage2
: force stage2-start lang.stage2
2773 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2774 -for
dir in intl
$(SUBDIRS
) ; \
2776 if
[ -d stage3
/$$dir ] ; then true
; else mkdir stage3
/$$dir ; fi
; \
2778 -mv
$(STAGESTUFF
) stage3
2779 -mv intl
/*$(objext
) stage3
/intl
2780 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2781 # dir will work properly.
2782 -if
[ -f
as$(exeext
) ] ; then
$(LN
) ..
/as$(exeext
) stage3
; else true
; fi
2783 -if
[ -f
ld$(exeext
) ] ; then
$(LN
) ..
/ld$(exeext
) stage3
; else true
; fi
2784 -if
[ -f collect-ld
$(exeext
) ] ; then
$(LN
) ..
/collect-ld
$(exeext
) stage3
; else true
; fi
2785 -rm -f stage3
/libgcc.a
2787 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
2788 -for f in ..
$(EXTRA_MULTILIB_PARTS
); do if
[ x
$${f} != x..
]; then \
2789 cp stage3
/$${f} .
; \
2792 stage3
: force stage3-start lang.stage3
2795 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2796 -for
dir in intl
$(SUBDIRS
) ; \
2798 if
[ -d stage4
/$$dir ] ; then true
; else mkdir stage4
/$$dir ; fi
; \
2800 -mv
$(STAGESTUFF
) stage4
2801 -mv intl
/*$(objext
) stage4
/intl
2802 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2803 # dir will work properly.
2804 -if
[ -f
as$(exeext
) ] ; then
$(LN
) ..
/as$(exeext
) stage4
; else true
; fi
2805 -if
[ -f
ld$(exeext
) ] ; then
$(LN
) ..
/ld$(exeext
) stage4
; else true
; fi
2806 -if
[ -f collect-ld
$(exeext
) ] ; then
$(LN
) ..
/collect-ld
$(exeext
) stage4
; else true
; fi
2807 -rm -f stage4
/libgcc.a
2809 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
2810 -for f in ..
$(EXTRA_MULTILIB_PARTS
); do if
[ x
$${f} != x..
]; then \
2811 cp stage4
/$${f} .
; \
2814 stage4
: force stage4-start lang.stage4
2816 # Copy just the executable files from a particular stage into a subdirectory,
2817 # and delete the object files. Use this if you're just verifying a version
2818 # that is pretty sure to work, and you are short of disk space.
2819 risky-stage1
: stage1
2822 risky-stage2
: stage2
2825 risky-stage3
: stage3
2828 risky-stage4
: stage4
2831 #In GNU Make, ignore whether `stage*' exists.
2832 .PHONY
: stage1 stage2 stage3 stage4
clean maintainer-clean TAGS bootstrap
2833 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4