1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-94, 1995 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, 675 Mass Ave, Cambridge, MA 02139, USA.
20 # The targets for external use include:
21 # all, doc, proto, install, install-cross, install-cross-rest,
22 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
23 # stage1, stage2, stage3, stage4.
25 # Suppress smart makes who think they know how to automake Yacc files
28 # Variables that exist for you to override.
29 # See below for how to change them for certain systems.
31 # List of language subdirectories.
32 # This is overridden by configure.
35 # Selection of languages to be made.
36 # This is overridden by configure.
37 LANGUAGES
= c objective-c proto
43 # Various ways of specifying flags for compilations:
44 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
45 # BOOT_CFLAGS is the value of CFLAGS to pass
46 # to the stage2 and stage3 compilations
47 # XCFLAGS is used for most compilations but not when using the GCC just built.
50 BOOT_CFLAGS
= -O
$(CFLAGS
)
51 # These exists to be overridden by the x-* and t-* files, respectively.
67 # on sysV, define this as cp.
69 # These permit overriding just for certain files.
70 INSTALL_PROGRAM
= $(INSTALL
)
71 INSTALL_DATA
= $(INSTALL
)
74 # For GNUmake: let us decide what gets passed to recursive makes.
77 # Define this as & to perform parallel make on a Sequent.
78 # Note that this has some bugs, and it seems currently necessary
79 # to compile all the gen* files first by hand to avoid erroneous results.
82 # How to invoke ranlib.
84 # Test to use to see whether ranlib exists on the system.
85 RANLIB_TEST
= [ -f
/usr
/bin
/ranlib
-o
-f
/bin
/ranlib
]
87 # Compiler to use for compiling libgcc1.a.
88 # OLDCC should not be the GNU C compiler,
89 # since that would compile typical libgcc1.a functions such as mulsi3
90 # into infinite recursions.
93 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
94 # NOTE: -O does not work on some Unix systems!
97 # Version of ar to use when compiling libgcc1.a.
100 # Target to use when installing include directory. Either
101 # install-headers-tar or install-headers-cpio.
102 INSTALL_HEADERS_DIR
= install-headers-tar
104 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
105 # Usually the one we just built.
106 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
107 GCC_FOR_TARGET
= .
/xgcc
-B.
/
109 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
110 # It omits XCFLAGS, and specifies -B./.
111 # It also specifies -I./include to find, e.g., stddef.h.
112 GCC_CFLAGS
=$(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) -I.
/include
114 # Special flags for compiling enquire.
115 # We disable optimization to make floating point more reliable.
116 ENQUIRE_CFLAGS
= -DNO_MEM
-DNO_LONG_DOUBLE_IO
-O0
117 ENQUIRE_LDFLAGS
= $(LDFLAGS
)
119 # Sed command to transform gcc to installed name. Overwritten by configure.
120 program_transform_name
= -e s
,x
,x
,
121 program_transform_cross_name
= -e s
,^
,$(target
)-,
123 # Tools to use when building a cross-compiler.
124 # These are used because `configure' appends `cross-make'
125 # to the makefile when making a cross-compiler.
127 TARGET_TOOLPREFIX
= $(tooldir
)/bin
/
128 AR_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ar
129 AR_FOR_TARGET_FLAGS
= rc
130 RANLIB_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ranlib
131 RANLIB_TEST_FOR_TARGET
= [ -f
$(TARGET_TOOLPREFIX
)ranlib
]
133 # Dir to search for system headers. Overridden by cross-make.
134 SYSTEM_HEADER_DIR
= /usr
/include
136 # Control whether to run fixproto.
137 STMP_FIXPROTO
= stmp-fixproto
139 # Test to see whether <limits.h> exists in the system header files.
140 LIMITS_H_TEST
= [ -f
$(SYSTEM_HEADER_DIR
)/limits.h
]
142 # There may be a premade insn-attrtab.c for this machine.
143 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
144 # PREMADE_ATTRTAB is the file name of the file to use.
145 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
146 PREMADE_ATTRTAB_MD
= Makefile
# Guaranteed not to cmp equal to md.
149 target
= ...
`configure' substitutes actual target name here.
150 xmake_file= ... `configure
' substitutes actual x- file name here.
151 tmake_file= ... `configure' substitutes actual t- file name here.
152 out_file
= ...
`configure' substitutes actual out file name here.
153 out_object_file= ... `configure
' substitutes actual out object file name here.
154 md_file= ... `configure' substitutes actual md file name here.
155 tm_file
= ...
`configure' substitutes actual tm file name here.
156 build_xm_file= ... `configure
' substitutes actual build xm- file name here.
157 host_xm_file= ... `configure' substitutes actual host xm- file name here.
158 lang_specs_files
= ...
`configure' substitutes actual lang spec file names here.
159 lang_options_files= ... `configure
' puts actual lang options file names here.
160 version=`sed -e 's
/.
*\"\
([^
\"]*\
)[ \"].
*/\
1/' < $(srcdir)/version.c`
161 mainversion=`sed -e 's
/.
*\"\
([0-9]*\.
[0-9]*\
).
*/\
1/' < $(srcdir)/version.c`
163 # Directory where sources are, from where we are.
165 # Common prefix for installation directories.
166 # NOTE: This directory must exist when you start installation.
168 # Directory in which to put localized header files. On the systems with
169 # gcc as the native cc, `local_prefix' may not be
`prefix' which is
171 # NOTE: local_prefix *should not* default from prefix.
172 local_prefix = /usr/local
173 # Directory in which to put host dependent programs and libraries
174 exec_prefix = $(prefix)
175 # Directory in which to put the executable for the command `gcc'
176 bindir = $(exec_prefix)/bin
177 # Directory in which to put the directories used by the compiler.
178 libdir = $(exec_prefix)/lib
179 # Directory in which the compiler finds executables, libraries, etc.
180 libsubdir
= $(libdir)/gcc-lib
/$(target
)/$(version
)
181 # Directory in which the compiler finds g++ includes.
182 gxx_include_dir
= $(libdir)/g
++-include
183 # Directory to search for site-specific includes.
184 includedir = $(local_prefix
)/include
185 # assertdir is overridden in cross-make.
186 # (But this currently agrees with what is in cross-make.)
187 assertdir
= $(tooldir
)/include
188 # where the info files go
189 infodir = $(prefix)/info
190 # Extension (if any) to put in installed man-page filename.
195 # Directory in which to put man pages.
196 mandir = $(prefix)/man
/man1
197 # Directory in which to find other cross-compilation tools and headers.
198 # Used in install-cross.
199 tooldir
= $(exec_prefix)/$(target
)
200 # Dir for temp files.
203 # Additional system libraries to link with.
206 # Change this to a null string if obstacks are installed in the
210 # Specify the rule for actually making libgcc.a,
212 # and the rule for installing it.
213 INSTALL_LIBGCC
= install-libgcc
215 # Specify the rule for actually making libgcc1.a.
216 # The value may be empty; that means to do absolutely nothing
217 # with or for libgcc1.a.
220 # Specify the rule for making libgcc1.a for a cross-compiler.
221 # The default rule assumes that libgcc1.a is supplied by the user.
222 CROSS_LIBGCC1
= libgcc1.cross
224 # Specify the rule for actually making libgcc2.a.
227 # Options to use when compiling libgcc2.a.
228 # -g1 causes output of debug info only for file-scope entities.
229 # we use this here because that should be enough, and also
230 # so that -g1 will be tested.
231 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) -g1
233 # Additional options to use when compiling libgcc2.a.
234 # Some targets override this to -Iinclude
237 # Things which must be built before building libgcc2.a.
238 # Some targets override this to stmp-int-hdrs
241 # Enquire target (This is a variable so that a target can choose not to
245 # libgcc1-test target (must also be overridable for a target)
246 LIBGCC1_TEST
= libgcc1-test
248 # List of extra executables that should be compiled for this target machine
249 # that are used for compiling from source code to object code.
250 # The rules for compiling them should be in the t-* file for the machine.
253 # Like EXTRA_PASSES, but these are used when linking.
256 # List of extra object files that should be compiled for this target machine.
257 # The rules for compiling them should be in the t-* file for the machine.
260 # List of extra object files that should be compiled and linked with
261 # compiler proper (cc1, cc1obj, cc1plus).
264 # List of additional header files to install.
265 # Often this is edited directly by `configure'.
268 # Set this to `ld' to enable use of collect2.
270 # It is convenient for configure to add the assignment at the beginning,
271 # so don't override it here.
273 # List of extra C and assembler files to add to libgcc1.a.
274 # Assembler files should have names ending in `.asm'.
277 # List of extra C and assembler files to add to libgcc2.a.
278 # Assembler files should have names ending in `.asm'.
281 # Default float.h source to use for cross-compiler.
282 CROSS_FLOAT_H
=float.h-cross
284 # Program to convert libraries.
287 # Control whether header files are installed.
288 INSTALL_HEADERS
=install-headers
290 # Options for tar when copying trees. So HPUX can override it.
293 # Select which version of fixincludes to use (I.E. regular versus SVR4)
294 # This value is overridden directly by configure.
295 FIXINCLUDES
=fixincludes
297 # Additional directories of header files to run fixincludes on.
298 # These should be directories searched automatically by default
299 # just as /usr/include is.
300 # *Do not* use this for directories that happen to contain
301 # header files, but are not searched automatically by default.
302 # On most systems, this is empty.
303 OTHER_FIXINCLUDES_DIRS
=
305 # List of things which should already be built whenever we try to use xgcc
306 # to compile anything (without linking).
307 GCC_PASSES
=xgcc cc1
cpp $(EXTRA_PASSES
)
309 # List of things which should already be built whenever we try to use xgcc
311 GCC_PARTS
=$(GCC_PASSES
) $(LIBGCC
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
313 # Directory to link to, when using the target `maketest'.
316 # Guaranteed to not exist when not passing md through cpp.
317 # This value is overridden directly by configure.
318 MD_FILE
= md-cpp-not-used
320 # Flags to use when cross-building GCC.
321 # Prefix to apply to names of object files when using them
322 # to run on the machine we are compiling on.
324 # Prefix to apply to names of object files when compiling them
325 # to run on the machine we are compiling on.
326 # The default for this variable is chosen to keep these rules
327 # out of the way of the other rules for compiling the same source files.
330 HOST_CFLAGS
=$(ALL_CFLAGS
)
332 HOST_LDFLAGS
=$(LDFLAGS
)
333 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
334 HOST_ALLOCA
=$(ALLOCA
)
335 HOST_MALLOC
=$(MALLOC
)
336 HOST_OBSTACK
=$(OBSTACK
)
338 # Actual name to use when installing a native compiler.
339 GCC_INSTALL_NAME
= `t='$(program_transform_name)'; echo gcc | sed $$t`
341 # Actual name to use when installing a cross-compiler.
342 GCC_CROSS_NAME
= `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
344 # Choose the real default target.
347 # Choose the real install target.
348 INSTALL_TARGET
=install-normal
350 # Source for float.h. Overridden by cross-make.
353 # Extra symbols for fixproto to define when parsing headers.
356 # Extra flags to use when compiling crt{begin,end}.o.
359 # End of variables for you to override.
361 # Definition of `all' is here so that new rules inserted by sed
362 # do not specify the default target.
363 # The real definition is under `all.internal' (for native compilers)
364 # or `all.cross' (for cross compilers).
367 # This tells GNU Make version 3 not to put all variables in the environment.
370 # sed inserts variable overrides after the following line.
376 # Now figure out from those variables how to compile and link.
380 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
381 # ??? IN_GCC should be obsolete now.
382 INTERNAL_CFLAGS
= $(CROSS
) -DIN_GCC
384 # This is the variable actually used when we compile.
385 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
)
388 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
390 # Even if ALLOCA is set, don't use it if compiling with GCC.
391 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
392 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
393 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
394 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
396 # Dependency on obstack, alloca, malloc or whatever library facilities
397 # are not installed in the system libraries.
398 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
399 LIBDEPS
= $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
401 # Likewise, for use in the tools that must run on this machine
402 # even if we are cross-building GCC.
403 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
404 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
406 # How to link with both our special library facilities
407 # and the system's installed libraries.
408 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(CLIB
)
410 # Likewise, for use in the tools that must run on this machine
411 # even if we are cross-building GCC.
412 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
415 HOST_RTL
= $(HOST_PREFIX
)rtl.o
416 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
417 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
419 # Specify the directories to be searched for header files.
420 # Both . and srcdir are used, in that order,
421 # so that tm.h and config.h will be found in the compilation
422 # subdirectory rather than in the source directory.
423 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
425 # Always use -I$(srcdir)/config when compiling.
427 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
429 # This tells GNU make version 3 not to export all the variables
430 # defined in this file into the environment.
433 # Support for additional languages (other than c and objc).
434 # ??? objc can be supported this way too (leave for later).
436 # These next lines are overridden by configure.
441 # Flags to pass to recursive makes.
442 # CC is set by configure. Hosts without symlinks need special handling
443 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
445 # ??? The choices here will need some experimenting with.
447 "AR_FLAGS=$(AR_FLAGS)" \
448 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
450 "BISONFLAGS=$(BISONFLAGS)" \
451 "CC=set-by-configure" \
453 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
454 "LDFLAGS=$(LDFLAGS)" \
456 "LEXFLAGS=$(LEXFLAGS)" \
457 "MAKEINFO=$(MAKEINFO)" \
458 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
459 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
460 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
464 "exec_prefix=$(exec_prefix)" \
466 "tooldir=$(tooldir)" \
468 "libsubdir=$(libsubdir)"
470 # Lists of files for various purposes.
472 # A list of all the language-specific executables.
473 # This is overridden by configure.
474 COMPILERS
= cc1
$(exeext
) cc1obj
$(exeext
)
476 # Language-specific object files for C.
477 C_OBJS
= c-parse.o c-lang.o c-lex.o c-pragma.o \
478 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
480 # Language-specific object files for Objective C.
481 OBJC_OBJS
= objc-parse.o objc-act.o c-lex.o c-pragma.o \
482 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
484 # Files specific to the C interpreter bytecode compiler(s).
485 BC_OBJS
= bc-emit.o bc-optab.o
487 # Bytecode header files constructed at build time; vmsconfig.com wants this.
488 BC_ALL
= bc-arity.h bc-opcode.h bc-opname.h
490 # Language-independent object files.
491 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
492 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
493 rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
494 dbxout.o sdbout.o dwarfout.o xcoffout.o \
495 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
496 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
497 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
498 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
499 insn-attrtab.o
$(out_object_file
) getpwd.o convert.o
$(EXTRA_OBJS
)
501 # GEN files are listed separately, so they can be built before doing parallel
502 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
503 # them before rtl.o is compiled.
504 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
507 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
510 # Files to be copied away after each stage in building.
511 STAGESTUFF
= *$(objext
) insn-flags.h insn-config.h insn-codes.h \
512 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
513 insn-attr.h insn-attrtab.c insn-opinit.c \
514 stamp-flags stamp-config stamp-codes \
515 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
516 stamp-attr stamp-attrtab stamp-opinit stamp-proto \
517 genemit
$(exeext
) genoutput
$(exeext
) genrecog
$(exeext
) genextract
$(exeext
) \
518 genflags
$(exeext
) gencodes
$(exeext
) genconfig
$(exeext
) genpeep
$(exeext
) \
519 genattrtab
$(exeext
) genattr
$(exeext
) genopinit
$(exeext
) \
521 stamp-bcarity stamp-bcopcode stamp-bcopname \
522 bi-arity
$(exeext
) bi-opcode
$(exeext
) bi-opname
$(exeext
) \
523 $(GCC_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) \
524 $(CCCP
)$(exeext
) cc1obj
$(exeext
) enquire
$(exeext
) \
525 protoize
$(exeext
) unprotoize
$(exeext
) \
526 specs collect2
$(exeext
) $(USE_COLLECT2
) underscore.c \
529 # Members of libgcc1.a.
530 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
531 _lshrsi3 _ashrsi3 _ashlsi3 \
532 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
533 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
534 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
535 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
536 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
538 # Library members defined in libgcc2.c.
539 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
540 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
541 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
542 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
543 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
544 _fixtfdi _fixunstfdi _floatditf \
545 __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
546 _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
549 # Header files that are made available under the same name
550 # to programs compiled with GCC.
551 USER_H
= $(srcdir)/ginclude
/stdarg.h
$(srcdir)/ginclude
/stddef.h \
552 $(srcdir)/ginclude
/varargs.h
$(srcdir)/ginclude
/va-alpha.h \
553 $(srcdir)/ginclude
/va-h8300.h
$(srcdir)/ginclude
/va-i860.h \
554 $(srcdir)/ginclude
/va-i960.h
$(srcdir)/ginclude
/va-mips.h \
555 $(srcdir)/ginclude
/va-m88k.h
$(srcdir)/ginclude
/va-pa.h \
556 $(srcdir)/ginclude
/va-pyr.h
$(srcdir)/ginclude
/va-sparc.h \
557 $(srcdir)/ginclude
/va-clipper.h
$(srcdir)/ginclude
/va-spur.h \
558 $(srcdir)/ginclude
/iso646.h \
559 $(srcdir)/ginclude
/proto.h
$(EXTRA_HEADERS
)
561 # The files that "belong" in CONFIG_H are deliberately omitted
562 # because having them there would not be useful in actual practice.
563 # All they would do is cause complete recompilation every time
564 # one of the machine description files is edited.
565 # That may or may not be what one wants to do.
566 # If it is, rm *.o is an easy way to do it.
567 # CONFIG_H = $(host_xm_file) $(tm_file)
569 RTL_H
= rtl.h rtl.def machmode.h machmode.def
570 TREE_H
= tree.h real.h tree.def machmode.h machmode.def
571 BYTECODE_H
= bytecode.h bc-emit.h bc-optab.h
573 # Language makefile fragments.
575 # The following targets define the interface between us and the languages.
577 # all.build, all.cross, start.encap, rest.encap,
579 # install-normal, install-common, install-info, install-man,
580 # uninstall, distdir,
581 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
582 # stage1, stage2, stage3, stage4
584 # Each language is linked in with a series of hooks (since we can't use `::'
585 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
586 # Configure computes and adds these here.
590 # sed inserts language fragments after the following line.
591 ####language fragments
593 # End of language makefile fragments.
595 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
598 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
$(srcdir)/version.c \
599 $(srcdir)/config
/$(xmake_file
) $(srcdir)/config
/$(tmake_file
) \
601 cp config.status config.run
605 all.internal
: start.encap rest.encap
606 # This is what to compile if making a cross-compiler.
607 # Note that we can compile enquire using the cross-compiler just built,
608 # although we can't run it on this machine.
609 all.cross
: native gcc-cross specs stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) \
610 $(LIBGCC1_TEST
) $(EXTRA_PARTS
) lang.
all.cross
611 # This is what to compile if making gcc with a cross-compiler.
612 all.build
: native xgcc
$(EXTRA_PARTS
) lang.
all.build
613 # This is what must be made before installing GCC and converting libraries.
614 start.encap
: native xgcc specs
$(LIBGCC1
) xlimits.h lang.start.encap
615 # These can't be made until after GCC can run.
616 rest.encap
: stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) $(EXTRA_PARTS
) lang.rest.encap
617 # This is what is made with the host's compiler
618 # whether making a cross compiler or not.
619 native
: config.status
cpp $(LANGUAGES
) $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
621 # Define the names for selecting languages in LANGUAGES.
623 OBJC objc
: cc1obj objc-runtime
624 OBJECTIVE-C objective-c
: cc1obj objc-runtime
627 # Tell GNU make these are phony targets.
628 .PHONY
: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
630 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
631 # a target to build even if it is up-to-date. So we must verify that
632 # config.status does not exist before failing.
634 @if
[ ! -f config.status
] ; then \
635 echo You must configure gcc. Look at the INSTALL file for details.
; \
641 # On the target machine, finish building a cross compiler.
642 # This does the things that can't be done on the host machine.
643 rest.cross
: $(LIBGCC
) gfloat.h specs
645 # Verify that it works to compile and link libgcc1-test.
646 # If it does, then there are sufficient replacements for libgcc1.a.
647 libgcc1-test
: libgcc1-test.o native
$(GCC_PARTS
)
648 @echo
"Testing libgcc1. Ignore linker warning messages."
649 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) libgcc1-test.o
-o libgcc1-test \
650 -nostartfiles
-nostdlib
`$(GCC_FOR_TARGET) --print-libgcc-file-name`
651 libgcc1-test.o
: libgcc1-test.c native xgcc
652 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) -c
$(srcdir)/libgcc1-test.c
654 # Recompile all the language-independent object files.
655 # This is used only if the user explicitly asks for it.
656 compilations
: ${OBJS}
658 # Create a list of the language-independent object files so the language
659 # subdirectories needn't mention their names explicitly.
660 stamp-objlist
: Makefile
$(OBJS
) $(BC_OBJS
)
661 echo
" $(OBJS) $(BC_OBJS)" | sed
-e
's, \([a-z]\), ../\1,g' >stamp-objlist
663 # We call this executable `xgcc' rather than `gcc'
664 # to avoid confusion if the current directory is in the path
665 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
666 xgcc
: gcc.o version.o
$(LIBDEPS
)
667 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ gcc.o version.o
$(LIBS
)
669 # Dump a specs file to make -B./ read these specs over installed ones.
671 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
674 # We do want to create an executable named `xgcc', so we can use it to
676 # Also create gcc-cross, so that install-common will install properly.
678 cp xgcc
$(exeext
) gcc-cross
$(exeext
)
680 cc1
: $(P
) $(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
681 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
683 cc1obj
: $(P
) $(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
684 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
686 # Copy float.h from its source.
688 cp
$(FLOAT_H
) gfloat.h
690 # Create float.h source for the native machine.
692 -.
/enquire
-f
> tmp-float.h
693 mv tmp-float.h float.h-nat
695 # Create a dummy float.h source for a cross-compiler.
697 echo
"#error float.h values not known for cross-compiler" > t-float.h-cross
698 mv t-float.h-cross float.h-cross
700 # Used to compile enquire with standard cc, but have forgotten why.
701 # Let's try with GCC.
702 enquire
: enquire.o
$(GCC_PARTS
)
703 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o
$@
704 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
) stmp-int-hdrs
705 # Breaking this line caused a problem with one version of GNU make.
706 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) -I.
-c
$(srcdir)/enquire.c
708 # Build the version of limits.h that we will install.
709 xlimits.h
: glimits.h limitx.h limity.h
710 if
$(LIMITS_H_TEST
) ; then \
711 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
713 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
715 mv tmp-xlimits.h xlimits.h
718 # This is done in two parts because some functions, in libgcc1.c,
719 # must be compiled with something other than GCC,
720 # while the rest, in libgcc2.c, must be compiled with xgcc.
721 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
723 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
724 # LIBCONVERT should put its output in libgcc1.conv.
725 libgcc1.conv
: libgcc1.a
726 $(LIBCONVERT
) libgcc1.a libgcc1.conv
728 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
729 # Make an empty file instead.
730 libgcc1.null
: $(GCC_PASSES
)
731 echo
"__foo () {}" > dummy.c
732 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
733 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy
$(objext
)
734 rm -f dummy
$(objext
) dummy.c
736 # This is $(LIBGCC1) for a cross-compiler.
737 # We have no automatic way of building libgcc1.a,
738 # so it's up to the installer to find a way to do that.
739 # This rule deliberately does not depend on libgcc1.a
740 # so that it will fail if the installer hasn't provided it.
742 mv libgcc1.a libgcc1.cross ||
(echo You must find a way to make libgcc1.a
; false
)
744 # Compile the library of arithmetic subroutines with the native compiler.
745 # Don't compile it with GCC!
746 # (That would cause most arithmetic functions to call themselves.)
747 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
749 # Actually build it in tmplibgcc1.a, then rename at end,
750 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
751 # -e causes any failing command to make this rule fail.
752 # -e doesn't work in certain shells, so we test $$? as well.
753 # lynx has a broken ar, it always complains when the initial library is
754 # empty, thus this command works only if we don't do -e
755 # There is a trailing backslash (\) deleted from the following line.
757 for name in
$(LIB1FUNCS
); \
760 rm -f
$${name}$(objext
); \
761 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
762 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
763 mv libgcc1
$(objext
) $${name}$(objext
); \
764 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
765 rm -f
$${name}$(objext
); \
767 # Some shells crash when a loop has no items.
768 # So make sure there is always at least one--`..'.
770 # We don't use -e here because there are if statements
771 # that should not make the command give up when the if condition is false.
772 # Instead, we test for failure after each command where it matters.
773 for file in ..
$(LIB1FUNCS_EXTRA
); \
775 if
[ x
$${file} != x..
]; then \
776 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
778 if
[ $${name}.asm
= $${file} ]; then \
779 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
781 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
782 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
783 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
784 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
785 rm -f
$${name}.s
$${name}$(objext
); \
789 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc1.a
; else true
; fi
790 mv tmplibgcc1.a libgcc1.a
792 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
793 # functions. LIB1ASMSRC is the name of the source file in the config
795 libgcc1-asm.a
: libgcc2.ready config.status
$(srcdir)/config
/$(LIB1ASMSRC
)
796 -rm -f tmplibgcc1.a libgcc1.S
797 cp
$(srcdir)/config
/$(LIB1ASMSRC
) libgcc1.S
798 # Actually build it in tmplibgcc1.a, then rename at end,
799 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
800 # -e causes any failing command to make this rule fail.
801 # -e doesn't work in certain shells, so we test $$? as well.
802 # lynx has a broken ar, it always complains when the initial library is
803 # empty, thus this command works only if we don't do -e
804 # There is a trailing backslash (\) deleted from the following line.
806 for name in
$(LIB1ASMFUNCS
); \
809 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} libgcc1.S
; \
810 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
811 mv libgcc1
$(objext
) $${name}$(objext
); \
812 $(AR
) $(AR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
813 rm -f
$${name}$(objext
); \
816 mv tmplibgcc1.a libgcc1-asm.a
818 # Generate assembly versions of the functions required for libgcc1.
819 # You'll still need to massage the code by hand (possibly hacking
820 # underscores and local labels) but this will get you started.
821 libgcc1.S
: libgcc1.c
$(CONFIG_H
) config.status
824 for name in
$(LIB1FUNCS
); \
827 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -S
-DL
$${name} $(srcdir)/libgcc1.c
; \
828 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
829 echo
'#ifdef ' L
$${name} >> libgcc1.S
; \
830 cat libgcc1.s
>> libgcc1.S
; \
831 echo
'#endif /*' L
$${name} '*/' >> libgcc1.S
; \
832 echo
"" >> libgcc1.S
; \
835 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
836 # But recompiling cc1 should not force recompilation of libgcc2.a.
837 # If you want to force recompilation, delete libgcc2.a.
838 libgcc2.ready
: $(GCC_PASSES
) $(LIBGCC2_DEPS
) stmp-int-hdrs
839 -if
[ -f libgcc2.ready
] ; then \
842 touch libgcc2.ready
; \
845 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2FUNCS_EXTRA
) \
846 machmode.h longlong.h gbl-ctors.h config.status
847 # Actually build it in tmplibgcc2.a, then rename at end,
848 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
850 # -e causes any failing command to make this rule fail.
851 # -e doesn't work in certain shells, so we test $$? as well.
852 # lynx has a broken ar, it always complains when the initial library is
853 # empty, thus this command works only if we don't do -e
854 # There is a trailing backslash (\) deleted from the following line.
856 for name in
$(LIB2FUNCS
); \
859 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
860 $(srcdir)/libgcc2.c
-o
$${name}$(objext
); \
861 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
862 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}$(objext
); \
863 rm -f
$${name}$(objext
); \
865 # Some shells crash when a loop has no items.
866 # So make sure there is always at least one--`..'.
868 # We don't use -e here because there are if statements
869 # that should not make the command give up when the if condition is false.
870 # Instead, we test for failure after each command where it matters.
871 for file in ..
$(LIB2FUNCS_EXTRA
); \
873 if
[ x
$${file} != x..
]; then \
874 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
875 oname
=` echo $${name} | sed -e 's,.*/,,'`; \
877 if
[ $${name}.asm
= $${file} ]; then \
878 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
880 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
881 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
882 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${oname}$(objext
); \
883 rm -f
$${name}.s
$${oname}$(objext
); \
887 mv tmplibgcc2.a libgcc2.a
888 # These lines were deleted from above the mv command
889 # because ranlibing libgcc.a itself should suffice.
890 # -if [ x${HPUX_GAS} = x ] ; then \
891 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
894 # Combine the various libraries into a single library, libgcc.a.
895 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
896 -rm -rf tmplibgcc.a libgcc.a tmpcopy
898 -if
[ x
$(LIBGCC1
) != x
]; \
899 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
902 # Some versions of ar (specifically the one in RISC/os 5.x), create an
903 # unwritable table of contents file, and then print an error message when
904 # the second ar command tries to overwrite this file. To avoid the error
905 # message from ar, we make sure all files are writable.
906 -(cd tmpcopy
; chmod
+w
* > /dev
/null
2>&1)
907 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
908 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
910 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
911 # Actually build it in tmplibgcc.a, then rename at end,
912 # so that libgcc.a itself remains nonexistent if compilation is aborted.
913 mv tmplibgcc.a libgcc.a
915 # Use the genmultilib shell script to generate the information the gcc
916 # driver program needs to select the library directory based on the
918 multilib.h
: $(srcdir)/genmultilib Makefile
919 $(SHELL
) $(srcdir)/genmultilib
"$(MULTILIB_OPTIONS)" \
920 "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
922 # Build multiple copies of libgcc.a, one for each target switch.
923 stmp-multilib
: $(LIBGCC1
) libgcc2.c libgcc2.ready
$(CONFIG_H
) \
924 $(LIB2FUNCS_EXTRA
) machmode.h longlong.h gbl-ctors.h config.status
925 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
926 dir=`echo $$i | sed -e 's/;.*$$//'`; \
927 flags
=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
928 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
929 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
930 RANLIB
="$(RANLIB)" RANLIB_TEST
="$(RANLIB_TEST)" \
931 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
932 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS) $${flags}" \
933 LIBGCC1
="$(LIBGCC1)" LIBGCC2
="$(LIBGCC2)" \
934 dir="$${dir}" stmp-multilib-sub
; \
935 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
939 # Subroutine of stmp-multilib so make -n works.
941 rm -f
$(dir)/libgcc.a
$(LIBGCC2
)
942 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
943 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
944 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
945 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC2
)
946 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
948 else rm -f
$(LIBGCC1
); \
950 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
953 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
954 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
955 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
956 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC1
); \
958 rm -rf tmplibgcc.a tmpcopy
960 if
[ x
$(LIBGCC1
) != x
]; \
961 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
964 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
965 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*.o
)
966 rm -rf libgcc2.a tmpcopy
967 if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
968 if
[ -d
$(dir) ]; then true
; else mkdir
$(dir); fi
969 mv tmplibgcc.a
$(dir)/libgcc.a
971 objc-runtime
: libobjc.a
973 # Build the Objective C runtime library.
974 libobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
$(USE_COLLECT2
) $(EXTRA_PARTS
)
975 if
[ -d objc
]; then true
; else mkdir objc
; fi
977 srcdir1
=`cd $(srcdir); pwd`; \
979 $(MAKE
) -f
$${srcdir1}/objc
/Makefile libobjc.a \
980 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
981 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
982 GCC_CFLAGS
="$(GCC_CFLAGS)"
984 ln objc
/libobjc.a .
>/dev
/null
2>&1 || cp objc
/libobjc.a .
985 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) libobjc.a
; else true
; fi
987 # This is used by objc/Makefile if the user runs that directly.
988 sublibobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
990 srcdir1
=`cd $(srcdir); pwd`; \
992 $(MAKE
) -f
$$srcdir1/objc
/Makefile libobjc.a \
993 srcdir=$$srcdir1 tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
994 GCC_FOR_TARGET
="$$thisdir1/xgcc -B$$thisdir1/" \
995 GCC_CFLAGS
="$(GCC_CFLAGS)"
997 # Compile two additional files that are linked with every program
998 # linked using GCC on system V, for the sake of C++ constructors.
999 crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1000 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1001 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
1002 -g0
-c
$(srcdir)/crtstuff.c
1003 mv crtstuff
$(objext
) $@
1005 crtend.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1006 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1007 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
1008 -g0
-c
$(srcdir)/crtstuff.c
1009 mv crtstuff
$(objext
) $@
1011 # Compiling object files from source files.
1013 # Note that dependencies on obstack.h are not written
1014 # because that file is not part of GCC.
1016 # C language specific files.
1018 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1019 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1020 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
1021 $(srcdir)/c-parse.h
: $(srcdir)/c-parse.c
1022 $(srcdir)/c-parse.c
: $(srcdir)/c-parse.y
1023 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
1024 $(srcdir)/c-parse.y
: c-parse.in
1025 sed
-e
"/^ifobjc$$/,/^end ifobjc$$/d" \
1026 -e
"/^ifc$$/d" -e
"/^end ifc$$/d" \
1027 $(srcdir)/c-parse.in
>tmp-c-parse.y
1028 $(srcdir)/move-if-change tmp-c-parse.y
$(srcdir)/c-parse.y
1030 $(srcdir)/c-gperf.h
: c-parse.gperf
1031 gperf
-p
-j1
-i
1 -g
-o
-t
-G
-N is_reserved_word
-k1
,3,$$ \
1032 $(srcdir)/c-parse.gperf
>tmp-gperf.h
1033 $(srcdir)/move-if-change tmp-gperf.h
$(srcdir)/c-gperf.h
1035 c-decl.o
: c-decl.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h output.h
1036 c-typeck.o
: c-typeck.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h output.h
1037 c-lang.o
: c-lang.c
$(CONFIG_H
) $(TREE_H
)
1038 c-lex.o
: c-lex.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h
$(srcdir)/c-parse.h \
1039 input.h flags.h
$(srcdir)/c-gperf.h c-pragma.h
1040 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
1041 c-convert.o
: c-convert.c
$(CONFIG_H
) $(TREE_H
) flags.h
1042 c-pragma.o
: c-pragma.c
$(CONFIG_H
) $(TREE_H
) c-pragma.h
1043 c-iterate.o
: c-iterate.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h flags.h
1045 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1048 ln collect2
$(exeext
) ld$(exeext
) > /dev
/null
2>&1 \
1049 || cp collect2
$(exeext
) ld$(exeext
)
1051 collect2
: collect2.o cplus-dem.o underscore.o version.o
$(LIBDEPS
)
1052 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1053 -rm -f collect2
$(exeext
)
1054 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ collect2.o \
1055 cplus-dem.o underscore.o version.o
$(LIBS
)
1057 collect2.o
: collect2.c
$(CONFIG_H
) gstab.h obstack.h demangle.h
1058 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1059 -DTARGET_MACHINE
=\"$(target
)\" $(MAYBE_USE_COLLECT2
) \
1060 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1062 cplus-dem.o
: cplus-dem.c demangle.h
1064 underscore.c
: $(GCC_PASSES
)
1065 echo
"int xxy_us_dummy;" >tmp-dum.c
1066 $(GCC_FOR_TARGET
) -S tmp-dum.c
1067 echo
'/*WARNING: This file is automatically generated!*/' >tmp-under.c
1068 if grep _xxy_us_dummy tmp-dum.s
> /dev
/null
; then \
1069 echo
"int prepends_underscore = 1;" >>tmp-under.c
; \
1071 echo
"int prepends_underscore = 0;" >>tmp-under.c
; \
1073 $(srcdir)/move-if-change tmp-under.c underscore.c
1074 -rm -f tmp-dum.c tmp-dum.s
1076 # Objective C language specific files.
1078 objc-parse.o
: $(srcdir)/objc-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1079 c-tree.h input.h flags.h objc-act.h
1080 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/objc-parse.c
1081 $(srcdir)/objc-parse.c
: $(srcdir)/objc-parse.y
1082 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) objc-parse.y
-o objc-parse.c
1083 $(srcdir)/objc-parse.y
: $(srcdir)/c-parse.in
1084 sed
-e
"/^ifc$$/,/^end ifc$$/d" \
1085 -e
"/^ifobjc$$/d" -e
"/^end ifobjc$$/d" \
1086 $(srcdir)/c-parse.in
>tmp-objc-prs.y
1087 $(srcdir)/move-if-change tmp-objc-prs.y
$(srcdir)/objc-parse.y
1089 objc-act.o
: objc-act.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h c-lex.h \
1090 flags.h objc-act.h input.h function.h
$(srcdir)/c-parse.h
1092 # A file used by all variants of C.
1094 c-common.o
: c-common.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
1096 # Language-independent files.
1098 gcc.o
: gcc.c
$(CONFIG_H
) multilib.h config.status
$(lang_specs_files
)
1099 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1100 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
1101 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
1102 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1103 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
1104 -DTOOLDIR_BASE_PREFIX
=\"$(exec_prefix)/\" \
1105 $(MAYBE_TARGET_DEFAULT
) \
1106 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1108 dumpvers
: dumpvers.c
1110 version.o
: version.c
1111 obstack.o
: obstack.c
1113 convert.o
: convert.c
$(CONFIG_H
) $(TREE_H
) flags.h convert.h
1115 tree.o
: tree.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1116 print-tree.o
: print-tree.c
$(CONFIG_H
) $(TREE_H
)
1117 stor-layout.o
: stor-layout.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1118 fold-const.o
: fold-const.c
$(CONFIG_H
) $(TREE_H
) flags.h
1119 toplev.o
: toplev.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) bytecode.h bc-emit.h \
1120 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1121 $(lang_options_files
)
1122 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1123 $(MAYBE_TARGET_DEFAULT
) $(MAYBE_USE_COLLECT2
) \
1124 -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1126 rtl.o
: rtl.c
$(CONFIG_H
) $(RTL_H
)
1128 print-rtl.o
: print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1129 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1131 varasm.o
: varasm.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h function.h \
1132 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1133 output.h bytecode.h c-pragma.h
1134 function.o
: function.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1135 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1136 recog.h output.h bytecode.h
1137 stmt.o
: stmt.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1138 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
1139 recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
1141 expr.o
: expr.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h regs.h \
1142 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1143 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1144 bc-emit.h modemap.def
1145 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
1147 expmed.o
: expmed.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1148 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1149 explow.o
: explow.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h hard-reg-set.h \
1150 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1151 optabs.o
: optabs.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1152 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1153 dbxout.o
: dbxout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h regs.h \
1154 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1155 sdbout.o
: sdbout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) gsyms.h flags.h \
1156 insn-config.h reload.h
1157 dwarfout.o
: dwarfout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) dwarf.h flags.h \
1158 insn-config.h reload.h output.h defaults.h
1159 xcoffout.o
: xcoffout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) xcoffout.h flags.h
1160 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1161 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1162 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1163 real.o
: real.c
$(CONFIG_H
) $(TREE_H
)
1164 getpwd.o
: getpwd.c
$(CONFIG_H
)
1166 integrate.o
: integrate.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h integrate.h \
1167 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
1170 jump.o
: jump.c
$(CONFIG_H
) $(RTL_H
) flags.h hard-reg-set.h regs.h \
1171 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1172 stupid.o
: stupid.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h
1174 cse.o
: cse.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h real.h \
1175 insn-config.h recog.h
1176 loop.o
: loop.c
$(CONFIG_H
) $(RTL_H
) flags.h loop.h insn-config.h \
1177 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1178 unroll.o
: unroll.c
$(CONFIG_H
) $(RTL_H
) insn-config.h insn-codes.h \
1179 integrate.h regs.h flags.h expr.h loop.h
1180 flow.o
: flow.c
$(CONFIG_H
) $(RTL_H
) flags.h insn-config.h \
1181 basic-block.h regs.h hard-reg-set.h output.h
1182 combine.o
: combine.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1183 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1184 basic-block.h recog.h real.h hard-reg-set.h
1185 regclass.o
: regclass.c
$(CONFIG_H
) $(RTL_H
) hard-reg-set.h flags.h \
1186 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1187 local-alloc.o
: local-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h basic-block.h \
1188 regs.h hard-reg-set.h insn-config.h recog.h output.h
1189 global.o
: global.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1190 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1192 reload.o
: reload.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1193 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1194 reload1.o
: reload1.c
$(CONFIG_H
) $(RTL_H
) flags.h expr.h \
1195 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1196 basic-block.h recog.h output.h
1197 caller-save.o
: caller-save.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1198 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
1199 reorg.o
: reorg.c
$(CONFIG_H
) $(RTL_H
) conditions.h hard-reg-set.h \
1200 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1202 sched.o
: sched.c
$(CONFIG_H
) $(RTL_H
) basic-block.h regs.h hard-reg-set.h \
1203 flags.h insn-config.h insn-attr.h
1204 final.o
: final.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h regs.h \
1205 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
1206 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1207 recog.o
: recog.c
$(CONFIG_H
) $(RTL_H
) \
1208 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1209 insn-flags.h insn-codes.h real.h
1210 reg-stack.o
: reg-stack.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) \
1211 regs.h hard-reg-set.h flags.h insn-config.h
1213 $(out_object_file
): $(out_file
) $(CONFIG_H
) \
1214 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1215 insn-flags.h output.h insn-attr.h insn-codes.h
1216 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(out_file
)
1218 # Build auxiliary files that support ecoff format.
1219 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1220 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tfile.o version.o
$(LIBS
)
1222 mips-tfile.o
: mips-tfile.c
$(CONFIG_H
) $(RTL_H
)
1224 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1225 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tdump.o version.o
$(LIBS
)
1227 mips-tdump.o
: mips-tdump.c
$(CONFIG_H
) $(RTL_H
)
1229 # Build file to support OSF/rose half-pic format.
1230 halfpic.o
: halfpic.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
)
1232 # Normally this target is not used; but it is used if you
1233 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1234 # from the GNU Emacs distribution.
1236 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
1237 -c
`echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1240 # Generate header and source files from the machine description,
1243 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
1244 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1245 insn-attr.h insn-attrtab.c
1247 # The following pair of rules has this effect:
1248 # genconfig is run only if the md has changed since genconfig was last run;
1249 # but the file insn-config.h is touched only when its contents actually change.
1251 # Each of the other insn-* files is handled by a similar pair of rules.
1253 # This causes an anomaly in the results of make -n
1254 # because insn-* is older than stamp-*
1255 # and thus make -n thinks that insn-* will be updated
1256 # and force recompilation of things that depend on it.
1257 # We use move-if-change precisely to avoid such recompilation.
1258 # But there is no way to teach make -n that it will be avoided.
1260 # Each of the insn-*.[ch] rules has a semicolon at the end,
1261 # for otherwise the system Make on SunOS 4.1 never tries
1262 # to recompile insn-*.o. To avoid problems and extra noise from
1263 # versions of make which don't like empty commands (nothing after the
1264 # trailing `;'), we call true for each.
1266 insn-config.h
: stamp-config
; @true
1267 stamp-config
: $(md_file
) genconfig
$(srcdir)/move-if-change
1268 .
/genconfig
$(md_file
) > tmp-config.h
1269 $(srcdir)/move-if-change tmp-config.h insn-config.h
1272 insn-flags.h
: stamp-flags
; @true
1273 stamp-flags
: $(md_file
) genflags
$(srcdir)/move-if-change
1274 .
/genflags
$(md_file
) > tmp-flags.h
1275 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1278 insn-codes.h
: stamp-codes
; @true
1279 stamp-codes
: $(md_file
) gencodes
$(srcdir)/move-if-change
1280 .
/gencodes
$(md_file
) > tmp-codes.h
1281 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1284 insn-emit.o
: insn-emit.c
$(CONFIG_H
) $(RTL_H
) expr.h real.h output.h \
1285 insn-config.h insn-flags.h insn-codes.h
1286 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
1288 insn-emit.c
: stamp-emit
; @true
1289 stamp-emit
: $(md_file
) genemit
$(srcdir)/move-if-change
1290 .
/genemit
$(md_file
) > tmp-emit.c
1291 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1294 insn-recog.o
: insn-recog.c
$(CONFIG_H
) $(RTL_H
) insn-config.h recog.h \
1295 real.h output.h flags.h
1296 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
1298 insn-recog.c
: stamp-recog
; @true
1299 stamp-recog
: $(md_file
) genrecog
$(srcdir)/move-if-change
1300 .
/genrecog
$(md_file
) > tmp-recog.c
1301 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1304 insn-opinit.o
: insn-opinit.c
$(CONFIG_H
) $(RTL_H
) insn-codes.h insn-flags.h \
1305 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1306 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-opinit.c
1308 insn-opinit.c
: stamp-opinit
; @true
1309 stamp-opinit
: $(md_file
) genopinit
$(srcdir)/move-if-change
1310 .
/genopinit
$(md_file
) > tmp-opinit.c
1311 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1314 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
1315 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
1317 insn-extract.c
: stamp-extract
; @true
1318 stamp-extract
: $(md_file
) genextract
$(srcdir)/move-if-change
1319 .
/genextract
$(md_file
) > tmp-extract.c
1320 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1323 insn-peep.o
: insn-peep.c
$(CONFIG_H
) $(RTL_H
) regs.h output.h real.h
1324 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
1326 insn-peep.c
: stamp-peep
; @true
1327 stamp-peep
: $(md_file
) genpeep
$(srcdir)/move-if-change
1328 .
/genpeep
$(md_file
) > tmp-peep.c
1329 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1332 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h output.h \
1333 insn-attr.h insn-config.h
1334 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
1336 insn-attr.h
: stamp-attr
; @true
1337 stamp-attr
: $(md_file
) genattr
$(srcdir)/move-if-change
1338 .
/genattr
$(md_file
) > tmp-attr.h
1339 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1342 insn-attrtab.c
: stamp-attrtab
; @true
1343 stamp-attrtab
: $(md_file
) genattrtab
$(srcdir)/move-if-change
1344 if cmp
-s
$(PREMADE_ATTRTAB_MD
) $(md_file
); \
1346 echo Using
$(PREMADE_ATTRTAB
); \
1347 cp
$(PREMADE_ATTRTAB
) tmp-attrtab.c
; \
1349 .
/genattrtab
$(md_file
) > tmp-attrtab.c
; \
1351 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1354 insn-output.o
: insn-output.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h conditions.h \
1355 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1357 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
1359 insn-output.c
: stamp-output
; @true
1360 stamp-output
: $(md_file
) genoutput
$(srcdir)/move-if-change
1361 .
/genoutput
$(md_file
) > tmp-output.c
1362 $(srcdir)/move-if-change tmp-output.c insn-output.c
1365 # Compile the programs that generate insn-* from the machine description.
1366 # They are compiled with $(HOST_CC), and associated libraries,
1367 # since they need to run on this machine
1368 # even if GCC is being compiled to run on some other machine.
1370 # $(CONFIG_H) is omitted from the deps of the gen*.o
1371 # because these programs don't really depend on anything
1372 # about the target machine. They do depend on config.h itself,
1373 # since that describes the host machine.
1375 # Pass the md file through cpp if the target requests it.
1376 $(MD_FILE
): $(MD_DEPS
)
1378 $(MD_CPP
) $(MD_CPPFLAGS
) $(md_file
) | sed
's/^# /; /g' > tmp-
$@
1381 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1382 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1383 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
1385 genconfig.o
: genconfig.c
$(RTL_H
) $(build_xm_file
)
1386 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
1388 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1389 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1390 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
1392 genflags.o
: genflags.c
$(RTL_H
) $(build_xm_file
)
1393 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
1395 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1396 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1397 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
1399 gencodes.o
: gencodes.c
$(RTL_H
) $(build_xm_file
)
1400 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
1402 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1403 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1404 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
1406 genemit.o
: genemit.c
$(RTL_H
) $(build_xm_file
)
1407 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
1409 genopinit
: genopinit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1410 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1411 genopinit.o
$(HOST_RTL
) $(HOST_LIBS
)
1413 genopinit.o
: genopinit.c
$(RTL_H
) $(build_xm_file
)
1414 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genopinit.c
1416 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1417 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1418 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
1420 genrecog.o
: genrecog.c
$(RTL_H
) $(build_xm_file
)
1421 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
1423 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1424 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1425 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
1427 genextract.o
: genextract.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1428 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
1430 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1431 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1432 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
1434 genpeep.o
: genpeep.c
$(RTL_H
) $(build_xm_file
)
1435 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
1437 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1438 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1439 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
1441 genattr.o
: genattr.c
$(RTL_H
) $(build_xm_file
)
1442 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1444 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1445 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1446 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1448 genattrtab.o
: genattrtab.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1449 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1451 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1452 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1453 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1455 genoutput.o
: genoutput.c
$(RTL_H
) $(build_xm_file
)
1456 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1458 # Compile the libraries to be used by gen*.
1459 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1460 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1461 # with the rules for rtl.o, alloca.o, etc.
1462 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1463 rm -f
$(HOST_PREFIX
)rtl.c
1464 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtl.c
> $(HOST_PREFIX
)rtl.c
1465 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1467 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1468 rm -f
$(HOST_PREFIX
)print-rtl.c
1469 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c
> $(HOST_PREFIX
)print-rtl.c
1470 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1472 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1473 rm -f
$(HOST_PREFIX
)rtlanal.c
1474 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c
> $(HOST_PREFIX
)rtlanal.c
1475 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1477 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1478 rm -f
$(HOST_PREFIX
)alloca.c
1479 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1480 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1482 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1483 rm -f
$(HOST_PREFIX
)obstack.c
1484 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/obstack.c
> $(HOST_PREFIX
)obstack.c
1485 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1487 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1488 rm -f
$(HOST_PREFIX
)malloc.c
1489 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/malloc.c
> $(HOST_PREFIX
)malloc.c
1490 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1492 # This satisfies the dependency that we get if you cross-compile a compiler
1493 # that does not need to compile alloca, malloc or whatever.
1495 touch
$(HOST_PREFIX_1
)
1497 # Remake bytecode files.
1498 BI_OBJ
=bi-parser.o bi-lexer.o bi-reverse.o
1500 bc-emit.o
: bc-emit.c
$(CONFIG_H
) $(RTL_H
) real.h
$(BYTECODE_H
) \
1501 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1502 bc-optab.o
: bc-optab.c
$(CONFIG_H
) $(REAL_H
) $(BYTECODE_H
) \
1503 bc-opcode.h bc-typecd.h bc-typecd.def
1505 bi-arity
: bi-arity.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1506 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1507 bi-arity.o
$(BI_OBJ
) $(HOST_LIBS
)
1508 bi-opcode
: bi-opcode.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1509 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1510 bi-opcode.o
$(BI_OBJ
) $(HOST_LIBS
)
1511 bi-opname
: bi-opname.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1512 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1513 bi-opname.o
$(BI_OBJ
) $(HOST_LIBS
)
1515 $(srcdir)/bi-parser.h
: $(srcdir)/bi-parser.c
1516 $(srcdir)/bi-parser.c
: $(srcdir)/bi-parser.y
1517 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d bi-parser.y
-o bi-parser.c
1519 bi-parser.o
: $(srcdir)/bi-parser.c bi-defs.h
$(build_xm_file
)
1520 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1521 $(srcdir)/bi-parser.c
1522 bi-lexer.o
: bi-lexer.c
$(srcdir)/bi-parser.h
$(build_xm_file
)
1523 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1524 $(srcdir)/bi-lexer.c
1525 bi-arity.o
: bi-arity.c bi-defs.h
$(build_xm_file
)
1526 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1527 $(srcdir)/bi-arity.c
1528 bi-opcode.o
: bi-opcode.c bi-defs.h
$(build_xm_file
)
1529 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1530 $(srcdir)/bi-opcode.c
1531 bi-opname.o
: bi-opname.c bi-defs.h
$(build_xm_file
)
1532 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1533 $(srcdir)/bi-opname.c
1534 bi-reverse.o
: bi-reverse.c bi-defs.h
1535 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1536 $(srcdir)/bi-reverse.c
1538 bc-arity.h
: stamp-bcarity
; @true
1539 stamp-bcarity
: $(srcdir)/bytecode.def bi-arity
$(srcdir)/move-if-change
1540 .
/bi-arity
< $(srcdir)/bytecode.def
>tmp-bc-arity.h
1541 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1544 bc-opcode.h
: stamp-bcopcode
; @true
1545 stamp-bcopcode
: $(srcdir)/bytecode.def bi-opcode
$(srcdir)/move-if-change
1546 .
/bi-opcode
< $(srcdir)/bytecode.def
>tmp-bcopcd.h
1547 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1548 touch stamp-bcopcode
1550 bc-opname.h
: stamp-bcopname
; @true
1551 stamp-bcopname
: $(srcdir)/bytecode.def bi-opname
$(srcdir)/move-if-change
1552 .
/bi-opname
< $(srcdir)/bytecode.def
>tmp-bcopnm.h
1553 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1554 touch stamp-bcopname
1556 bytecode.
mostlyclean:
1557 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1559 bytecode.
distclean bytecode.
clean: bytecode.
mostlyclean
1560 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1562 bytecode.maintainer-clean
: bytecode.
clean
1563 -rm -f bi-parser.c bi-parser.h
1566 # Remake cpp and protoize.
1568 # Making the preprocessor
1571 ln
$(CCCP
)$(exeext
) cpp$(exeext
) > /dev
/null
2>&1 \
1572 || cp
$(CCCP
)$(exeext
) cpp$(exeext
)
1573 cccp
: cccp.o cexp.o version.o
$(LIBDEPS
)
1574 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cccp.o cexp.o \
1576 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
)
1577 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1578 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1579 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1581 cccp.o
: cccp.c
$(CONFIG_H
) pcp.h version.c config.status
1582 # The reason we use $(libdir)/g++-include rather than using libsubdir
1583 # is for compatibility with the current version of libg++.
1584 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1585 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1586 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1587 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1588 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1589 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1590 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1592 cppmain
: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1593 version.o
$(LIBDEPS
)
1594 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cppmain.o cpplib.o cpphash.o \
1595 cppalloc.o cpperror.o cppexp.o version.o
$(LIBS
)
1597 cpplib.o
: cpplib.c
$(CONFIG_H
) pcp.h version.c config.status
1598 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1599 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1600 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1601 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1602 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1603 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1604 -c
`echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1606 # Note for the stamp targets, we run the program `true' instead of
1607 # having an empty command (nothing following the semicolon).
1609 proto
: config.status protoize unprotoize SYSCALLS.c.X
1611 protoize
: protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1612 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1613 protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1614 protoize.o
: stamp-proto
; @true
1616 unprotoize
: unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1617 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1618 unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1619 unprotoize.o
: stamp-proto
; @true
1621 stamp-proto
: protoize.c getopt.h
$(CONFIG_H
)
1622 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1623 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1624 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1625 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1626 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1627 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1628 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1629 -DUNPROTOIZE
$(srcdir)/protoize.c
1630 mv protoize
$(objext
) unprotoize
$(objext
)
1631 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1632 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1633 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1634 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1635 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1636 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1637 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1638 $(srcdir)/protoize.c
1641 getopt.o
: getopt.c getopt.h
1642 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1643 getopt1.o
: getopt1.c getopt.h
1644 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1646 # This info describes the target machine, so compile with GCC just built.
1647 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) \
1649 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1650 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1651 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1652 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
1653 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1656 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1657 -rm -f tmp-proto.
[cso
]
1658 cp
$(srcdir)/protoize.c tmp-proto.c
1659 chmod u
+w tmp-proto.c
1660 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1661 $(CFLAGS) $(INCLUDES) \
1662 -DGCC_INCLUDE_DIR=0 \
1663 -DGPLUSPLUS_INCLUDE_DIR=0 \
1664 -DCROSS_INCLUDE_DIR=0 \
1665 -DTOOL_INCLUDE_DIR=0 \
1666 -DSTD_PROTO_DIR=0" tmp-proto.c
1667 @echo
'**********' Expect
400 lines of differences.
1668 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
1669 -wc
-l tmp-proto.diff
1670 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1671 $(CFLAGS) $(INCLUDES) \
1672 -DGCC_INCLUDE_DIR=0 \
1673 -DGPLUSPLUS_INCLUDE_DIR=0 \
1674 -DCROSS_INCLUDE_DIR=0 \
1675 -DTOOL_INCLUDE_DIR=0 \
1676 -DSTD_PROTO_DIR=0" tmp-proto.c
1677 @echo Expect zero differences.
1678 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1679 -rm -f tmp-proto.
[cs
] tmp-proto
$(objext
)
1681 # Build the include directory. The stamp files are stmp-* rather than
1682 # stamp-* so that mostlyclean does not force the include directory to
1685 # Build the include directory except for float.h (which depends upon
1687 stmp-int-hdrs
: stmp-fixinc
$(USER_H
) xlimits.h objc-headers
1688 # Copy in the headers provided with gcc.
1689 # The sed command gets just the last file name component;
1690 # this is necessary because VPATH could add a dirname.
1691 # Using basename would be simpler, but some systems don't have it.
1694 for file in
$(USER_H
); do \
1695 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1696 rm -f
$$objdir/include/$$realfile; \
1697 cp ginclude
/$$realfile $$objdir/include; \
1698 chmod a
+r
$$objdir/include/$$realfile; \
1700 rm -f
include/limits.h
1701 cp xlimits.h
include/limits.h
1702 chmod a
+r
include/limits.h
1703 # Install the README
1704 rm -f
include/README
1705 cp
$(srcdir)/README-fixinc
include/README
1706 chmod a
+r
include/README
1709 # Build the complete include directory.
1710 stmp-headers
: stmp-int-hdrs gfloat.h
1711 rm -f
include/float.h
1712 cp gfloat.h
include/float.h
1713 chmod a
+r
include/float.h
1716 # Build fixed copies of system files.
1717 stmp-fixinc
: $(FIXINCLUDES
) gsyslimits.h
1720 if
[ x
$(FIXINCLUDES
) != xMakefile.in
]; \
1722 for
dir in
$(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
); do \
1725 $(SHELL
) $(srcdir)/$(FIXINCLUDES
) include $$dir; \
1730 rm -f
include/syslimits.h
1731 if
[ -f
include/limits.h
]; then \
1732 mv
include/limits.h
include/syslimits.h
; \
1734 cp
$(srcdir)/gsyslimits.h
include/syslimits.h
; \
1736 chmod a
+r
include/syslimits.h
1739 # copy objc header files into build directory
1740 objc-headers
: stmp-fixinc
1741 if
[ -d
include ]; then true
; else mkdir
include; fi
1742 if
[ -d objc
]; then true
; else mkdir objc
; fi
1744 srcdir1
=`cd $(srcdir); pwd`; \
1746 $(MAKE
) -f
$${srcdir1}/objc
/Makefile copy-headers \
1747 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1748 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
1749 GCC_CFLAGS
="$(GCC_CFLAGS)" incinstalldir
=$${thisdir1}/include
1752 # Files related to the fixproto script.
1754 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
1755 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1757 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
1758 mv tmp-deduced.h deduced.h
1760 gen-protos
: gen-protos.o scan.o cppalloc.o
$(HOST_LIBDEPS
)
1761 ${HOST_CC} $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1762 gen-protos.o scan.o cppalloc.o
$(HOST_LIBS
)
1764 gen-protos.o
: gen-protos.c scan.h
$(build_xm_file
)
1765 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gen-protos.c
1767 scan.o
: scan.c scan.h
$(build_xm_file
)
1768 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan.c
1770 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1771 cat deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
1772 mv tmp-fixtmp.c fixtmp.c
1773 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
1774 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
1775 | .
/gen-protos
>xsys-protos.hT
1776 mv xsys-protos.hT xsys-protos.h
1779 fix-header
: fix-header.o scan-decls.o scan.o xsys-protos.h
$(HOST_LIBDEPS
) \
1780 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1781 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ fix-header.o \
1782 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1783 cppexp.o
$(HOST_LIBS
)
1785 fix-header.o
: fix-header.c obstack.h scan.h xsys-protos.h
$(build_xm_file
)
1786 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/fix-header.c
1788 scan-decls.o
: scan-decls.c scan.h
$(build_xm_file
)
1789 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan-decls.c
1791 # stmp-fixproto depends on this, not on fix-header directly.
1792 # The idea is to make sure fix-header gets built,
1793 # but not rerun fixproto after each stage
1794 # just because fix-header's mtime has changed.
1795 fixhdr.ready
: fix-header
1796 -if
[ -f fixhdr.ready
] ; then \
1799 touch fixhdr.ready
; \
1802 # stmp-headers is to make sure fixincludes has already finished.
1803 # The if statement is so that we don't run fixproto a second time
1804 # if it has already been run on the files in `include'.
1805 stmp-fixproto
: fixhdr.ready fixproto stmp-headers
1806 @echo
"Various warnings and error messages from fixproto are normal"
1807 -if
[ -d
include ] ; then true
; else mkdir
include; fi
1808 -if
[ -f
include/fixed
] ; then true
; \
1810 : This line works around a
'make' bug in BSDI
1.1.
; \
1811 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
1812 $(SHELL
) ${srcdir}/fixproto
include include $(SYSTEM_HEADER_DIR
); \
1813 touch
include/fixed
; \
1817 # Remake the info files.
1820 info: $(srcdir)/cpp.
info $(srcdir)/gcc.
info lang.
info
1822 $(srcdir)/cpp.
info: cpp.texi
1823 cd
$(srcdir); $(MAKEINFO
) cpp.texi
1825 $(srcdir)/gcc.
info: gcc.texi extend.texi
install.texi invoke.texi \
1826 md.texi rtl.texi tm.texi
1827 cd
$(srcdir); $(MAKEINFO
) gcc.texi
1829 dvi: $(srcdir)/gcc.
dvi $(srcdir)/cpp.
dvi lang.
dvi
1831 # This works with GNU Make's default rule.
1832 $(srcdir)/gcc.
dvi: gcc.texi extend.texi
install.texi invoke.texi \
1833 md.texi rtl.texi tm.texi
1836 # This works with GNU Make's default rule.
1837 $(srcdir)/cpp.
dvi: cpp.texi
1840 $(srcdir)/INSTALL
: install1.texi
install.texi
1841 $(MAKEINFO
) -D INSTALLONLY
--no-header
--no-split \
1842 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
1844 # Deletion of files made during compilation.
1845 # There are four levels of this:
1846 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
1847 # `mostlyclean' is useful while working on a particular type of machine.
1848 # It deletes most, but not all, of the files made by compilation.
1849 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1850 # `clean' deletes everything made by running `make all'.
1851 # `distclean' also deletes the files made by config.
1852 # `maintainer-clean' also deletes everything that could be regenerated
1853 # automatically. We remove as much from the language subdirectories as we can
1854 # (less duplicated code).
1857 mostlyclean: bytecode.
mostlyclean lang.
mostlyclean
1858 -rm -f
$(STAGESTUFF
)
1859 # Clean the objc subdir if we created one.
1860 if
[ -d objc
]; then \
1861 srcdir1
=`cd $(srcdir); pwd`; \
1862 cd objc
; $(MAKE
) -f
$$srcdir1/objc
/Makefile
mostlyclean; \
1865 # Delete the temporary source copies for cross compilation.
1866 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
1867 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
1868 -rm -f
$(HOST_PREFIX_1
)obstack.c
1869 # Delete the temp files made in the course of building libgcc.a.
1870 -rm -f tmplibgcc
* tmpcopy xlimits.h
1871 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
1872 # Delete other temporary files.
1873 -rm -f tmp-float.h tmp-gcc.xtar.gz
1874 -rm -f tmp-foo1 tmp-foo2 tmp-proto.
* tmp-unproto
.1 tmp-SYSCALLS.s
1875 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
1876 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
1877 -rm -f tmp-fixtmp.c xsys-protos.hT
1878 # Delete the stamp files.
1879 -rm -f stamp-
* tmp-
*
1880 -rm -f
*/stamp-
* */tmp-
*
1881 # Delete debugging dump files.
1882 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
1883 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
1884 -rm -f
*/*.greg
*/*.lreg
*/*.combine
*/*.flow
*/*.cse
*/*.jump
*/*.rtl
1885 -rm -f
*/*.tree
*/*.loop
*/*.dbr
*/*.jump2
*/*.sched
*/*.cse2
1886 -rm -f
*/*.sched2
*/*.stack
1887 # Delete some files made during installation.
1888 -rm -f specs gfloat.h float.h-
* enquire SYSCALLS.c.X SYSCALLS.c
1889 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
1890 # Delete files generated for fixproto
1891 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
1892 gen-protos fixproto.list fixtmp.
* fixhdr.ready
1893 # Delete unwanted output files from TeX.
1894 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
1895 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
1896 # Delete sorted indices we don't actually use.
1897 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1898 # Delete core dumps.
1901 # Delete all files made by compilation
1902 # that don't exist in the distribution.
1903 clean: mostlyclean bytecode.
clean lang.
clean
1904 # It may not be quite desirable to delete unprotoize.c here,
1905 # but the spec for `make clean' requires it.
1906 # Using unprotoize.c is not quite right in the first place,
1907 # but what better way is there?
1908 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
1909 -rm -f libgcc1.null
$(LIB2FUNCS_EXTRA
)
1912 -if
[ -f md.pre-cpp
]; then \
1915 # Delete the include directory.
1916 -rm -rf stmp-
* include objc-headers
1918 # Delete files used by the "multilib" facility (including libgcc subdirs).
1919 -rm -f multilib.h tmpmultilib
*
1920 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
1921 rm -rf
$(MULTILIB_DIRNAMES
); \
1922 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
1923 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
1926 # Delete all files that users would normally create
1927 # while building and installing GCC.
1928 distclean: clean bytecode.
distclean lang.
distclean
1929 -rm -f tm.h config.h tconfig.h hconfig.h md
1930 -rm -f config.status config.run
1931 -rm -f Makefile specs.h options.h
*.oaux
1932 -rm -fr stage1 stage2 stage3 stage4
1933 -rm -f
*/stage1
*/stage2
*/stage3
*/stage4
*/include
1934 -rm -f objc-parse.output
1935 -rm -f c-parse.output
1938 # Delete anything likely to be found in the source directory
1939 # that shouldn't be in the distribution.
1940 extraclean
: distclean lang.extraclean
1941 -rm -rf
=* .
/"#"* *~
* config
/=* config
/"#"* config
/*~
*
1942 -rm -f patch
* *.orig
*.rej config
/patch
* config
/*.orig config
/*.rej
1943 -rm -f config
/*/=* config
/*/"#"* config
/*/*~
*
1944 -rm -f config
/*/*.orig config
/*/*.rej
1945 -rm -f
*.
dvi *.ps
*.oaux
*.d
*.
[zZ
] *.gz
1946 -rm -f
*.
tar *.xtar
*diff
*.diff.
* *.
tar.
* *.xtar.
* *diffs
1947 -rm -f
*lose config
/*lose config
/*/*lose
1948 -rm -f
*.s
*.s
[0-9] *.i install1.texi config
/ChangeLog
1949 -rm -f
*/=* */"#"* */*~
*
1950 -rm -f
*/patch
* */*.orig
*/*.rej
1951 -rm -f
*/*.
dvi */*.oaux
*/*.d
*/*.
[zZ
] */*.gz
1952 -rm -f
*/*.
tar */*.xtar
*/*diff
*/*.diff.
* */*.
tar.
* */*.xtar.
* */*diffs
1953 -rm -f
*/*lose
*/*.s
*/*.s
[0-9] */*.i
1955 # Get rid of every file that's generated from some other file.
1956 # Most of these files ARE PRESENT in the GCC distribution.
1957 maintainer-clean
: distclean bytecode.maintainer-clean lang.maintainer-clean
1958 -rm -f c-parse.y c-gperf.h objc-parse.y
1959 -rm -f objc-parse.c objc-parse.output
1960 -rm -f c-parse.c c-parse.h c-parse.output
1961 -rm -f cexp.c cexp.output TAGS
1962 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
1963 -rm -f gcc.
info* gcc.??s gcc.
*aux
1965 # Entry points `install' and `uninstall'.
1966 # Also use `install-collect2' to install collect2 when the config files don't.
1968 # The semicolon is to prevent the install.sh -> install default rule
1969 # from doing anything. Having it run true helps avoid problems and
1970 # noise from versions of make which don't like to have null commands.
1971 install: $(INSTALL_TARGET
) ; @true
1973 # Copy the compiler files into directories where they will be run.
1974 # Install the driver last so that the window when things are
1976 install-normal
: install-common
$(INSTALL_HEADERS
) $(INSTALL_LIBGCC
) \
1977 install-libobjc install-man install-info lang.install-normal install-driver
1979 # Do nothing while making gcc with a cross-compiler. The person who
1980 # makes gcc for the target machine has to know how to put a complete
1981 # gcc together by hand.
1982 install-build
: force
1983 @echo You have to
install gcc on your target machine by hand.
1985 # Run this on the target machine
1986 # to finish installation of cross compiler.
1987 install-cross-rest
: install-float-h-cross
1989 # Install float.h for cross compiler.
1990 # Run this on the target machine!
1991 install-float-h-cross
: install-dir
1992 # if [ -f enquire ] ; then true; else false; fi
1993 # Note: don't use -. We should fail right away if enquire was not made.
1994 .
/enquire
-f
> $(tmpdir
)/float.h
1995 -rm -f
$(libsubdir
)/include/float.h
1996 $(INSTALL_DATA
) $(tmpdir
)/float.h
$(libsubdir
)/include/float.h
1997 -rm -f
$(tmpdir
)/float.h
1998 chmod a-x
$(libsubdir
)/include/float.h
2000 # Create the installation directory.
2002 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; chmod a
+rx
$(libdir) ; fi
2003 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; chmod a
+rx
$(libdir)/gcc-lib
; fi
2004 # This dir isn't currently searched by cpp.
2005 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2006 -if
[ -d
$(libdir)/gcc-lib
/$(target
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
) ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
) ; fi
2007 -if
[ -d
$(libdir)/gcc-lib
/$(target
)/$(version
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
)/$(version
) ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
)/$(version
) ; fi
2008 -if
[ -d
$(libdir)/gcc-lib
/$(target
)/$(version
)/include ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
)/$(version
)/include ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
)/$(version
)/include ; fi
2009 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; chmod a
+rx
$(bindir) ; fi
2010 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; chmod a
+rx
$(includedir) ; fi
2011 -if
[ -d
$(tooldir
) ] ; then true
; else mkdir
$(tooldir
) ; chmod a
+rx
$(tooldir
) ; fi
2012 -if
[ -d
$(assertdir
) ] ; then true
; else mkdir
$(assertdir
) ; chmod a
+rx
$(assertdir
) ; fi
2013 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; chmod a
+rx
$(infodir) ; fi
2014 # We don't use mkdir -p to create the parents of mandir,
2015 # because some systems don't support it.
2016 # Instead, we use this technique to create the immediate parent of mandir.
2017 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2018 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; chmod a
+rx
$$parent ; fi
2019 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; chmod a
+rx
$(mandir) ; fi
2021 # Install the compiler executables built during cross compilation.
2022 install-common
: native install-dir
$(EXTRA_PARTS
) lang.install-common
2023 for file in
$(COMPILERS
); do \
2024 if
[ -f
$$file ] ; then \
2025 rm -f
$(libsubdir
)/$$file; \
2026 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2030 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
2031 if
[ x
"$$file" != x..
]; then \
2032 rm -f
$(libsubdir
)/$$file; \
2033 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2036 for file in
$(EXTRA_PARTS
) ..
; do \
2037 if
[ x
"$$file" != x..
]; then \
2038 rm -f
$(libsubdir
)/$$file; \
2039 $(INSTALL_DATA
) $$file $(libsubdir
)/$$file; \
2042 # Don't mess with specs if it doesn't exist yet.
2043 -if
[ -f specs
] ; then \
2044 rm -f
$(libsubdir
)/specs
; \
2045 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
; \
2047 # Install protoize if it was compiled.
2048 -if
[ -f protoize
$(exeext
) ]; \
2050 rm -f
$(bindir)/protoize
$(exeext
); \
2051 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(bindir)/protoize
$(exeext
); \
2052 rm -f
$(bindir)/unprotoize
$(exeext
); \
2053 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(bindir)/unprotoize
$(exeext
); \
2054 rm -f
$(libsubdir
)/SYSCALLS.c.X
; \
2055 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
; \
2056 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
; \
2058 -rm -f
$(libsubdir
)/cpp$(exeext
)
2059 $(INSTALL_PROGRAM
) cpp$(exeext
) $(libsubdir
)/cpp$(exeext
)
2061 # Install the driver program as $(target)-gcc
2062 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2063 install-driver
: xgcc
2064 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2065 rm -f
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2066 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2067 if
[ -d
$(tooldir
)/bin
/.
] ; then \
2068 rm -f
$(tooldir
)/bin
/gcc
$(exeext
); \
2069 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(tooldir
)/bin
/gcc
$(exeext
); \
2072 rm -f
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2073 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2074 rm -f
$(bindir)/$(target
)-gcc-1
$(exeext
); \
2075 ln
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
) \
2077 || cp
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
); \
2078 mv
$(bindir)/$(target
)-gcc-1
$(exeext
) $(bindir)/$(target
)-gcc
$(exeext
); \
2081 # Install the info files.
2082 install-info
: doc install-dir lang.install-info
2083 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2084 cd
$(srcdir); for f in
cpp.
info* gcc.
info*; \
2085 do
$(INSTALL_DATA
) $$f $(infodir)/$$f; done
2086 -chmod a-x
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2088 # Install the man pages.
2089 install-man
: install-dir
$(srcdir)/gcc
.1 $(srcdir)/cccp
.1 lang.install-man
2090 -if
[ -f gcc-cross
] ; then \
2091 rm -f
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2092 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2093 chmod a-x
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2095 rm -f
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2096 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2097 chmod a-x
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2099 -rm -f
$(mandir)/cccp
$(manext)
2100 -$(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
2101 -chmod a-x
$(mandir)/cccp
$(manext)
2103 # Install the library.
2104 install-libgcc
: libgcc.a install-dir
2105 -if
[ -f libgcc.a
] ; then \
2106 rm -f
$(libsubdir
)/libgcc.a
; \
2107 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
2108 if
$(RANLIB_TEST
) ; then \
2109 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
2110 chmod a-x
$(libsubdir
)/libgcc.a
; \
2113 # Install multiple versions of libgcc.a.
2114 install-multilib
: stmp-multilib install-dir
2115 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
2116 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2117 if
[ -d
$(libsubdir
)/$${dir} ]; then true
; else mkdir
$(libsubdir
)/$${dir}; fi
; \
2118 rm -f
$(libsubdir
)/$${dir}/libgcc.a
; \
2119 $(INSTALL_DATA
) $${dir}/libgcc.a
$(libsubdir
)/$${dir}/libgcc.a
; \
2120 if
$(RANLIB_TEST
); then \
2121 (cd
$(libsubdir
)/$${dir}; $(RANLIB
) libgcc.a
); else true
; fi
; \
2122 chmod a-x
$(libsubdir
)/$${dir}/libgcc.a
; \
2125 # Install the objc run time library.
2126 install-libobjc
: install-dir
2127 -if
[ -f libobjc.a
] ; then \
2128 rm -f
$(libsubdir
)/libobjc.a
; \
2129 $(INSTALL_DATA
) libobjc.a
$(libsubdir
)/libobjc.a
; \
2130 if
$(RANLIB_TEST
) ; then \
2131 (cd
$(libsubdir
); $(RANLIB
) libobjc.a
); else true
; fi
; \
2132 chmod a-x
$(libsubdir
)/libobjc.a
; \
2135 # Install all the header files built in the include subdirectory.
2136 install-headers
: install-include-dir
$(INSTALL_HEADERS_DIR
) install-assert-h
2137 # Fix symlinks to absolute paths in the installed include directory to
2138 # point to the installed directory, not the build directory.
2139 -files
=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2140 if
[ $$?
-eq
0 ]; then \
2141 dir=`cd include; pwd`; \
2142 for i in
$$files; do \
2143 dest
=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2144 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2145 rm -f
$(libsubdir
)/include/$$i; \
2146 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir
)/include/$$i; \
2151 # Create or recreate the gcc private include file directory.
2152 install-include-dir
: install-dir
2153 -rm -rf
$(libsubdir
)/include
2154 mkdir
$(libsubdir
)/include
2155 -chmod a
+rx
$(libsubdir
)/include
2157 # Install the include directory using tar.
2158 install-headers-tar
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2160 tar -cf
- .
; exit
0) |
(cd
$(libsubdir
)/include; tar $(TAROUTOPTS
) - )
2161 # /bin/sh on some systems returns the status of the first tar,
2162 # and that can lose with GNU tar which always writes a full block.
2163 # So use `exit 0' to ignore its exit status.
2165 # Install the include directory using cpio.
2166 install-headers-cpio
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2167 (cd
include; find .
-print) |
(cd
include; cpio
-pdum
$(libsubdir
)/include)
2169 # Put assert.h where it won't override GNU libc's assert.h.
2170 # It goes in a dir that is searched after GNU libc's headers;
2171 # thus, the following conditionals are no longer needed.
2172 # But it's not worth deleting them now.
2173 ## Don't replace the assert.h already there if it is not from GCC.
2174 ## This code would be simpler if it tested for -f ... && ! grep ...
2175 ## but supposedly the ! operator is missing in sh on some systems.
2176 install-assert-h
: assert.h install-dir
2177 if
[ -f
$(assertdir
)/assert.h
]; \
2179 if grep
"__eprintf" $(assertdir
)/assert.h
>/dev
/null
; \
2181 rm -f
$(assertdir
)/assert.h
; \
2182 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2183 chmod a-x
$(assertdir
)/assert.h
; \
2187 rm -f
$(assertdir
)/assert.h
; \
2188 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2189 chmod a-x
$(assertdir
)/assert.h
; \
2192 # Use this target to install the program `collect2' under the name `ld'.
2193 install-collect2
: collect2 install-dir
2194 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(libsubdir
)/ld$(exeext
)
2195 # Install the driver program as $(libsubdir)/gcc for collect2.
2196 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(libsubdir
)/gcc
$(exeext
)
2198 # Cancel installation by deleting the installed files.
2199 uninstall: lang.
uninstall
2200 -rm -rf
$(libsubdir
)
2201 -rm -rf
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2202 -rm -rf
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
)
2203 -rm -rf
$(bindir)/protoize
$(exeext
)
2204 -rm -rf
$(bindir)/unprotoize
$(exeext
)
2205 -rm -rf
$(mandir)/$(GCC_INSTALL_NAME
)$(manext)
2206 -rm -rf
$(mandir)/$(GCC_CROSS_NAME
)$(manext)
2207 -rm -rf
$(mandir)/cccp
$(manext)
2208 -rm -rf
$(mandir)/protoize
$(manext)
2209 -rm -rf
$(mandir)/unprotoize
$(manext)
2211 # These exist for maintenance purposes.
2213 # Update the tags table.
2217 mv
-f c-parse.
[ch
] objc-parse.c cexp.c
=*.
[chy
] temp
; \
2218 etags
*.y
*.h
*.c
; \
2222 # Create the distribution tar file.
2223 #dist: gcc-$(version).tar.gz
2226 gcc.xtar.gz
: gcc.xtar
2227 gzip
--best
< gcc.xtar
> tmp-gcc.xtar.gz
2228 mv tmp-gcc.xtar.gz gcc.xtar.gz
2230 #gcc-$(version).tar.gz: gcc-$(version).tar
2231 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2233 #gcc-$(version).tar:
2235 # Make the distribution.
2236 tar -chf gcc.xtar gcc-
$(version
)
2238 # This target exists to do the initial work before the language specific
2240 distdir-start
: doc
$(srcdir)/INSTALL
$(srcdir)/c-parse.y
$(srcdir)/c-gperf.h \
2241 $(srcdir)/objc-parse.y
$(srcdir)/c-parse.c
$(srcdir)/objc-parse.c \
2243 @if grep
-s
"for version ${mainversion}" gcc.texi
> /dev
/null
; \
2245 else echo
"You must update the version number in \`gcc.texi'"; sleep
10;\
2247 # Update the version number in README
2248 awk
'$$1 " " $$2 " " $$3 == "This directory contains" \
2249 { $$6 = version; print $$0 } \
2250 $$1 " " $$2 " " $$3 != "This directory contains"' \
2251 version
=$(version
) README
> tmp.README
2252 mv tmp.README README
2253 -rm -rf gcc-
$(version
) tmp
2254 # Put all the files in a temporary subdirectory
2255 # which has the name that we want to have in the tar file.
2260 for file in
*[0-9a-zA-Z
+]; do \
2261 ln
$$file tmp
> /dev
/null
2>&1 || cp
$$file tmp
; \
2264 for file in
*[0-9a-zA-Z
+]; do \
2265 if
test -d
$$file && test "$$file" != RCS
; then \
2266 mkdir ..
/tmp
/config
/$$file; \
2268 for subfile in
*[0-9a-zA-Z
+]; do \
2269 ln
$$subfile ..
/..
/tmp
/config
/$$file >/dev
/null
2>&1 \
2270 || cp
$$subfile ..
/..
/tmp
/config
/$$file; \
2274 ln
$$file ..
/tmp
/config
>/dev
/null
2>&1 \
2275 || cp
$$file ..
/tmp
/config
; \
2279 for file in
*[0-9a-zA-Z
+]; do \
2280 ln
$$file ..
/tmp
/ginclude
>/dev
/null
2>&1 \
2281 || cp
$$file ..
/tmp
/ginclude
; \
2284 for file in
*[0-9a-zA-Z
+]; do \
2285 ln
$$file ..
/tmp
/objc
>/dev
/null
2>&1 || cp
$$file ..
/tmp
/objc
; \
2289 # Finish making `distdir', after the languages have done their thing.
2291 mv tmp gcc-
$(version
)
2292 # Get rid of everything we don't want in the distribution. We'd want
2293 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2295 cd gcc-
$(version
); make extraclean
2297 distdir
: distdir-start lang.distdir distdir-finish
2299 # make diff oldversion=M.N
2300 # creates a diff file between an older distribution and this one.
2301 # The -P option assumes this is GNU diff.
2303 diff
-rc2P
-x c-parse.y
-x c-parse.c
-x c-parse.h
-x c-gperf.h \
2304 -x cexp.c
-x bi-parser.c
-x objc-parse.y
-x objc-parse.c \
2306 -x
"gcc.??" -x
"gcc.??s" -x gcc.aux
-x
"gcc.info*" \
2307 -x
"cpp.??" -x
"cpp.??s" -x
cpp.aux
-x
"cpp.info*" \
2308 $(LANG_DIFF_EXCLUDES
) \
2309 gcc-
$(oldversion
) gcc-
$(version
) > diffs
2312 # Only build the C compiler for stage1, because that is the only one that
2313 # we can guarantee will build with the native compiler, and also it is the
2314 # only thing useful for building stage2.
2315 $(MAKE
) CC
="$(CC)" libdir=$(libdir) LANGUAGES
=c
2317 # This used to define ALLOCA as empty, but that would lead to bad results
2318 # for a subsequent `make install' since that would not have ALLOCA empty.
2319 # To prevent `make install' from compiling alloca.o and then relinking cc1
2320 # because alloca.o is newer, we permit these recursive makes to compile
2321 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2322 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2324 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2327 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2329 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2332 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2334 # Compare the object files in the current directory with those in the
2337 # ./ avoids bug in some versions of tail.
2339 for file in
*$(objext
); do \
2340 tail
+16c .
/$$file > tmp-foo1
; \
2341 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2342 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2344 for
dir in tmp-foo
$(SUBDIRS
); do \
2345 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2346 for file in
$$dir/*$(objext
); do \
2347 tail
+16c .
/$$file > tmp-foo1
; \
2348 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2349 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2355 # Similar, but compare with stage3 directory
2357 for file in
*$(objext
); do \
2358 tail
+16c .
/$$file > tmp-foo1
; \
2359 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2360 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2362 for
dir in tmp-foo
$(SUBDIRS
); do \
2363 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2364 for file in
$$dir/*$(objext
); do \
2365 tail
+16c .
/$$file > tmp-foo1
; \
2366 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2367 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2373 # Compare the object files in the current directory with those in the
2374 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2375 # running tail and the overhead of twice copying each object file.
2378 for file in
*$(objext
); do \
2379 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2381 for
dir in tmp-foo
$(SUBDIRS
); do \
2382 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2383 for file in
$$dir/*.o
; do \
2384 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2389 # Similar, but compare with stage3 directory
2391 for file in
*$(objext
); do \
2392 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2394 for
dir in tmp-foo
$(SUBDIRS
); do \
2395 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2396 for file in
$$dir/*$(objext
); do \
2397 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2402 # Copy the object files from a particular stage into a subdirectory.
2404 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2405 -for
dir in .
$(SUBDIRS
) ; \
2407 if
[ -d stage1
/$$dir ] ; then true
; else mkdir stage1
/$$dir ; fi
; \
2409 -mv
$(STAGESTUFF
) stage1
2410 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2411 # dir will work properly.
2412 -if
[ -f
as$(exeext
) ] ; then ln
-s
as$(exeext
) stage1 || cp
as$(exeext
) stage1
; else true
; fi
2413 -if
[ -f
ld$(exeext
) ] ; then ln
-s
ld$(exeext
) stage1 || cp
ld$(exeext
) stage1
; else true
; fi
2414 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s collect-ld
$(exeext
) stage1 || cp collect-ld
$(exeext
) stage1
; else true
; fi
2415 -rm -f stage1
/libgcc.a
2417 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
2418 stage1
: force stage1-start lang.stage1
2421 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2422 -for
dir in .
$(SUBDIRS
) ; \
2424 if
[ -d stage2
/$$dir ] ; then true
; else mkdir stage2
/$$dir ; fi
; \
2426 -mv
$(STAGESTUFF
) stage2
2427 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2428 # dir will work properly.
2429 -if
[ -f
as$(exeext
) ] ; then ln
-s
as$(exeext
) stage2 || cp
as$(exeext
) stage2
; else true
; fi
2430 -if
[ -f
ld$(exeext
) ] ; then ln
-s
ld$(exeext
) stage2 || cp
ld$(exeext
) stage2
; else true
; fi
2431 -if
[ -f collect-ld
] ; then ln
-s collect-ld
$(exeext
) stage2 || cp collect-ld
$(exeext
) stage2
; else true
; fi
2432 -rm -f stage2
/libgcc.a
2434 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
2435 stage2
: force stage2-start lang.stage2
2438 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2439 -for
dir in .
$(SUBDIRS
) ; \
2441 if
[ -d stage3
/$$dir ] ; then true
; else mkdir stage3
/$$dir ; fi
; \
2443 -mv
$(STAGESTUFF
) stage3
2444 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2445 # dir will work properly.
2446 -if
[ -f
as$(exeext
) ] ; then ln
-s
as$(exeext
) stage3 || cp
as$(exeext
) stage3
; else true
; fi
2447 -if
[ -f
ld$(exeext
) ] ; then ln
-s
ld$(exeext
) stage3 || cp
ld$(exeext
) stage3
; else true
; fi
2448 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s collect-ld
$(exeext
) stage3 || cp collect-ld
$(exeext
) stage3
; else true
; fi
2449 -rm -f stage3
/libgcc.a
2451 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
2452 stage3
: force stage3-start lang.stage3
2455 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2456 -for
dir in .
$(SUBDIRS
) ; \
2458 if
[ -d stage4
/$$dir ] ; then true
; else mkdir stage4
/$$dir ; fi
; \
2460 -mv
$(STAGESTUFF
) stage4
2461 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2462 # dir will work properly.
2463 -if
[ -f
as$(exeext
) ] ; then ln
-s
as$(exeext
) stage4 || cp
as$(exeext
) stage4
; else true
; fi
2464 -if
[ -f
ld$(exeext
) ] ; then ln
-s
ld$(exeext
) stage4 || cp
ld$(exeext
) stage4
; else true
; fi
2465 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s collect-ld
$(exeext
) stage4 || cp collect-ld
$(exeext
) stage4
; else true
; fi
2466 -rm -f stage4
/libgcc.a
2468 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
2469 stage4
: force stage4-start lang.stage4
2471 # Copy just the executable files from a particular stage into a subdirectory,
2472 # and delete the object files. Use this if you're just verifying a version
2473 # that is pretty sure to work, and you are short of disk space.
2474 risky-stage1
: stage1
2477 risky-stage2
: stage2
2480 risky-stage3
: stage3
2483 risky-stage4
: stage4
2486 #In GNU Make, ignore whether `stage*' exists.
2487 .PHONY
: stage1 stage2 stage3 stage4
clean maintainer-clean TAGS bootstrap
2488 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4