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
)
75 # For GNUmake: let us decide what gets passed to recursive makes.
78 # Define this as & to perform parallel make on a Sequent.
79 # Note that this has some bugs, and it seems currently necessary
80 # to compile all the gen* files first by hand to avoid erroneous results.
83 # How to invoke ranlib.
85 # Test to use to see whether ranlib exists on the system.
86 RANLIB_TEST
= [ -f
/usr
/bin
/ranlib
-o
-f
/bin
/ranlib
]
88 # Compiler to use for compiling libgcc1.a.
89 # OLDCC should not be the GNU C compiler,
90 # since that would compile typical libgcc1.a functions such as mulsi3
91 # into infinite recursions.
94 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
95 # NOTE: -O does not work on some Unix systems!
98 # Version of ar to use when compiling libgcc1.a.
101 # Target to use when installing include directory. Either
102 # install-headers-tar or install-headers-cpio.
103 INSTALL_HEADERS_DIR
= install-headers-tar
105 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
106 # Usually the one we just built.
107 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
108 GCC_FOR_TARGET
= .
/xgcc
-B.
/
110 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
111 # It omits XCFLAGS, and specifies -B./.
112 # It also specifies -I./include to find, e.g., stddef.h.
113 GCC_CFLAGS
=$(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) -I.
/include
115 # Special flags for compiling enquire.
116 # We disable optimization to make floating point more reliable.
117 ENQUIRE_CFLAGS
= -DNO_MEM
-DNO_LONG_DOUBLE_IO
-O0
118 ENQUIRE_LDFLAGS
= $(LDFLAGS
)
120 # Sed command to transform gcc to installed name. Overwritten by configure.
121 program_transform_name
= -e s
,x
,x
,
122 program_transform_cross_name
= -e s
,^
,$(target
)-,
124 # Tools to use when building a cross-compiler.
125 # These are used because `configure' appends `cross-make'
126 # to the makefile when making a cross-compiler.
128 TARGET_TOOLPREFIX
= $(tooldir
)/bin
/
129 AR_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ar
130 AR_FOR_TARGET_FLAGS
= rc
131 RANLIB_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ranlib
132 RANLIB_TEST_FOR_TARGET
= [ -f
$(TARGET_TOOLPREFIX
)ranlib
]
134 # Dir to search for system headers. Overridden by cross-make.
135 SYSTEM_HEADER_DIR
= /usr
/include
137 # Control whether to run fixproto.
138 STMP_FIXPROTO
= stmp-fixproto
140 # Test to see whether <limits.h> exists in the system header files.
141 LIMITS_H_TEST
= [ -f
$(SYSTEM_HEADER_DIR
)/limits.h
]
143 # There may be a premade insn-attrtab.c for this machine.
144 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
145 # PREMADE_ATTRTAB is the file name of the file to use.
146 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
147 PREMADE_ATTRTAB_MD
= Makefile
# Guaranteed not to cmp equal to md.
150 target
= ...
`configure' substitutes actual target name here.
151 xmake_file= ... `configure
' substitutes actual x- file name here.
152 tmake_file= ... `configure' substitutes actual t- file name here.
153 version
=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
154 mainversion
=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
156 # Directory where sources are, from where we are.
158 # Common prefix for installation directories.
159 # NOTE: This directory must exist when you start installation.
161 # Directory in which to put localized header files. On the systems with
162 # gcc as the native cc, `local_prefix' may not be `prefix' which is
164 # NOTE: local_prefix *should not* default from prefix.
165 local_prefix
= /usr
/local
166 # Directory in which to put host dependent programs and libraries
167 exec_prefix = $(prefix)
168 # Directory in which to put the executable for the command `gcc'
169 bindir = $(exec_prefix)/bin
170 # Directory in which to put the directories used by the compiler.
171 libdir = $(exec_prefix)/lib
172 # Directory in which the compiler finds executables, libraries, etc.
173 libsubdir
= $(libdir)/gcc-lib
/$(target
)/$(version
)
174 # Directory in which the compiler finds g++ includes.
175 gxx_include_dir
= $(libdir)/g
++-include
176 # Directory to search for site-specific includes.
177 includedir = $(local_prefix
)/include
178 # assertdir is overridden in cross-make.
179 # (But this currently agrees with what is in cross-make.)
180 assertdir
= $(tooldir
)/include
181 # where the info files go
182 infodir = $(prefix)/info
183 # Extension (if any) to put in installed man-page filename.
189 # Directory in which to put man pages.
190 mandir = $(prefix)/man
/man1
191 # Directory in which to find other cross-compilation tools and headers.
192 # Used in install-cross.
193 tooldir
= $(exec_prefix)/$(target
)
194 # Dir for temp files.
197 # Additional system libraries to link with.
200 # Change this to a null string if obstacks are installed in the
204 # Specify the rule for actually making libgcc.a,
206 # and the rule for installing it.
207 INSTALL_LIBGCC
= install-libgcc
209 # Specify the rule for actually making libgcc1.a.
210 # The value may be empty; that means to do absolutely nothing
211 # with or for libgcc1.a.
214 # Specify the rule for making libgcc1.a for a cross-compiler.
215 # The default rule assumes that libgcc1.a is supplied by the user.
216 CROSS_LIBGCC1
= libgcc1.cross
218 # Specify the rule for actually making libgcc2.a.
221 # Options to use when compiling libgcc2.a.
222 # -g1 causes output of debug info only for file-scope entities.
223 # we use this here because that should be enough, and also
224 # so that -g1 will be tested.
225 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) -g1
227 # Additional options to use when compiling libgcc2.a.
228 # Some targets override this to -Iinclude
231 # Things which must be built before building libgcc2.a.
232 # Some targets override this to stmp-int-hdrs
235 # Enquire target (This is a variable so that a target can choose not to
239 # libgcc1-test target (must also be overridable for a target)
240 LIBGCC1_TEST
= libgcc1-test
242 # List of extra executables that should be compiled for this target machine
243 # that are used for compiling from source code to object code.
244 # The rules for compiling them should be in the t-* file for the machine.
247 # Like EXTRA_PASSES, but these are used when linking.
250 # List of extra object files that should be compiled for this target machine.
251 # The rules for compiling them should be in the t-* file for the machine.
254 # List of extra object files that should be compiled and linked with
255 # compiler proper (cc1, cc1obj, cc1plus).
258 # List of additional header files to install.
259 # Often this is edited directly by `configure'.
262 # Set this to `ld' to enable use of collect2.
264 # It is convenient for configure to add the assignment at the beginning,
265 # so don't override it here.
267 # List of extra C and assembler files to add to libgcc1.a.
268 # Assembler files should have names ending in `.asm'.
271 # List of extra C and assembler files to add to libgcc2.a.
272 # Assembler files should have names ending in `.asm'.
275 # Default float.h source to use for cross-compiler.
276 CROSS_FLOAT_H
=float.h-cross
278 # Program to convert libraries.
281 # Control whether header files are installed.
282 INSTALL_HEADERS
=install-headers
284 # Options for tar when copying trees. So HPUX can override it.
287 # Select which version of fixincludes to use (I.E. regular versus SVR4)
288 # This value is overridden directly by configure.
289 FIXINCLUDES
=fixincludes
291 # Additional directories of header files to run fixincludes on.
292 # These should be directories searched automatically by default
293 # just as /usr/include is.
294 # *Do not* use this for directories that happen to contain
295 # header files, but are not searched automatically by default.
296 # On most systems, this is empty.
297 OTHER_FIXINCLUDES_DIRS
=
299 # List of things which should already be built whenever we try to use xgcc
300 # to compile anything (without linking).
301 GCC_PASSES
=xgcc cc1
cpp $(EXTRA_PASSES
)
303 # List of things which should already be built whenever we try to use xgcc
305 GCC_PARTS
=$(GCC_PASSES
) $(LIBGCC
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
307 # Directory to link to, when using the target `maketest'.
310 # Guaranteed to not exist when not passing md through cpp.
311 # This value is overridden directly by configure.
312 MD_FILE
= md-cpp-not-used
314 # Flags to use when cross-building GCC.
315 # Prefix to apply to names of object files when using them
316 # to run on the machine we are compiling on.
318 # Prefix to apply to names of object files when compiling them
319 # to run on the machine we are compiling on.
320 # The default for this variable is chosen to keep these rules
321 # out of the way of the other rules for compiling the same source files.
324 HOST_CFLAGS
=$(ALL_CFLAGS
)
326 HOST_LDFLAGS
=$(LDFLAGS
)
327 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
328 HOST_ALLOCA
=$(ALLOCA
)
329 HOST_MALLOC
=$(MALLOC
)
330 HOST_OBSTACK
=$(OBSTACK
)
332 # Actual name to use when installing a native compiler.
333 GCC_INSTALL_NAME
= `t='$(program_transform_name)'; echo gcc | sed $$t`
335 # Actual name to use when installing a cross-compiler.
336 GCC_CROSS_NAME
= `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
338 # Choose the real default target.
341 # Choose the real install target.
342 INSTALL_TARGET
=install-normal
344 # Source for float.h. Overridden by cross-make.
347 # Extra symbols for fixproto to define when parsing headers.
350 # Extra flags to use when compiling crt{begin,end}.o.
353 # End of variables for you to override.
355 # Definition of `all' is here so that new rules inserted by sed
356 # do not specify the default target.
357 # The real definition is under `all.internal' (for native compilers)
358 # or `all.cross' (for cross compilers).
361 # This tells GNU Make version 3 not to put all variables in the environment.
364 # sed inserts variable overrides after the following line.
370 # Now figure out from those variables how to compile and link.
374 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
375 # ??? IN_GCC should be obsolete now.
376 INTERNAL_CFLAGS
= $(CROSS
) -DIN_GCC
378 # This is the variable actually used when we compile.
379 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
)
382 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
384 # Even if ALLOCA is set, don't use it if compiling with GCC.
385 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
386 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
387 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
388 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
390 # Dependency on obstack, alloca, malloc or whatever library facilities
391 # are not installed in the system libraries.
392 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
393 LIBDEPS
= $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
395 # Likewise, for use in the tools that must run on this machine
396 # even if we are cross-building GCC.
397 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
398 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
400 # How to link with both our special library facilities
401 # and the system's installed libraries.
402 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(CLIB
)
404 # Likewise, for use in the tools that must run on this machine
405 # even if we are cross-building GCC.
406 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
409 HOST_RTL
= $(HOST_PREFIX
)rtl.o
410 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
411 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
413 # Specify the directories to be searched for header files.
414 # Both . and srcdir are used, in that order,
415 # so that tm.h and config.h will be found in the compilation
416 # subdirectory rather than in the source directory.
417 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
419 # Always use -I$(srcdir)/config when compiling.
421 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
423 # This tells GNU make version 3 not to export all the variables
424 # defined in this file into the environment.
427 # Support for additional languages (other than c and objc).
428 # ??? objc can be supported this way too (leave for later).
430 # These next lines are overridden by configure.
435 # Flags to pass to recursive makes.
436 # CC is set by configure. Hosts without symlinks need special handling
437 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
439 # ??? The choices here will need some experimenting with.
441 "AR_FLAGS=$(AR_FLAGS)" \
442 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
444 "BISONFLAGS=$(BISONFLAGS)" \
445 "CC=set-by-configure" \
447 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
448 "LDFLAGS=$(LDFLAGS)" \
450 "LEXFLAGS=$(LEXFLAGS)" \
451 "MAKEINFO=$(MAKEINFO)" \
452 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
453 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
454 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
456 "exec_prefix=$(exec_prefix)" \
458 "tooldir=$(tooldir)" \
460 "libsubdir=$(libsubdir)"
462 # Lists of files for various purposes.
464 # A list of all the language-specific executables.
465 # This is overridden by configure.
466 COMPILERS
= cc1
$(exeext
) cc1obj
$(exeext
)
468 # Language-specific object files for C.
469 C_OBJS
= c-parse.o c-lang.o c-lex.o c-pragma.o \
470 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
472 # Language-specific object files for Objective C.
473 OBJC_OBJS
= objc-parse.o objc-act.o c-lex.o c-pragma.o \
474 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
476 # Files specific to the C interpreter bytecode compiler(s).
477 BC_OBJS
= bc-emit.o bc-optab.o
479 # Language-independent object files.
480 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
481 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
482 rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
483 dbxout.o sdbout.o dwarfout.o xcoffout.o \
484 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
485 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
486 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
487 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
488 insn-attrtab.o aux-output.o getpwd.o convert.o
$(EXTRA_OBJS
)
490 # GEN files are listed separately, so they can be built before doing parallel
491 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
492 # them before rtl.o is compiled.
493 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
496 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
499 # Files to be copied away after each stage in building.
500 STAGESTUFF
= *.o insn-flags.h insn-config.h insn-codes.h \
501 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
502 insn-attr.h insn-attrtab.c insn-opinit.c \
503 stamp-flags stamp-config stamp-codes \
504 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
505 stamp-attr stamp-attrtab stamp-opinit stamp-proto \
506 genemit
$(exeext
) genoutput
$(exeext
) genrecog
$(exeext
) genextract
$(exeext
) \
507 genflags
$(exeext
) gencodes
$(exeext
) genconfig
$(exeext
) genpeep
$(exeext
) \
508 genattrtab
$(exeext
) genattr
$(exeext
) genopinit
$(exeext
) \
509 bc-arity.h bc-opcode.h bc-opname.h \
510 stamp-bcarity stamp-bcopcode stamp-bcopname \
511 bi-arity
$(exeext
) bi-opcode
$(exeext
) bi-opname
$(exeext
) \
512 $(GCC_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) $(CCCP
) \
513 cc1obj
$(exeext
) enquire
$(exeext
) protoize
$(exeext
) unprotoize
$(exeext
) \
514 specs collect2
$(exeext
) $(USE_COLLECT2
) \
517 # Members of libgcc1.a.
518 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
519 _lshrsi3 _ashrsi3 _ashlsi3 \
520 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
521 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
522 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
523 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
524 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
526 # Library members defined in libgcc2.c.
527 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
528 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
529 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
530 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
531 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
532 _fixtfdi _fixunstfdi _floatditf \
533 __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
534 _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
537 # Header files that are made available under the same name
538 # to programs compiled with GCC.
539 USER_H
= $(srcdir)/ginclude
/stdarg.h
$(srcdir)/ginclude
/stddef.h \
540 $(srcdir)/ginclude
/varargs.h
$(srcdir)/ginclude
/va-alpha.h \
541 $(srcdir)/ginclude
/va-h8300.h
$(srcdir)/ginclude
/va-i860.h \
542 $(srcdir)/ginclude
/va-i960.h
$(srcdir)/ginclude
/va-mips.h \
543 $(srcdir)/ginclude
/va-m88k.h
$(srcdir)/ginclude
/va-pa.h \
544 $(srcdir)/ginclude
/va-pyr.h
$(srcdir)/ginclude
/va-sparc.h \
545 $(srcdir)/ginclude
/va-clipper.h
$(srcdir)/ginclude
/va-spur.h \
546 $(srcdir)/ginclude
/iso646.h \
547 $(srcdir)/ginclude
/proto.h
$(EXTRA_HEADERS
)
549 # The files that "belong" in CONFIG_H are deliberately omitted
550 # because having them there would not be useful in actual practice.
551 # All they would do is cause complete recompilation every time
552 # one of the machine description files is edited.
553 # That may or may not be what one wants to do.
554 # If it is, rm *.o is an easy way to do it.
555 # CONFIG_H = config.h tm.h
557 RTL_H
= rtl.h rtl.def machmode.h machmode.def
558 TREE_H
= tree.h real.h tree.def machmode.h machmode.def
559 BYTECODE_H
= bytecode.h bc-emit.h bc-optab.h
561 # Language makefile fragments.
563 # The following targets define the interface between us and the languages.
565 # all.build, all.cross, start.encap, rest.encap,
567 # install-normal, install-common, install-info, install-man,
568 # uninstall, distdir,
569 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
570 # stage1, stage2, stage3, stage4
572 # Each language is linked in with a series of hooks (since we can't use `::'
573 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
574 # Configure computes and adds these here.
578 # sed inserts language fragments after the following line.
579 ####language fragments
581 # End of language makefile fragments.
583 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
586 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
$(srcdir)/version.c \
587 $(srcdir)/config
/$(xmake_file
) $(srcdir)/config
/$(tmake_file
) \
589 cp config.status config.run
593 all.internal
: start.encap rest.encap
594 # This is what to compile if making a cross-compiler.
595 # Note that we can compile enquire using the cross-compiler just built,
596 # although we can't run it on this machine.
597 all.cross
: native gcc-cross specs stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) \
598 $(LIBGCC1_TEST
) $(EXTRA_PARTS
) lang.
all.cross
599 # This is what to compile if making gcc with a cross-compiler.
600 all.build
: native xgcc
$(EXTRA_PARTS
) lang.
all.build
601 # This is what must be made before installing GCC and converting libraries.
602 start.encap
: native xgcc specs
$(LIBGCC1
) xlimits.h lang.start.encap
603 # These can't be made until after GCC can run.
604 rest.encap
: stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) $(EXTRA_PARTS
) lang.rest.encap
605 # This is what is made with the host's compiler
606 # whether making a cross compiler or not.
607 native
: config.status
cpp $(LANGUAGES
) $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
609 # Define the names for selecting languages in LANGUAGES.
611 OBJC objc
: cc1obj objc-runtime
612 OBJECTIVE-C objective-c
: cc1obj objc-runtime
615 # Tell GNU make these are phony targets.
616 .PHONY
: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
618 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
619 # a target to build even if it is up-to-date. So we must verify that
620 # config.status does not exist before failing.
622 @if
[ ! -f config.status
] ; then \
623 echo You must configure gcc. Look at the INSTALL file for details.
; \
629 # On the target machine, finish building a cross compiler.
630 # This does the things that can't be done on the host machine.
631 rest.cross
: $(LIBGCC
) gfloat.h specs
633 # Verify that it works to compile and link libgcc1-test.
634 # If it does, then there are sufficient replacements for libgcc1.a.
635 libgcc1-test
: libgcc1-test.o native
$(GCC_PARTS
)
636 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) libgcc1-test.o
-o libgcc1-test \
637 -nostartfiles
-nostdlib
`$(GCC_FOR_TARGET) --print-libgcc-file-name`
638 libgcc1-test.o
: libgcc1-test.c native xgcc
639 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) -c
$(srcdir)/libgcc1-test.c
641 # Recompile all the language-independent object files.
642 # This is used only if the user explicitly asks for it.
643 compilations
: ${OBJS}
645 # Create a list of the language-independent object files so the language
646 # subdirectories needn't mention their names explicitly.
647 stamp-objlist
: Makefile
$(OBJS
) $(BC_OBJS
)
648 echo
" $(OBJS) $(BC_OBJS)" | sed
-e
's, \([a-z]\), ../\1,g' >stamp-objlist
650 # We call this executable `xgcc' rather than `gcc'
651 # to avoid confusion if the current directory is in the path
652 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
653 xgcc
: gcc.o version.o
$(LIBDEPS
)
654 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o xgcc gcc.o version.o
$(LIBS
)
656 # Dump a specs file to make -B./ read these specs over installed ones.
658 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
661 # We do want to create an executable named `xgcc', so we can use it to
663 # Also create gcc-cross, so that install-common will install properly.
667 cc1
: $(P
) $(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
668 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cc1
$(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
670 cc1obj
: $(P
) $(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
671 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cc1obj
$(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
673 # Copy float.h from its source.
675 cp
$(FLOAT_H
) gfloat.h
677 # Create float.h source for the native machine.
679 -.
/enquire
-f
> tmp-float.h
680 mv tmp-float.h float.h-nat
682 # Create a dummy float.h source for a cross-compiler.
684 echo
"#error float.h values not known for cross-compiler" > t-float.h-cross
685 mv t-float.h-cross float.h-cross
687 # Used to compile enquire with standard cc, but have forgotten why.
688 # Let's try with GCC.
689 enquire
: enquire.o
$(GCC_PARTS
)
690 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o enquire
691 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
) stmp-int-hdrs
692 # -if [ "$(srcdir)" != "." ]; then rm -f ./enquire.c; else true; fi
693 # -cp $(srcdir)/enquire.c . > /dev/null 2>&1
694 # Breaking this line caused a problem with one version of GNU make.
695 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) -I.
-c
$(srcdir)/enquire.c
697 # Build the version of limits.h that we will install.
698 xlimits.h
: glimits.h limitx.h limity.h
699 if
$(LIMITS_H_TEST
) ; then \
700 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
702 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
704 mv tmp-xlimits.h xlimits.h
707 # This is done in two parts because some functions, in libgcc1.c,
708 # must be compiled with something other than GCC,
709 # while the rest, in libgcc2.c, must be compiled with xgcc.
710 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
712 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
713 # LIBCONVERT should put its output in libgcc1.conv.
714 libgcc1.conv
: libgcc1.a
715 $(LIBCONVERT
) libgcc1.a libgcc1.conv
717 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
718 # Make an empty file instead.
719 libgcc1.null
: $(GCC_PASSES
)
720 echo
"__foo () {}" > dummy.c
721 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
722 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy.o
723 rm -f dummy.o dummy.c
725 # This is $(LIBGCC1) for a cross-compiler.
726 # We have no automatic way of building libgcc1.a,
727 # so it's up to the installer to find a way to do that.
728 # This rule deliberately does not depend on libgcc1.a
729 # so that it will fail if the installer hasn't provided it.
731 mv libgcc1.a libgcc1.cross ||
(echo You must find a way to make libgcc1.a
; false
)
733 # Compile the library of arithmetic subroutines with the native compiler.
734 # Don't compile it with GCC!
735 # (That would cause most arithmetic functions to call themselves.)
736 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
738 # Actually build it in tmplibgcc1.a, then rename at end,
739 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
740 # -e causes any failing command to make this rule fail.
741 # -e doesn't work in certain shells, so we test $$? as well.
742 # lynx has a broken ar, it always complains when the initial library is
743 # empty, thus this command works only if we don't do -e
744 # There is a trailing backslash (\) deleted from the following line.
746 for name in
$(LIB1FUNCS
); \
750 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
751 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
752 mv libgcc1
$(oldobjext
) $${name}.o
; \
753 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}.o
; \
756 # Some shells crash when a loop has no items.
757 # So make sure there is always at least one--`..'.
759 # We don't use -e here because there are if statements
760 # that should not make the command give up when the if condition is false.
761 # Instead, we test for failure after each command where it matters.
762 for file in ..
$(LIB1FUNCS_EXTRA
); \
764 if
[ x
$${file} != x..
]; then \
765 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
767 if
[ $${name}.asm
= $${file} ]; then \
768 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
770 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
771 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
772 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}.o
; \
773 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
774 rm -f
$${name}.
[so
]; \
778 $(RANLIB
) tmplibgcc1.a
779 mv tmplibgcc1.a libgcc1.a
781 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
782 # functions. LIB1ASMSRC is the name of the source file in the config
784 libgcc1-asm.a
: libgcc2.ready config.status
$(srcdir)/config
/$(LIB1ASMSRC
)
785 -rm -f tmplibgcc1.a libgcc1.S
786 cp
$(srcdir)/config
/$(LIB1ASMSRC
) libgcc1.S
787 # Actually build it in tmplibgcc1.a, then rename at end,
788 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
789 # -e causes any failing command to make this rule fail.
790 # -e doesn't work in certain shells, so we test $$? as well.
791 # lynx has a broken ar, it always complains when the initial library is
792 # empty, thus this command works only if we don't do -e
793 # There is a trailing backslash (\) deleted from the following line.
795 for name in
$(LIB1ASMFUNCS
); \
798 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} libgcc1.S
; \
799 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
800 mv libgcc1.o
$${name}.o
; \
801 $(AR
) $(AR_FLAGS
) tmplibgcc1.a
$${name}.o
; \
805 mv tmplibgcc1.a libgcc1-asm.a
807 # Generate assembly versions of the functions required for libgcc1.
808 # You'll still need to massage the code by hand (possibly hacking
809 # underscores and local labels) but this will get you started.
810 libgcc1.S
: libgcc1.c
$(CONFIG_H
) config.status
813 for name in
$(LIB1FUNCS
); \
816 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -S
-DL
$${name} $(srcdir)/libgcc1.c
; \
817 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
818 echo
'#ifdef ' L
$${name} >> libgcc1.S
; \
819 cat libgcc1.s
>> libgcc1.S
; \
820 echo
'#endif /*' L
$${name} '*/' >> libgcc1.S
; \
821 echo
"" >> libgcc1.S
; \
824 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
825 # But recompiling cc1 should not force recompilation of libgcc2.a.
826 # If you want to force recompilation, delete libgcc2.a.
827 libgcc2.ready
: $(GCC_PASSES
) $(LIBGCC2_DEPS
) stmp-int-hdrs
828 -if
[ -f libgcc2.ready
] ; then \
831 touch libgcc2.ready
; \
834 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2FUNCS_EXTRA
) \
835 machmode.h longlong.h gbl-ctors.h config.status
836 # Actually build it in tmplibgcc2.a, then rename at end,
837 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
839 # -e causes any failing command to make this rule fail.
840 # -e doesn't work in certain shells, so we test $$? as well.
841 # lynx has a broken ar, it always complains when the initial library is
842 # empty, thus this command works only if we don't do -e
843 # There is a trailing backslash (\) deleted from the following line.
845 for name in
$(LIB2FUNCS
); \
848 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
849 $(srcdir)/libgcc2.c
-o
$${name}.o
; \
850 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
851 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}.o
; \
854 # Some shells crash when a loop has no items.
855 # So make sure there is always at least one--`..'.
857 # We don't use -e here because there are if statements
858 # that should not make the command give up when the if condition is false.
859 # Instead, we test for failure after each command where it matters.
860 for file in ..
$(LIB2FUNCS_EXTRA
); \
862 if
[ x
$${file} != x..
]; then \
863 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
865 if
[ $${name}.asm
= $${file} ]; then \
866 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
868 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
869 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
870 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}.o
; \
871 rm -f
$${name}.
[so
]; \
875 mv tmplibgcc2.a libgcc2.a
876 # These lines were deleted from above the mv command
877 # because ranlibing libgcc.a itself should suffice.
878 # -if [ x${HPUX_GAS} = x ] ; then \
879 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
882 # Combine the various libraries into a single library, libgcc.a.
883 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
884 -rm -rf tmplibgcc.a libgcc.a tmpcopy
886 -if
[ x
$(LIBGCC1
) != x
]; \
887 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
890 # Some versions of ar (specifically the one in RISC/os 5.x), create an
891 # unwritable table of contents file, and then print an error message when
892 # the second ar command tries to overwrite this file. To avoid the error
893 # message from ar, we make sure all files are writable.
894 -(cd tmpcopy
; chmod
+w
* > /dev
/null
2>&1)
895 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
896 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*.o
)
898 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
899 # Actually build it in tmplibgcc.a, then rename at end,
900 # so that libgcc.a itself remains nonexistent if compilation is aborted.
901 mv tmplibgcc.a libgcc.a
903 # Use the genmultilib shell script to generate the information the gcc
904 # driver program needs to select the library directory based on the
906 multilib.h
: $(srcdir)/genmultilib Makefile
907 $(SHELL
) $(srcdir)/genmultilib
"$(MULTILIB_OPTIONS)" \
908 "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
910 # Build multiple copies of libgcc.a, one for each target switch.
911 stmp-multilib
: $(LIBGCC1
) libgcc2.c libgcc2.ready
$(CONFIG_H
) \
912 $(LIB2FUNCS_EXTRA
) machmode.h longlong.h gbl-ctors.h config.status
913 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
914 dir=`echo $$i | sed -e 's/;.*$$//'`; \
915 flags
=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
916 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
917 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
918 RANLIB
="$(RANLIB)" RANLIB_TEST
="$(RANLIB_TEST)" \
919 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
920 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS) $${flags}" \
921 LIBGCC1
="$(LIBGCC1)" LIBGCC2
="$(LIBGCC2)" \
922 dir="$${dir}" stmp-multilib-sub
; \
923 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
927 # Subroutine of stmp-multilib so make -n works.
929 rm -f
$(dir)/libgcc.a
$(LIBGCC2
)
930 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
931 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
932 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
933 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC2
)
934 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
936 else rm -f
$(LIBGCC1
); \
938 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
941 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
942 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
943 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
944 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC1
); \
946 rm -rf tmplibgcc.a tmpcopy
948 if
[ x
$(LIBGCC1
) != x
]; \
949 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
952 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
953 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*.o
)
954 rm -rf libgcc2.a tmpcopy
955 if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
956 if
[ -d
$(dir) ]; then true
; else mkdir
$(dir); fi
957 mv tmplibgcc.a
$(dir)/libgcc.a
959 objc-runtime
: libobjc.a
961 # Build the Objective C runtime library.
962 libobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
$(USE_COLLECT2
) $(EXTRA_PARTS
)
963 if
[ -d objc
]; then true
; else mkdir objc
; fi
965 srcdir1
=`cd $(srcdir); pwd`; \
967 $(MAKE
) -f
$${srcdir1}/objc
/Makefile libobjc.a \
968 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
969 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
970 GCC_CFLAGS
="$(GCC_CFLAGS)"
972 ln objc
/libobjc.a .
>/dev
/null
2>&1 || cp objc
/libobjc.a .
973 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) libobjc.a
; else true
; fi
975 # This is used by objc/Makefile if the user runs that directly.
976 sublibobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
978 srcdir1
=`cd $(srcdir); pwd`; \
980 $(MAKE
) -f
$$srcdir1/objc
/Makefile libobjc.a \
981 srcdir=$$srcdir1 tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
982 GCC_FOR_TARGET
="$$thisdir1/xgcc -B$$thisdir1/" \
983 GCC_CFLAGS
="$(GCC_CFLAGS)"
985 # Compile two additional files that are linked with every program
986 # linked using GCC on system V, for the sake of C++ constructors.
987 crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
988 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
989 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
990 -g0
-c
$(srcdir)/crtstuff.c
-o crtbegin.o
992 crtend.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
993 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
994 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
995 -g0
-c
$(srcdir)/crtstuff.c
-o crtend.o
997 # Compiling object files from source files.
999 # Note that dependencies on obstack.h are not written
1000 # because that file is not part of GCC.
1002 # C language specific files.
1004 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1005 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1006 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
1007 $(srcdir)/c-parse.h
: $(srcdir)/c-parse.c
1008 $(srcdir)/c-parse.c
: $(srcdir)/c-parse.y
1009 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
1010 $(srcdir)/c-parse.y
: $(srcdir)/c-parse.in
1011 sed
-e
"/^ifobjc$$/,/^end ifobjc$$/d" \
1012 -e
"/^ifc$$/d" -e
"/^end ifc$$/d" \
1013 $(srcdir)/c-parse.in
>tmp-c-parse.y
1014 $(srcdir)/move-if-change tmp-c-parse.y
$(srcdir)/c-parse.y
1016 $(srcdir)/c-gperf.h
: $(srcdir)/c-parse.gperf
1017 gperf
-p
-j1
-i
1 -g
-o
-t
-G
-N is_reserved_word
-k1
,3,$$ \
1018 $(srcdir)/c-parse.gperf
>tmp-gperf.h
1019 $(srcdir)/move-if-change tmp-gperf.h
$(srcdir)/c-gperf.h
1021 c-decl.o
: c-decl.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h output.h
1022 c-typeck.o
: c-typeck.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h output.h
1023 c-lang.o
: c-lang.c
$(CONFIG_H
) $(TREE_H
)
1024 c-lex.o
: c-lex.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h
$(srcdir)/c-parse.h \
1025 input.h flags.h
$(srcdir)/c-gperf.h c-pragma.h
1026 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
1027 c-convert.o
: c-convert.c
$(CONFIG_H
) $(TREE_H
) flags.h
1028 c-pragma.o
: c-pragma.c
$(CONFIG_H
) $(TREE_H
) c-pragma.h
1029 c-iterate.o
: c-iterate.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h flags.h
1031 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1034 ln collect2
$(exeext
) ld$(exeext
) > /dev
/null
2>&1 \
1035 || cp collect2
$(exeext
) ld$(exeext
)
1037 collect2
: collect2.o cplus-dem.o underscore.o version.o
$(LIBDEPS
)
1038 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1040 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o collect2 collect2.o cplus-dem.o \
1041 underscore.o version.o
$(LIBS
)
1043 collect2.o
: collect2.c
$(CONFIG_H
) gstab.h obstack.h demangle.h
1044 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1045 -DTARGET_MACHINE
=\"$(target
)\" $(MAYBE_USE_COLLECT2
) \
1046 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1048 cplus-dem.o
: cplus-dem.c demangle.h
1050 underscore.c
: $(GCC_PASSES
)
1051 echo
"int xxy_us_dummy;" >dummy.c
1052 $(GCC_FOR_TARGET
) -S dummy.c
1053 echo
'/*WARNING: This file is automatically generated!*/' >underscore.t
1054 if grep _xxy_us_dummy dummy.s
> /dev
/null
; then \
1055 echo
"int prepends_underscore = 1;" >>underscore.t
; \
1057 echo
"int prepends_underscore = 0;" >>underscore.t
; \
1059 $(srcdir)/move-if-change underscore.t underscore.c
1060 -rm -f dummy.c dummy.s
1062 # Objective C language specific files.
1064 objc-parse.o
: $(srcdir)/objc-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1065 c-tree.h input.h flags.h objc-act.h
1066 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/objc-parse.c
1067 $(srcdir)/objc-parse.c
: $(srcdir)/objc-parse.y
1068 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) objc-parse.y
-o objc-parse.c
1069 $(srcdir)/objc-parse.y
: $(srcdir)/c-parse.in
1070 sed
-e
"/^ifc$$/,/^end ifc$$/d" \
1071 -e
"/^ifobjc$$/d" -e
"/^end ifobjc$$/d" \
1072 $(srcdir)/c-parse.in
>tmp-objc-prs.y
1073 $(srcdir)/move-if-change tmp-objc-prs.y
$(srcdir)/objc-parse.y
1075 objc-act.o
: objc-act.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h c-lex.h \
1076 flags.h objc-act.h input.h function.h
$(srcdir)/c-parse.h
1078 # A file used by all variants of C.
1080 c-common.o
: c-common.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
1082 # Language-independent files.
1084 gcc.o
: gcc.c
$(CONFIG_H
) multilib.h config.status
1085 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1086 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
1087 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
1088 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1089 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
1090 -DTOOLDIR_BASE_PREFIX
=\"$(exec_prefix)/\" \
1091 $(MAYBE_TARGET_DEFAULT
) \
1092 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1094 dumpvers
: dumpvers.c
1096 version.o
: version.c
1097 obstack.o
: obstack.c
1099 convert.o
: convert.c
$(CONFIG_H
) $(TREE_H
) flags.h convert.h
1101 tree.o
: tree.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1102 print-tree.o
: print-tree.c
$(CONFIG_H
) $(TREE_H
)
1103 stor-layout.o
: stor-layout.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1104 fold-const.o
: fold-const.c
$(CONFIG_H
) $(TREE_H
) flags.h
1105 toplev.o
: toplev.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h input.h \
1106 insn-attr.h xcoffout.h defaults.h output.h
1107 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1108 $(MAYBE_TARGET_DEFAULT
) $(MAYBE_USE_COLLECT2
) \
1109 -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1111 rtl.o
: rtl.c
$(CONFIG_H
) $(RTL_H
)
1113 print-rtl.o
: print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1114 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1116 toplev.o
: bytecode.h bc-emit.h
1117 varasm.o
: varasm.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h function.h \
1118 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1119 output.h bytecode.h c-pragma.h
1120 function.o
: function.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1121 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1122 recog.h output.h bytecode.h
1123 stmt.o
: stmt.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1124 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
1125 recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
1127 expr.o
: expr.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h regs.h \
1128 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1129 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1130 bc-emit.h modemap.def
1131 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
1133 expmed.o
: expmed.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1134 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1135 explow.o
: explow.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h hard-reg-set.h \
1136 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1137 optabs.o
: optabs.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1138 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1139 dbxout.o
: dbxout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h regs.h \
1140 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1141 sdbout.o
: sdbout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) gsyms.h flags.h \
1142 insn-config.h reload.h
1143 dwarfout.o
: dwarfout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) dwarf.h flags.h \
1144 insn-config.h reload.h output.h defaults.h
1145 xcoffout.o
: xcoffout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) xcoffout.h flags.h
1146 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1147 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1148 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1149 real.o
: real.c
$(CONFIG_H
) $(TREE_H
)
1150 getpwd.o
: getpwd.c
$(CONFIG_H
)
1152 integrate.o
: integrate.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h integrate.h \
1153 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
1156 jump.o
: jump.c
$(CONFIG_H
) $(RTL_H
) flags.h hard-reg-set.h regs.h \
1157 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1158 stupid.o
: stupid.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h
1160 cse.o
: cse.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h real.h \
1161 insn-config.h recog.h
1162 loop.o
: loop.c
$(CONFIG_H
) $(RTL_H
) flags.h loop.h insn-config.h \
1163 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1164 unroll.o
: unroll.c
$(CONFIG_H
) $(RTL_H
) insn-config.h insn-codes.h \
1165 integrate.h regs.h flags.h expr.h loop.h
1166 flow.o
: flow.c
$(CONFIG_H
) $(RTL_H
) flags.h insn-config.h \
1167 basic-block.h regs.h hard-reg-set.h output.h
1168 combine.o
: combine.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1169 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1170 basic-block.h recog.h real.h hard-reg-set.h
1171 regclass.o
: regclass.c
$(CONFIG_H
) $(RTL_H
) hard-reg-set.h flags.h \
1172 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1173 local-alloc.o
: local-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h basic-block.h \
1174 regs.h hard-reg-set.h insn-config.h recog.h output.h
1175 global.o
: global.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1176 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1178 reload.o
: reload.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1179 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1180 reload1.o
: reload1.c
$(CONFIG_H
) $(RTL_H
) flags.h expr.h \
1181 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1182 basic-block.h recog.h output.h
1183 caller-save.o
: caller-save.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1184 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
1185 reorg.o
: reorg.c
$(CONFIG_H
) $(RTL_H
) conditions.h hard-reg-set.h \
1186 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1188 sched.o
: sched.c
$(CONFIG_H
) $(RTL_H
) basic-block.h regs.h hard-reg-set.h \
1189 flags.h insn-config.h insn-attr.h
1190 final.o
: final.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h regs.h \
1191 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
1192 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1193 recog.o
: recog.c
$(CONFIG_H
) $(RTL_H
) \
1194 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1195 insn-flags.h insn-codes.h real.h
1196 reg-stack.o
: reg-stack.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) \
1197 regs.h hard-reg-set.h flags.h insn-config.h
1199 aux-output.o
: aux-output.c
$(CONFIG_H
) \
1200 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1201 insn-flags.h output.h insn-attr.h insn-codes.h
1202 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1203 $(MAYBE_TARGET_DEFAULT
) aux-output.c
1205 # Build auxiliary files that support ecoff format.
1206 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1207 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o mips-tfile mips-tfile.o version.o
$(LIBS
)
1209 mips-tfile.o
: mips-tfile.c
$(CONFIG_H
) $(RTL_H
)
1211 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1212 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o mips-tdump mips-tdump.o version.o
$(LIBS
)
1214 mips-tdump.o
: mips-tdump.c
$(CONFIG_H
) $(RTL_H
)
1216 # Build file to support OSF/rose half-pic format.
1217 halfpic.o
: halfpic.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
)
1219 # Normally this target is not used; but it is used if you
1220 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1221 # from the GNU Emacs distribution.
1223 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
1224 -c
`echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1227 # Generate header and source files from the machine description,
1230 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
1231 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1232 insn-attr.h insn-attrtab.c
1234 # The following pair of rules has this effect:
1235 # genconfig is run only if the md has changed since genconfig was last run;
1236 # but the file insn-config.h is touched only when its contents actually change.
1238 # Each of the other insn-* files is handled by a similar pair of rules.
1240 # This causes an anomaly in the results of make -n
1241 # because insn-* is older than stamp-*
1242 # and thus make -n thinks that insn-* will be updated
1243 # and force recompilation of things that depend on it.
1244 # We use move-if-change precisely to avoid such recompilation.
1245 # But there is no way to teach make -n that it will be avoided.
1247 # Each of the insn-*.[ch] rules has a semicolon at the end,
1248 # for otherwise the system Make on SunOS 4.1 never tries
1249 # to recompile insn-*.o. To avoid problems and extra noise from
1250 # versions of make which don't like empty commands (nothing after the
1251 # trailing `;'), we call true for each.
1253 insn-config.h
: stamp-config
; @true
1254 stamp-config
: md genconfig
$(srcdir)/move-if-change
1255 .
/genconfig md
> tmp-config.h
1256 $(srcdir)/move-if-change tmp-config.h insn-config.h
1259 insn-flags.h
: stamp-flags
; @true
1260 stamp-flags
: md genflags
$(srcdir)/move-if-change
1261 .
/genflags md
> tmp-flags.h
1262 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1265 insn-codes.h
: stamp-codes
; @true
1266 stamp-codes
: md gencodes
$(srcdir)/move-if-change
1267 .
/gencodes md
> tmp-codes.h
1268 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1271 insn-emit.o
: insn-emit.c
$(CONFIG_H
) $(RTL_H
) expr.h real.h output.h \
1272 insn-config.h insn-flags.h insn-codes.h
1273 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
1275 insn-emit.c
: stamp-emit
; @true
1276 stamp-emit
: md genemit
$(srcdir)/move-if-change
1277 .
/genemit md
> tmp-emit.c
1278 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1281 insn-recog.o
: insn-recog.c
$(CONFIG_H
) $(RTL_H
) insn-config.h recog.h \
1282 real.h output.h flags.h
1283 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
1285 insn-recog.c
: stamp-recog
; @true
1286 stamp-recog
: md genrecog
$(srcdir)/move-if-change
1287 .
/genrecog md
> tmp-recog.c
1288 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1291 insn-opinit.o
: insn-opinit.c
$(CONFIG_H
) $(RTL_H
) insn-codes.h insn-flags.h \
1292 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1293 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-opinit.c
1295 insn-opinit.c
: stamp-opinit
; @true
1296 stamp-opinit
: md genopinit
$(srcdir)/move-if-change
1297 .
/genopinit md
> tmp-opinit.c
1298 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1301 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
1302 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
1304 insn-extract.c
: stamp-extract
; @true
1305 stamp-extract
: md genextract
$(srcdir)/move-if-change
1306 .
/genextract md
> tmp-extract.c
1307 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1310 insn-peep.o
: insn-peep.c
$(CONFIG_H
) $(RTL_H
) regs.h output.h real.h
1311 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
1313 insn-peep.c
: stamp-peep
; @true
1314 stamp-peep
: md genpeep
$(srcdir)/move-if-change
1315 .
/genpeep md
> tmp-peep.c
1316 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1319 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h output.h \
1320 insn-attr.h insn-config.h
1321 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
1323 insn-attr.h
: stamp-attr
; @true
1324 stamp-attr
: md genattr
$(srcdir)/move-if-change
1325 .
/genattr md
> tmp-attr.h
1326 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1329 insn-attrtab.c
: stamp-attrtab
; @true
1330 stamp-attrtab
: md genattrtab
$(srcdir)/move-if-change
1331 if cmp
-s
$(PREMADE_ATTRTAB_MD
) md
; \
1333 echo Using
$(PREMADE_ATTRTAB
); \
1334 cp
$(PREMADE_ATTRTAB
) tmp-attrtab.c
; \
1336 .
/genattrtab md
> tmp-attrtab.c
; \
1338 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1341 insn-output.o
: insn-output.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h conditions.h \
1342 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1344 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
1346 insn-output.c
: stamp-output
; @true
1347 stamp-output
: md genoutput
$(srcdir)/move-if-change
1348 .
/genoutput md
> tmp-output.c
1349 $(srcdir)/move-if-change tmp-output.c insn-output.c
1352 # Compile the programs that generate insn-* from the machine description.
1353 # They are compiled with $(HOST_CC), and associated libraries,
1354 # since they need to run on this machine
1355 # even if GCC is being compiled to run on some other machine.
1357 # $(CONFIG_H) is omitted from the deps of the gen*.o
1358 # because these programs don't really depend on anything
1359 # about the target machine. They do depend on config.h itself,
1360 # since that describes the host machine.
1362 # Pass the md file through cpp if the target requests it.
1363 $(MD_FILE
): $(MD_DEPS
)
1365 $(MD_CPP
) $(MD_CPPFLAGS
) md.pre-cpp | sed
's/^# /; /g' > tmp-
$@
1368 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1369 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genconfig \
1370 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
1372 genconfig.o
: genconfig.c
$(RTL_H
) hconfig.h
1373 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
1375 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1376 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genflags \
1377 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
1379 genflags.o
: genflags.c
$(RTL_H
) hconfig.h
1380 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
1382 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1383 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o gencodes \
1384 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
1386 gencodes.o
: gencodes.c
$(RTL_H
) hconfig.h
1387 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
1389 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1390 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genemit \
1391 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
1393 genemit.o
: genemit.c
$(RTL_H
) hconfig.h
1394 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
1396 genopinit
: genopinit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1397 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genopinit \
1398 genopinit.o
$(HOST_RTL
) $(HOST_LIBS
)
1400 genopinit.o
: genopinit.c
$(RTL_H
) hconfig.h
1401 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genopinit.c
1403 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1404 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genrecog \
1405 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
1407 genrecog.o
: genrecog.c
$(RTL_H
) hconfig.h
1408 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
1410 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1411 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genextract \
1412 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
1414 genextract.o
: genextract.c
$(RTL_H
) hconfig.h insn-config.h
1415 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
1417 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1418 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genpeep \
1419 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
1421 genpeep.o
: genpeep.c
$(RTL_H
) hconfig.h
1422 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
1424 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1425 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genattr \
1426 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
1428 genattr.o
: genattr.c
$(RTL_H
) hconfig.h
1429 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1431 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1432 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genattrtab \
1433 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1435 genattrtab.o
: genattrtab.c
$(RTL_H
) hconfig.h insn-config.h
1436 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1438 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1439 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genoutput \
1440 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1442 genoutput.o
: genoutput.c
$(RTL_H
) hconfig.h
1443 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1445 # Compile the libraries to be used by gen*.
1446 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1447 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1448 # with the rules for rtl.o, alloca.o, etc.
1449 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1450 rm -f
$(HOST_PREFIX
)rtl.c
1451 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtl.c
> $(HOST_PREFIX
)rtl.c
1452 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1454 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1455 rm -f
$(HOST_PREFIX
)print-rtl.c
1456 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c
> $(HOST_PREFIX
)print-rtl.c
1457 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1459 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1460 rm -f
$(HOST_PREFIX
)rtlanal.c
1461 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c
> $(HOST_PREFIX
)rtlanal.c
1462 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1464 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1465 rm -f
$(HOST_PREFIX
)alloca.c
1466 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1467 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1469 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1470 rm -f
$(HOST_PREFIX
)obstack.c
1471 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/obstack.c
> $(HOST_PREFIX
)obstack.c
1472 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1474 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1475 rm -f
$(HOST_PREFIX
)malloc.c
1476 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/malloc.c
> $(HOST_PREFIX
)malloc.c
1477 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1479 # This satisfies the dependency that we get if you cross-compile a compiler
1480 # that does not need to compile alloca, malloc or whatever.
1482 touch
$(HOST_PREFIX_1
)
1484 # Remake bytecode files.
1487 BC_ALL
=bc-opname.h bc-opcode.h bc-arity.h
1488 BI_OBJ
=bi-parser.o bi-lexer.o bi-reverse.o
1491 bc-emit.o
: bc-emit.c
$(CONFIG_H
) $(RTL_H
) real.h
$(BYTECODE_H
) \
1492 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1493 bc-optab.o
: bc-optab.c
$(CONFIG_H
) $(REAL_H
) $(BYTECODE_H
) \
1494 bc-opcode.h bc-typecd.h bc-typecd.def
1497 bytecode
: $(BI_ALL
) $(BC_ALL
)
1499 bi-arity
: bi-arity.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1500 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o bi-arity \
1501 bi-arity.o
$(BI_OBJ
) $(HOST_LIBS
)
1502 bi-opcode
: bi-opcode.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1503 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o bi-opcode \
1504 bi-opcode.o
$(BI_OBJ
) $(HOST_LIBS
)
1505 bi-opname
: bi-opname.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1506 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o bi-opname \
1507 bi-opname.o
$(BI_OBJ
) $(HOST_LIBS
)
1509 bi-run.o
: $(srcdir)/bi-run.c
$(srcdir)/bi-run.h
$(srcdir)/bc-typecd.h \
1510 bc-opname.h bc-arity.h bc-opcode.h
1511 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/bi-run.c
1512 $(srcdir)/bi-parser.h
: $(srcdir)/bi-parser.c
1513 $(srcdir)/bi-parser.c
: $(srcdir)/bi-parser.y
1514 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d bi-parser.y
-o bi-parser.c
1515 bi-parser.o
: $(srcdir)/bi-parser.c
$(srcdir)/bi-defs.h hconfig.h
1516 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1517 $(srcdir)/bi-parser.c
1518 bi-lexer.o
: $(srcdir)/bi-lexer.c
$(srcdir)/bi-parser.h hconfig.h
1519 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1520 $(srcdir)/bi-lexer.c
1521 bi-arity.o
: bi-arity.c
$(srcdir)/bi-defs.h hconfig.h
1522 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1523 $(srcdir)/bi-arity.c
1524 bi-opcode.o
: bi-opcode.c
$(srcdir)/bi-defs.h hconfig.h
1525 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1526 $(srcdir)/bi-opcode.c
1527 bi-opname.o
: bi-opname.c
$(srcdir)/bi-defs.h hconfig.h
1528 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1529 $(srcdir)/bi-opname.c
1530 bi-reverse.o
: bi-reverse.c
$(srcdir)/bi-defs.h
1531 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1532 $(srcdir)/bi-reverse.c
1535 bc-arity.h
: stamp-bcarity
; @true
1536 stamp-bcarity
: $(srcdir)/bytecode.def bi-arity
$(srcdir)/move-if-change
1537 .
/bi-arity
< $(srcdir)/bytecode.def
>tmp-bc-arity.h
1538 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1541 bc-opcode.h
: stamp-bcopcode
; @true
1542 stamp-bcopcode
: $(srcdir)/bytecode.def bi-opcode
$(srcdir)/move-if-change
1543 .
/bi-opcode
< $(srcdir)/bytecode.def
>tmp-bcopcd.h
1544 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1545 touch stamp-bcopcode
1547 bc-opname.h
: stamp-bcopname
; @true
1548 stamp-bcopname
: $(srcdir)/bytecode.def bi-opname
$(srcdir)/move-if-change
1549 .
/bi-opname
< $(srcdir)/bytecode.def
>tmp-bcopnm.h
1550 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1551 touch stamp-bcopname
1553 bytecode.
mostlyclean:
1554 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1556 bytecode.
distclean bytecode.
clean: bytecode.
mostlyclean
1557 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1559 bytecode.maintainer-clean
: bytecode.
clean
1560 -rm -f bi-parser.c bi-parser.h
1563 # Remake cpp and protoize.
1565 # Making the preprocessor
1568 ln
$(CCCP
)$(exeext
) cpp$(exeext
) > /dev
/null
2>&1 \
1569 || cp
$(CCCP
)$(exeext
) cpp$(exeext
)
1570 cccp
: cccp.o cexp.o version.o
$(LIBDEPS
)
1571 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cccp cccp.o cexp.o version.o
$(LIBS
)
1572 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
)
1573 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1574 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1575 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1576 cccp.o
: cccp.c
$(CONFIG_H
) pcp.h version.c config.status
1577 # The reason we use $(libdir)/g++-include rather than using libsubdir
1578 # is for compatibility with the current version of libg++.
1579 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1580 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1581 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1582 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1583 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1584 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1585 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1587 cppmain
: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1588 version.o
$(LIBDEPS
)
1589 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cppmain \
1590 cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1593 cpplib.o
: cpplib.c
$(CONFIG_H
) pcp.h version.c config.status
1594 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1595 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1596 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1597 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1598 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1599 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1600 -c
`echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1602 # Note for the stamp targets, we run the program `true' instead of
1603 # having an empty command (nothing following the semicolon).
1605 proto
: config.status protoize unprotoize SYSCALLS.c.X
1607 protoize
: protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1608 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) \
1609 protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
) -o protoize
1610 protoize.o
: stamp-proto
; @true
1612 unprotoize
: unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1613 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) \
1614 unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
) \
1616 unprotoize.o
: stamp-proto
; @true
1618 stamp-proto
: $(srcdir)/protoize.c getopt.h
$(CONFIG_H
)
1619 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1620 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1621 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1622 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1623 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1624 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1625 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1626 -DUNPROTOIZE
$(srcdir)/protoize.c
1627 mv protoize.o unprotoize.o
1628 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1629 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1630 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1631 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1632 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1633 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1634 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1635 $(srcdir)/protoize.c
1638 getopt.o
: $(srcdir)/getopt.c getopt.h
1639 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1640 getopt1.o
: $(srcdir)/getopt1.c getopt.h
1641 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1643 # This info describes the target machine, so compile with GCC just built.
1644 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) stmp-int-hdrs
1645 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1646 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1647 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1648 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
1649 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1652 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1653 -rm -f tmp-proto.
[cso
]
1654 cp
$(srcdir)/protoize.c tmp-proto.c
1655 chmod u
+w tmp-proto.c
1656 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1657 $(CFLAGS) $(INCLUDES) \
1658 -DGCC_INCLUDE_DIR=0 \
1659 -DGPLUSPLUS_INCLUDE_DIR=0 \
1660 -DCROSS_INCLUDE_DIR=0 \
1661 -DTOOL_INCLUDE_DIR=0 \
1662 -DSTD_PROTO_DIR=0" tmp-proto.c
1663 @echo
'**********' Expect
400 lines of differences.
1664 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
1665 -wc
-l tmp-proto.diff
1666 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1667 $(CFLAGS) $(INCLUDES) \
1668 -DGCC_INCLUDE_DIR=0 \
1669 -DGPLUSPLUS_INCLUDE_DIR=0 \
1670 -DCROSS_INCLUDE_DIR=0 \
1671 -DTOOL_INCLUDE_DIR=0 \
1672 -DSTD_PROTO_DIR=0" tmp-proto.c
1673 @echo Expect zero differences.
1674 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1675 -rm -f tmp-proto.
[cso
]
1677 # Build the include directory. The stamp files are stmp-* rather than
1678 # stamp-* so that mostlyclean does not force the include directory to
1681 # Build the include directory except for float.h (which depends upon
1683 stmp-int-hdrs
: stmp-fixinc
$(USER_H
) xlimits.h objc-headers
1684 # Copy in the headers provided with gcc.
1685 # The sed command gets just the last file name component;
1686 # this is necessary because VPATH could add a dirname.
1687 # Using basename would be simpler, but some systems don't have it.
1690 for file in
$(USER_H
); do \
1691 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1692 rm -f
$$objdir/include/$$realfile; \
1693 cp ginclude
/$$realfile $$objdir/include; \
1694 chmod a
+r
$$objdir/include/$$realfile; \
1696 rm -f
include/limits.h
1697 cp xlimits.h
include/limits.h
1698 chmod a
+r
include/limits.h
1699 # Install the README
1700 rm -f
include/README
1701 cp
$(srcdir)/README-fixinc
include/README
1702 chmod a
+r
include/README
1705 # Build the complete include directory.
1706 stmp-headers
: stmp-int-hdrs gfloat.h
1707 rm -f
include/float.h
1708 cp gfloat.h
include/float.h
1709 chmod a
+r
include/float.h
1712 # Build fixed copies of system files.
1713 stmp-fixinc
: $(srcdir)/$(FIXINCLUDES
) gsyslimits.h
1716 if
[ x
$(FIXINCLUDES
) != xMakefile.in
]; \
1718 for
dir in
$(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
); do \
1721 $(SHELL
) $(srcdir)/$(FIXINCLUDES
) include $$dir; \
1726 rm -f
include/syslimits.h
1727 if
[ -f
include/limits.h
]; then \
1728 mv
include/limits.h
include/syslimits.h
; \
1730 cp
$(srcdir)/gsyslimits.h
include/syslimits.h
; \
1732 chmod a
+r
include/syslimits.h
1735 # copy objc header files into build directory
1736 objc-headers
: stmp-fixinc
1737 if
[ -d
include ]; then true
; else mkdir
include; fi
1738 if
[ -d objc
]; then true
; else mkdir objc
; fi
1740 srcdir1
=`cd $(srcdir); pwd`; \
1742 $(MAKE
) -f
$${srcdir1}/objc
/Makefile copy-headers \
1743 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1744 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
1745 GCC_CFLAGS
="$(GCC_CFLAGS)" incinstalldir
=$${thisdir1}/include
1748 # Files related to the fixproto script.
1750 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
1751 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1753 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
1754 mv tmp-deduced.h deduced.h
1756 gen-protos
: gen-protos.o scan.o cppalloc.o
$(HOST_LIBDEPS
)
1757 ${HOST_CC} $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o gen-protos \
1758 gen-protos.o scan.o cppalloc.o
$(HOST_LIBS
)
1760 gen-protos.o
: gen-protos.c scan.h hconfig.h
1761 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gen-protos.c
1763 scan.o
: scan.c scan.h hconfig.h
1764 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan.c
1766 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1767 cat deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
1768 mv tmp-fixtmp.c fixtmp.c
1769 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
1770 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
1771 | .
/gen-protos
>xsys-protos.hT
1772 mv xsys-protos.hT xsys-protos.h
1775 fix-header
: fix-header.o scan-decls.o scan.o xsys-protos.h
$(HOST_LIBDEPS
) cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1776 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o fix-header \
1777 fix-header.o scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o cppexp.o
$(HOST_LIBS
)
1779 fix-header.o
: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h
1780 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/fix-header.c
1782 scan-decls.o
: scan-decls.c scan.h hconfig.h
1783 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan-decls.c
1785 # stmp-fixproto depends on this, not on fix-header directly.
1786 # The idea is to make sure fix-header gets built,
1787 # but not rerun fixproto after each stage
1788 # just because fix-header's mtime has changed.
1789 fixhdr.ready
: fix-header
1790 -if
[ -f fixhdr.ready
] ; then \
1793 touch fixhdr.ready
; \
1796 # stmp-headers is to make sure fixincludes has already finished.
1797 # The if statement is so that we don't run fixproto a second time
1798 # if it has already been run on the files in `include'.
1799 stmp-fixproto
: fixhdr.ready fixproto stmp-headers
1800 @echo
"Various warnings and error messages from fixproto are normal"
1801 -if
[ -d
include ] ; then true
; else mkdir
include; fi
1802 -if
[ -f
include/fixed
] ; then true
; \
1804 : This line works around a
'make' bug in BSDI
1.1.
; \
1805 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
1806 $(SHELL
) ${srcdir}/fixproto
include include $(SYSTEM_HEADER_DIR
); \
1807 touch
include/fixed
; \
1811 # Remake the info files.
1814 info: $(srcdir)/cpp.
info $(srcdir)/gcc.
info lang.
info
1816 $(srcdir)/cpp.
info: cpp.texi
1817 cd
$(srcdir); $(MAKEINFO
) cpp.texi
1819 $(srcdir)/gcc.
info: gcc.texi extend.texi
install.texi invoke.texi \
1820 md.texi rtl.texi tm.texi
1821 cd
$(srcdir); $(MAKEINFO
) gcc.texi
1823 dvi: $(srcdir)/gcc.
dvi $(srcdir)/cpp.
dvi lang.
dvi
1825 # This works with GNU Make's default rule.
1826 $(srcdir)/gcc.
dvi: gcc.texi extend.texi
install.texi invoke.texi \
1827 md.texi rtl.texi tm.texi
1830 # This works with GNU Make's default rule.
1831 $(srcdir)/cpp.
dvi: cpp.texi
1834 $(srcdir)/INSTALL
: install1.texi
install.texi
1835 $(MAKEINFO
) -D INSTALLONLY
--no-header
--no-split \
1836 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
1838 # Deletion of files made during compilation.
1839 # There are four levels of this:
1840 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
1841 # `mostlyclean' is useful while working on a particular type of machine.
1842 # It deletes most, but not all, of the files made by compilation.
1843 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1844 # `clean' deletes everything made by running `make all'.
1845 # `distclean' also deletes the files made by config.
1846 # `maintainer-clean' also deletes everything that could be regenerated
1847 # automatically. We remove as much from the language subdirectories as we can
1848 # (less duplicated code).
1851 mostlyclean: bytecode.
mostlyclean lang.
mostlyclean
1852 -rm -f
$(STAGESTUFF
)
1853 # Clean the objc subdir if we created one.
1854 if
[ -d objc
]; then \
1855 srcdir1
=`cd $(srcdir); pwd`; \
1856 cd objc
; $(MAKE
) -f
$$srcdir1/objc
/Makefile
mostlyclean; \
1859 # Delete the temporary source copies for cross compilation.
1860 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
1861 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
1862 -rm -f
$(HOST_PREFIX_1
)obstack.c
1863 # Delete the temp files made in the course of building libgcc.a.
1864 -rm -f tmplibgcc
* tmpcopy xlimits.h
1865 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
1866 # Delete other temporary files.
1867 -rm -f tmp-float.h tmp-gcc.xtar.gz
1868 -rm -f tmp-foo1 tmp-foo2 tmp-proto.
* tmp-unproto
.1 tmp-SYSCALLS.s
1869 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
1870 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
1871 -rm -f tmp-fixtmp.c xsys-protos.hT
1872 # Delete the stamp files.
1873 -rm -f stamp-
* tmp-
*
1874 -rm -f
*/stamp-
* */tmp-
*
1875 # Delete debugging dump files.
1876 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
1877 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
1878 -rm -f
*/*.greg
*/*.lreg
*/*.combine
*/*.flow
*/*.cse
*/*.jump
*/*.rtl
1879 -rm -f
*/*.tree
*/*.loop
*/*.dbr
*/*.jump2
*/*.sched
*/*.cse2
1880 -rm -f
*/*.sched2
*/*.stack
1881 # Delete some files made during installation.
1882 -rm -f specs gfloat.h float.h-
* enquire SYSCALLS.c.X SYSCALLS.c
1883 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
1884 # Delete files generated for fixproto
1885 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
1886 gen-protos fixproto.list fixtmp.
* fixhdr.ready
1887 # Delete unwanted output files from TeX.
1888 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
1889 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
1890 # Delete sorted indices we don't actually use.
1891 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1892 # Delete core dumps.
1895 # Delete all files made by compilation
1896 # that don't exist in the distribution.
1897 clean: mostlyclean bytecode.
clean lang.
clean
1898 # It may not be quite desirable to delete unprotoize.c here,
1899 # but the spec for `make clean' requires it.
1900 # Using unprotoize.c is not quite right in the first place,
1901 # but what better way is there?
1902 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
1903 -rm -f libgcc1.null
$(LIB2FUNCS_EXTRA
)
1906 -if
[ -f md.pre-cpp
]; then \
1909 # Delete the include directory.
1910 -rm -rf stmp-
* include objc-headers
1912 # Delete files used by the "multilib" facility (including libgcc subdirs).
1913 -rm -f multilib.h tmpmultilib
*
1914 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
1915 rm -rf
$(MULTILIB_DIRNAMES
); \
1916 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
1917 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
1920 # Delete all files that users would normally create
1921 # while building and installing GCC.
1922 distclean: clean bytecode.
distclean lang.
distclean
1923 -rm -f tm.h aux-output.c config.h tconfig.h hconfig.h
1924 -rm -f config.status config.run
1925 -rm -f md md.pre-cpp
1926 -rm -f Makefile
*.oaux
1927 -rm -fr stage1 stage2 stage3 stage4
1928 -rm -f
*/stage1
*/stage2
*/stage3
*/stage4
*/include
1929 -rm -f objc-parse.output
1930 -rm -f c-parse.output
1933 # Delete anything likely to be found in the source directory
1934 # that shouldn't be in the distribution.
1935 extraclean
: distclean lang.extraclean
1936 -rm -rf
=* .
/"#"* *~
* config
/=* config
/"#"* config
/*~
*
1937 -rm -f patch
* *.orig
*.rej config
/patch
* config
/*.orig config
/*.rej
1938 -rm -f config
/*/=* config
/*/"#"* config
/*/*~
*
1939 -rm -f config
/*/*.orig config
/*/*.rej
1940 -rm -f
*.
dvi *.ps
*.oaux
*.d
*.
[zZ
] *.gz
1941 -rm -f
*.
tar *.xtar
*diff
*.diff.
* *.
tar.
* *.xtar.
* *diffs
1942 -rm -f
*lose config
/*lose config
/*/*lose
1943 -rm -f
*.s
*.s
[0-9] *.i install1.texi config
/ChangeLog
1944 -rm -f
*/=* */"#"* */*~
*
1945 -rm -f
*/patch
* */*.orig
*/*.rej
1946 -rm -f
*/*.
dvi */*.oaux
*/*.d
*/*.
[zZ
] */*.gz
1947 -rm -f
*/*.
tar */*.xtar
*/*diff
*/*.diff.
* */*.
tar.
* */*.xtar.
* */*diffs
1948 -rm -f
*/*lose
*/*.s
*/*.s
[0-9] */*.i
1950 # Get rid of every file that's generated from some other file.
1951 # Most of these files ARE PRESENT in the GCC distribution.
1952 maintainer-clean
: distclean bytecode.maintainer-clean lang.maintainer-clean
1953 -rm -f c-parse.y c-gperf.h objc-parse.y
1954 -rm -f objc-parse.c objc-parse.output
1955 -rm -f c-parse.c c-parse.h c-parse.output
1956 -rm -f cexp.c cexp.output TAGS
1957 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
1958 -rm -f gcc.
info* gcc.??s gcc.
*aux
1960 # Entry points `install' and `uninstall'.
1961 # Also use `install-collect2' to install collect2 when the config files don't.
1963 # The semicolon is to prevent the install.sh -> install default rule
1964 # from doing anything. Having it run true helps avoid problems and
1965 # noise from versions of make which don't like to have null commands.
1966 install: $(INSTALL_TARGET
) ; @true
1968 # Copy the compiler files into directories where they will be run.
1969 install-normal
: install-common
$(INSTALL_HEADERS
) $(INSTALL_LIBGCC
) \
1970 install-man install-info lang.install-normal
1972 # Do nothing while making gcc with a cross-compiler. The person who
1973 # makes gcc for the target machine has to know how to put a complete
1974 # gcc together by hand.
1975 install-build
: force
1976 @echo You have to
install gcc on your target machine by hand.
1978 # Run this on the target machine
1979 # to finish installation of cross compiler.
1980 install-cross-rest
: install-float-h-cross
1982 # Install float.h for cross compiler.
1983 # Run this on the target machine!
1984 install-float-h-cross
: install-dir
1985 # if [ -f enquire ] ; then true; else false; fi
1986 # Note: don't use -. We should fail right away if enquire was not made.
1987 .
/enquire
-f
> $(tmpdir
)/float.h
1988 -rm -f
$(libsubdir
)/include/float.h
1989 $(INSTALL_DATA
) $(tmpdir
)/float.h
$(libsubdir
)/include/float.h
1990 -rm -f
$(tmpdir
)/float.h
1991 chmod a-x
$(libsubdir
)/include/float.h
1993 # Create the installation directory.
1995 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; chmod a
+rx
$(libdir) ; fi
1996 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; chmod a
+rx
$(libdir)/gcc-lib
; fi
1997 # This dir isn't currently searched by cpp.
1998 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
1999 -if
[ -d
$(libdir)/gcc-lib
/$(target
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
) ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
) ; fi
2000 -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
2001 -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
2002 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; chmod a
+rx
$(bindir) ; fi
2003 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; chmod a
+rx
$(includedir) ; fi
2004 -if
[ -d
$(tooldir
) ] ; then true
; else mkdir
$(tooldir
) ; chmod a
+rx
$(tooldir
) ; fi
2005 -if
[ -d
$(assertdir
) ] ; then true
; else mkdir
$(assertdir
) ; chmod a
+rx
$(assertdir
) ; fi
2006 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; chmod a
+rx
$(infodir) ; fi
2007 # We don't use mkdir -p to create the parents of mandir,
2008 # because some systems don't support it.
2009 # Instead, we use this technique to create the immediate parent of mandir.
2010 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2011 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; chmod a
+rx
$$parent ; fi
2012 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; chmod a
+rx
$(mandir) ; fi
2014 # Install the compiler executables built during cross compilation.
2015 install-common
: native install-dir xgcc
$(EXTRA_PARTS
) lang.install-common
2016 for file in
$(COMPILERS
); do \
2017 if
[ -f
$$file ] ; then \
2018 rm -f
$(libsubdir
)/$$file; \
2019 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2023 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
2024 if
[ x
"$$file" != x..
]; then \
2025 rm -f
$(libsubdir
)/$$file; \
2026 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2029 for file in
$(EXTRA_PARTS
) ..
; do \
2030 if
[ x
"$$file" != x..
]; then \
2031 rm -f
$(libsubdir
)/$$file; \
2032 $(INSTALL_DATA
) $$file $(libsubdir
)/$$file; \
2035 # Don't mess with specs if it doesn't exist yet.
2036 -if
[ -f specs
] ; then \
2037 rm -f
$(libsubdir
)/specs
; \
2038 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
; \
2040 # Install the driver program as $(target)-gcc
2041 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2042 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2043 rm -f
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2044 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2045 if
[ -d
$(tooldir
)/bin
/.
] ; then \
2046 rm -f
$(tooldir
)/bin
/gcc
$(exeext
); \
2047 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(tooldir
)/bin
/gcc
$(exeext
); \
2050 rm -f
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2051 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2052 rm -f
$(bindir)/$(target
)-gcc-1
$(exeext
); \
2053 ln
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
) \
2055 || cp
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
); \
2056 mv
$(bindir)/$(target
)-gcc-1
$(exeext
) $(bindir)/$(target
)-gcc
$(exeext
); \
2058 # Install protoize if it was compiled.
2059 -if
[ -f protoize
$(exeext
) ]; \
2061 rm -f
$(bindir)/protoize
$(exeext
); \
2062 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(bindir)/protoize
$(exeext
); \
2063 rm -f
$(bindir)/unprotoize
$(exeext
); \
2064 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(bindir)/unprotoize
$(exeext
); \
2065 rm -f
$(libsubdir
)/SYSCALLS.c.X
; \
2066 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
; \
2067 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
; \
2069 -rm -f
$(libsubdir
)/cpp$(exeext
)
2070 $(INSTALL_PROGRAM
) cpp$(exeext
) $(libsubdir
)/cpp$(exeext
)
2072 # Install the info files.
2073 install-info
: doc install-dir lang.install-info
2074 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2075 cd
$(srcdir); for f in
cpp.
info* gcc.
info*; \
2076 do
$(INSTALL_DATA
) $$f $(infodir)/$$f; done
2077 -chmod a-x
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2079 # Install the man pages.
2080 install-man
: install-dir
$(srcdir)/gcc
.1 $(srcdir)/cccp
.1 lang.install-man
2081 -if
[ -f gcc-cross
] ; then \
2082 rm -f
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2083 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2084 chmod a-x
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2086 rm -f
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2087 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2088 chmod a-x
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2090 -rm -f
$(mandir)/cccp
$(manext)
2091 -$(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
2092 -chmod a-x
$(mandir)/cccp
$(manext)
2094 # Install the library.
2095 install-libgcc
: libgcc.a install-dir
2096 -if
[ -f libgcc.a
] ; then \
2097 rm -f
$(libsubdir
)/libgcc.a
; \
2098 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
2099 if
$(RANLIB_TEST
) ; then \
2100 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
2101 chmod a-x
$(libsubdir
)/libgcc.a
; \
2104 # Install multiple versions of libgcc.a.
2105 install-multilib
: stmp-multilib install-dir
2106 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
2107 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2108 if
[ -d
$(libsubdir
)/$${dir} ]; then true
; else mkdir
$(libsubdir
)/$${dir}; fi
; \
2109 rm -f
$(libsubdir
)/$${dir}/libgcc.a
; \
2110 $(INSTALL_DATA
) $${dir}/libgcc.a
$(libsubdir
)/$${dir}/libgcc.a
; \
2111 if
$(RANLIB_TEST
); then \
2112 (cd
$(libsubdir
)/$${dir}; $(RANLIB
) libgcc.a
); else true
; fi
; \
2113 chmod a-x
$(libsubdir
)/$${dir}/libgcc.a
; \
2116 # Install the objc run time library.
2117 install-libobjc
: libobjc.a install-dir
2118 -if
[ -f libobjc.a
] ; then \
2119 rm -f
$(libsubdir
)/libobjc.a
; \
2120 $(INSTALL_DATA
) libobjc.a
$(libsubdir
)/libobjc.a
; \
2121 if
$(RANLIB_TEST
) ; then \
2122 (cd
$(libsubdir
); $(RANLIB
) libobjc.a
); else true
; fi
; \
2123 chmod a-x
$(libsubdir
)/libobjc.a
; \
2126 # Install all the header files built in the include subdirectory.
2127 install-headers
: install-include-dir
$(INSTALL_HEADERS_DIR
) install-assert-h
2128 # Fix symlinks to absolute paths in the installed include directory to
2129 # point to the installed directory, not the build directory.
2130 -files
=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2131 if
[ $$?
-eq
0 ]; then \
2132 dir=`cd include; pwd`; \
2133 for i in
$$files; do \
2134 dest
=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2135 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2136 rm -f
$(libsubdir
)/include/$$i; \
2137 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir
)/include/$$i; \
2142 # Create or recreate the gcc private include file directory.
2143 install-include-dir
: install-dir
2144 -rm -rf
$(libsubdir
)/include
2145 mkdir
$(libsubdir
)/include
2146 -chmod a
+rx
$(libsubdir
)/include
2148 # Install the include directory using tar.
2149 install-headers-tar
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2151 tar -cf
- .
; exit
0) |
(cd
$(libsubdir
)/include; tar $(TAROUTOPTS
) - )
2152 # /bin/sh on some systems returns the status of the first tar,
2153 # and that can lose with GNU tar which always writes a full block.
2154 # So use `exit 0' to ignore its exit status.
2156 # Install the include directory using cpio.
2157 install-headers-cpio
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2158 (cd
include; find .
-print) |
(cd
include; cpio
-pdum
$(libsubdir
)/include)
2160 # Put assert.h where it won't override GNU libc's assert.h.
2161 # It goes in a dir that is searched after GNU libc's headers;
2162 # thus, the following conditionals are no longer needed.
2163 # But it's not worth deleting them now.
2164 ## Don't replace the assert.h already there if it is not from GCC.
2165 ## This code would be simpler if it tested for -f ... && ! grep ...
2166 ## but supposedly the ! operator is missing in sh on some systems.
2167 install-assert-h
: assert.h install-dir
2168 if
[ -f
$(assertdir
)/assert.h
]; \
2170 if grep
"__eprintf" $(assertdir
)/assert.h
>/dev
/null
; \
2172 rm -f
$(assertdir
)/assert.h
; \
2173 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2174 chmod a-x
$(assertdir
)/assert.h
; \
2178 rm -f
$(assertdir
)/assert.h
; \
2179 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2180 chmod a-x
$(assertdir
)/assert.h
; \
2183 # Use this target to install the program `collect2' under the name `ld'.
2184 install-collect2
: collect2 install-dir
2185 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(libsubdir
)/ld$(exeext
)
2186 # Install the driver program as $(libsubdir)/gcc for collect2.
2187 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(libsubdir
)/gcc
$(exeext
)
2189 # Cancel installation by deleting the installed files.
2190 uninstall: lang.
uninstall
2191 -rm -rf
$(libsubdir
)
2192 -rm -rf
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2193 -rm -rf
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
)
2194 -rm -rf
$(bindir)/protoize
$(exeext
)
2195 -rm -rf
$(bindir)/unprotoize
$(exeext
)
2196 -rm -rf
$(mandir)/$(GCC_INSTALL_NAME
)$(manext)
2197 -rm -rf
$(mandir)/$(GCC_CROSS_NAME
)$(manext)
2198 -rm -rf
$(mandir)/cccp
$(manext)
2199 -rm -rf
$(mandir)/protoize
$(manext)
2200 -rm -rf
$(mandir)/unprotoize
$(manext)
2202 # These exist for maintenance purposes.
2204 # Update the tags table.
2208 mv
-f c-parse.
[ch
] objc-parse.c cexp.c
=*.
[chy
] temp
; \
2209 etags
*.y
*.h
*.c
; \
2213 # Create the distribution tar file.
2214 #dist: gcc-$(version).tar.gz
2217 gcc.xtar.gz
: gcc.xtar
2218 gzip
--best
< gcc.xtar
> tmp-gcc.xtar.gz
2219 mv tmp-gcc.xtar.gz gcc.xtar.gz
2221 #gcc-$(version).tar.gz: gcc-$(version).tar
2222 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2224 #gcc-$(version).tar:
2226 # Make the distribution.
2227 tar -chf gcc.xtar gcc-
$(version
)
2229 # This target exists to do the initial work before the language specific
2231 distdir-start
: doc
$(srcdir)/INSTALL c-parse.y
$(srcdir)/c-gperf.h objc-parse.y \
2232 c-parse.c objc-parse.c cexp.c
2233 @if grep
-s
"for version ${mainversion}" gcc.texi
> /dev
/null
; \
2235 else echo
"You must update the version number in \`gcc.texi'"; sleep
10;\
2237 # Update the version number in README
2238 awk
'$$1 " " $$2 " " $$3 == "This directory contains" \
2239 { $$6 = version; print $$0 } \
2240 $$1 " " $$2 " " $$3 != "This directory contains"' \
2241 version
=$(version
) README
> tmp.README
2242 mv tmp.README README
2243 -rm -rf gcc-
$(version
) tmp
2244 # Put all the files in a temporary subdirectory
2245 # which has the name that we want to have in the tar file.
2250 for file in
*[0-9a-zA-Z
+]; do \
2251 ln
$$file tmp
> /dev
/null
2>&1 || cp
$$file tmp
; \
2254 for file in
*[0-9a-zA-Z
+]; do \
2255 if
test -d
$$file && test "$$file" != RCS
; then \
2256 mkdir ..
/tmp
/config
/$$file; \
2258 for subfile in
*[0-9a-zA-Z
+]; do \
2259 ln
$$subfile ..
/..
/tmp
/config
/$$file >/dev
/null
2>&1 \
2260 || cp
$$subfile ..
/..
/tmp
/config
/$$file; \
2264 ln
$$file ..
/tmp
/config
>/dev
/null
2>&1 \
2265 || cp
$$file ..
/tmp
/config
; \
2269 for file in
*[0-9a-zA-Z
+]; do \
2270 ln
$$file ..
/tmp
/ginclude
>/dev
/null
2>&1 \
2271 || cp
$$file ..
/tmp
/ginclude
; \
2274 for file in
*[0-9a-zA-Z
+]; do \
2275 ln
$$file ..
/tmp
/objc
>/dev
/null
2>&1 || cp
$$file ..
/tmp
/objc
; \
2279 # Finish making `distdir', after the languages have done their thing.
2281 mv tmp gcc-
$(version
)
2282 # Get rid of everything we don't want in the distribution. We'd want
2283 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2285 cd gcc-
$(version
); make extraclean
2287 distdir
: distdir-start lang.distdir distdir-finish
2289 # make diff oldversion=M.N
2290 # creates a diff file between an older distribution and this one.
2291 # The -P option assumes this is GNU diff.
2293 diff
-rc2P
-x c-parse.y
-x c-parse.c
-x c-parse.h
-x c-gperf.h \
2294 -x cexp.c
-x bi-parser.c
-x objc-parse.y
-x objc-parse.c \
2296 -x
"gcc.??" -x
"gcc.??s" -x gcc.aux
-x
"gcc.info*" \
2297 -x
"cpp.??" -x
"cpp.??s" -x
cpp.aux
-x
"cpp.info*" \
2298 $(LANG_DIFF_EXCLUDES
) \
2299 gcc-
$(oldversion
) gcc-
$(version
) > diffs
2301 # do make -f ../gcc/Makefile maketest DIR=../gcc
2302 # in the intended test directory to make it a suitable test directory.
2303 # THIS IS OBSOLETE; use the -srcdir operand in configure instead.
2305 ln
-s
$(DIR
)/*.
[chy
] .
2306 ln
-s
$(DIR
)/configure .
2307 ln
-s
$(DIR
)/*.def .
2309 ln
-s
$(DIR
)/.gdbinit .
2310 ln
-s
$(DIR
)/$(FIXINCLUDES
) .
2311 -ln
-s
$(DIR
)/bison.simple .
2312 ln
-s
$(DIR
)/config .
2313 ln
-s
$(DIR
)/move-if-change .
2314 # The then and else were swapped to avoid a problem on Ultrix.
2315 if
[ ! -f Makefile
] ; then ln
-s
$(DIR
)/Makefile .
; else false
; fi
2316 -rm tm.h aux-output.c config.h md
2318 # You must then run config to set up for compilation.
2321 # Only build the C compiler for stage1, because that is the only one that
2322 # we can guarantee will build with the native compiler, and also it is the
2323 # only thing useful for building stage2.
2324 $(MAKE
) CC
="$(CC)" libdir=$(libdir) LANGUAGES
=c
2326 # This used to define ALLOCA as empty, but that would lead to bad results
2327 # for a subsequent `make install' since that would not have ALLOCA empty.
2328 # To prevent `make install' from compiling alloca.o and then relinking cc1
2329 # because alloca.o is newer, we permit these recursive makes to compile
2330 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2331 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2333 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2336 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2338 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2341 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2343 # Compare the object files in the current directory with those in the
2346 # ./ avoids bug in some versions of tail.
2348 for file in
*.o
; do \
2349 tail
+16c .
/$$file > tmp-foo1
; \
2350 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2351 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2353 for
dir in tmp-foo
$(SUBDIRS
); do \
2354 if
[ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
2355 for file in
$$dir/*.o
; do \
2356 tail
+16c .
/$$file > tmp-foo1
; \
2357 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2358 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2364 # Similar, but compare with stage3 directory
2366 for file in
*.o
; do \
2367 tail
+16c .
/$$file > tmp-foo1
; \
2368 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2369 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2371 for
dir in tmp-foo
$(SUBDIRS
); do \
2372 if
[ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
2373 for file in
$$dir/*.o
; do \
2374 tail
+16c .
/$$file > tmp-foo1
; \
2375 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2376 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2382 # Compare the object files in the current directory with those in the
2383 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2384 # running tail and the overhead of twice copying each object file.
2387 for file in
*.o
; do \
2388 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2390 for
dir in tmp-foo
$(SUBDIRS
); do \
2391 if
[ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
2392 for file in
$$dir/*.o
; do \
2393 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2398 # Similar, but compare with stage3 directory
2400 for file in
*.o
; do \
2401 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2403 for
dir in tmp-foo
$(SUBDIRS
); do \
2404 if
[ "`echo $$dir/*.o`" != "$$dir/*.o" ] ; then \
2405 for file in
$$dir/*.o
; do \
2406 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2411 # Copy the object files from a particular stage into a subdirectory.
2413 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2414 -for
dir in .
$(SUBDIRS
) ; \
2416 if
[ -d stage1
/$$dir ] ; then true
; else mkdir stage1
/$$dir ; fi
; \
2418 -mv
$(STAGESTUFF
) stage1
2419 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2420 # dir will work properly.
2421 -if
[ -f
as ] ; then cp
as stage1
; else true
; fi
2422 -if
[ -f
ld ] ; then cp
ld stage1
; else true
; fi
2423 -if
[ -f real-ld
] ; then cp real-ld stage1
; else true
; fi
2424 -rm -f stage1
/libgcc.a
2426 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
2427 stage1
: force stage1-start lang.stage1
2430 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2431 -for
dir in .
$(SUBDIRS
) ; \
2433 if
[ -d stage2
/$$dir ] ; then true
; else mkdir stage2
/$$dir ; fi
; \
2435 -mv
$(STAGESTUFF
) stage2
2436 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2437 # dir will work properly.
2438 -if
[ -f
as ] ; then cp
as stage2
; else true
; fi
2439 -if
[ -f
ld ] ; then cp
ld stage2
; else true
; fi
2440 -if
[ -f real-ld
] ; then cp real-ld stage2
; else true
; fi
2441 -rm -f stage2
/libgcc.a
2443 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
2444 stage2
: force stage2-start lang.stage2
2447 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2448 -for
dir in .
$(SUBDIRS
) ; \
2450 if
[ -d stage3
/$$dir ] ; then true
; else mkdir stage3
/$$dir ; fi
; \
2452 -mv
$(STAGESTUFF
) stage3
2453 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2454 # dir will work properly.
2455 -if
[ -f
as ] ; then cp
as stage3
; else true
; fi
2456 -if
[ -f
ld ] ; then cp
ld stage3
; else true
; fi
2457 -if
[ -f real-ld
] ; then cp real-ld stage3
; else true
; fi
2458 -rm -f stage3
/libgcc.a
2460 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
2461 stage3
: force stage3-start lang.stage3
2464 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2465 -for
dir in .
$(SUBDIRS
) ; \
2467 if
[ -d stage4
/$$dir ] ; then true
; else mkdir stage4
/$$dir ; fi
; \
2469 -mv
$(STAGESTUFF
) stage4
2470 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2471 # dir will work properly.
2472 -if
[ -f
as ] ; then cp
as stage4
; else true
; fi
2473 -if
[ -f
ld ] ; then cp
ld stage4
; else true
; fi
2474 -if
[ -f real-ld
] ; then cp real-ld stage4
; else true
; fi
2475 -rm -f stage4
/libgcc.a
2477 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
2478 stage4
: force stage4-start lang.stage4
2480 # Copy just the executable files from a particular stage into a subdirectory,
2481 # and delete the object files. Use this if you're just verifying a version
2482 # that is pretty sure to work, and you are short of disk space.
2484 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2485 -mv
$(GCC_PARTS
) stage1
2486 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2487 # dir will work properly.
2488 -if
[ -f
as ] ; then cp
as stage1
; else true
; fi
2489 -if
[ -f
ld ] ; then cp
ld stage1
; else true
; fi
2490 -if
[ -f real-ld
] ; then cp real-ld stage1
; else true
; fi
2491 -rm -f stage1
/libgcc.a
2492 -cp libgcc.a stage1
&& $(RANLIB
) stage1
/libgcc.a
2496 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2497 -mv
$(GCC_PARTS
) stage2
2498 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2499 # dir will work properly.
2500 -if
[ -f
as ] ; then cp
as stage2
; else true
; fi
2501 -if
[ -f
ld ] ; then cp
ld stage2
; else true
; fi
2502 -if
[ -f real-ld
] ; then cp real-ld stage2
; else true
; fi
2503 -rm -f stage2
/libgcc.a
2504 -cp libgcc.a stage2
&& $(RANLIB
) stage2
/libgcc.a
2508 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2509 -mv
$(GCC_PARTS
) stage3
2510 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2511 # dir will work properly.
2512 -if
[ -f
as ] ; then cp
as stage3
; else true
; fi
2513 -if
[ -f
ld ] ; then cp
ld stage3
; else true
; fi
2514 -if
[ -f real-ld
] ; then cp real-ld stage3
; else true
; fi
2515 -rm -f stage3
/libgcc.a
2516 -cp libgcc.a stage3
&& $(RANLIB
) stage3
/libgcc.a
2520 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2521 -mv
$(GCC_PARTS
) stage4
2522 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2523 # dir will work properly.
2524 -if
[ -f
as ] ; then cp
as stage4
; else true
; fi
2525 -if
[ -f
ld ] ; then cp
ld stage4
; else true
; fi
2526 -if
[ -f real-ld
] ; then cp real-ld stage4
; else true
; fi
2527 -rm -f stage4
/libgcc.a
2528 -cp libgcc.a stage4
&& $(RANLIB
) stage4
/libgcc.a
2531 #In GNU Make, ignore whether `stage*' exists.
2532 .PHONY
: stage1 stage2 stage3 stage4
clean maintainer-clean TAGS bootstrap
2533 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4