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, 59 Temple Place - Suite 330,
19 #Boston MA 02111-1307, USA.
21 # The targets for external use include:
22 # all, doc, proto, install, install-cross, install-cross-rest,
23 # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
24 # stage1, stage2, stage3, stage4.
26 # Suppress smart makes who think they know how to automake Yacc files
29 # Variables that exist for you to override.
30 # See below for how to change them for certain systems.
32 # List of language subdirectories.
33 # This is overridden by configure.
36 # Selection of languages to be made.
37 # This is overridden by configure.
38 LANGUAGES
= c objective-c proto
44 # Various ways of specifying flags for compilations:
45 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
46 # BOOT_CFLAGS is the value of CFLAGS to pass
47 # to the stage2 and stage3 compilations
48 # XCFLAGS is used for most compilations but not when using the GCC just built.
51 BOOT_CFLAGS
= -O
$(CFLAGS
)
52 # These exists to be overridden by the x-* and t-* files, respectively.
68 # on sysV, define this as cp.
70 # These permit overriding just for certain files.
71 INSTALL_PROGRAM
= $(INSTALL
)
72 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 out_file
= ...
`configure' substitutes actual out file name here.
154 out_object_file= ... `configure
' substitutes actual out object file name here.
155 md_file= ... `configure' substitutes actual md file name here.
156 tm_file
= ...
`configure' substitutes actual tm file name here.
157 build_xm_file= ... `configure
' substitutes actual build xm- file name here.
158 host_xm_file= ... `configure' substitutes actual host xm- file name here.
159 lang_specs_files
= ...
`configure' substitutes actual lang spec file names here.
160 lang_options_files= ... `configure
' puts actual lang options file names here.
161 version=`sed -e 's
/.
*\"\
([^
\"]*\
)[ \"].
*/\
1/' < $(srcdir)/version.c`
162 mainversion=`sed -e 's
/.
*\"\
([0-9]*\.
[0-9]*\
).
*/\
1/' < $(srcdir)/version.c`
164 # Directory where sources are, from where we are.
166 # Common prefix for installation directories.
167 # NOTE: This directory must exist when you start installation.
169 # Directory in which to put localized header files. On the systems with
170 # gcc as the native cc, `local_prefix' may not be
`prefix' which is
172 # NOTE: local_prefix *should not* default from prefix.
173 local_prefix = /usr/local
174 # Directory in which to put host dependent programs and libraries
175 exec_prefix = $(prefix)
176 # Directory in which to put the executable for the command `gcc'
177 bindir = $(exec_prefix)/bin
178 # Directory in which to put the directories used by the compiler.
179 libdir = $(exec_prefix)/lib
180 # Directory in which the compiler finds executables, libraries, etc.
181 libsubdir
= $(libdir)/gcc-lib
/$(target
)/$(version
)
182 # Directory in which the compiler finds g++ includes.
183 gxx_include_dir
= $(libdir)/g
++-include
184 # Directory to search for site-specific includes.
185 includedir = $(local_prefix
)/include
186 # assertdir is overridden in cross-make.
187 # (But this currently agrees with what is in cross-make.)
188 assertdir
= $(tooldir
)/include
189 # where the info files go
190 infodir = $(prefix)/info
191 # Extension (if any) to put in installed man-page filename.
196 # Directory in which to put man pages.
197 mandir = $(prefix)/man
/man1
198 # Directory in which to find other cross-compilation tools and headers.
199 # Used in install-cross.
200 tooldir
= $(exec_prefix)/$(target
)
201 # Dir for temp files.
204 # Additional system libraries to link with.
207 # Change this to a null string if obstacks are installed in the
211 # Specify the rule for actually making libgcc.a,
213 # and the rule for installing it.
214 INSTALL_LIBGCC
= install-libgcc
216 # Specify the rule for actually making libgcc1.a.
217 # The value may be empty; that means to do absolutely nothing
218 # with or for libgcc1.a.
221 # Specify the rule for making libgcc1.a for a cross-compiler.
222 # The default rule assumes that libgcc1.a is supplied by the user.
223 CROSS_LIBGCC1
= libgcc1.cross
225 # Specify the rule for actually making libgcc2.a.
228 # Options to use when compiling libgcc2.a.
229 # -g1 causes output of debug info only for file-scope entities.
230 # we use this here because that should be enough, and also
231 # so that -g1 will be tested.
232 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) -g1
234 # Additional options to use when compiling libgcc2.a.
235 # Some targets override this to -Iinclude
238 # Things which must be built before building libgcc2.a.
239 # Some targets override this to stmp-int-hdrs
242 # Enquire target (This is a variable so that a target can choose not to
246 # libgcc1-test target (must also be overridable for a target)
247 LIBGCC1_TEST
= libgcc1-test
249 # List of extra executables that should be compiled for this target machine
250 # that are used for compiling from source code to object code.
251 # The rules for compiling them should be in the t-* file for the machine.
254 # Like EXTRA_PASSES, but these are used when linking.
257 # List of extra object files that should be compiled for this target machine.
258 # The rules for compiling them should be in the t-* file for the machine.
261 # List of extra object files that should be compiled and linked with
262 # compiler proper (cc1, cc1obj, cc1plus).
265 # List of additional header files to install.
266 # Often this is edited directly by `configure'.
269 # Set this to `ld' to enable use of collect2.
271 # It is convenient for configure to add the assignment at the beginning,
272 # so don't override it here.
274 # List of extra C and assembler files to add to libgcc1.a.
275 # Assembler files should have names ending in `.asm'.
278 # List of extra C and assembler files to add to libgcc2.a.
279 # Assembler files should have names ending in `.asm'.
282 # Default float.h source to use for cross-compiler.
283 CROSS_FLOAT_H
=float.h-cross
285 # Program to convert libraries.
288 # Control whether header files are installed.
289 INSTALL_HEADERS
=install-headers
291 # Options for tar when copying trees. So HPUX can override it.
294 # Select which version of fixincludes to use (I.E. regular versus SVR4)
295 # This value is overridden directly by configure.
296 FIXINCLUDES
=fixincludes
298 # Additional directories of header files to run fixincludes on.
299 # These should be directories searched automatically by default
300 # just as /usr/include is.
301 # *Do not* use this for directories that happen to contain
302 # header files, but are not searched automatically by default.
303 # On most systems, this is empty.
304 OTHER_FIXINCLUDES_DIRS
=
306 # List of things which should already be built whenever we try to use xgcc
307 # to compile anything (without linking).
308 GCC_PASSES
=xgcc cc1
cpp $(EXTRA_PASSES
)
310 # List of things which should already be built whenever we try to use xgcc
312 GCC_PARTS
=$(GCC_PASSES
) $(LIBGCC
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
314 # Directory to link to, when using the target `maketest'.
317 # Guaranteed to not exist when not passing md through cpp.
318 # This value is overridden directly by configure.
319 MD_FILE
= md-cpp-not-used
321 # Flags to use when cross-building GCC.
322 # Prefix to apply to names of object files when using them
323 # to run on the machine we are compiling on.
325 # Prefix to apply to names of object files when compiling them
326 # to run on the machine we are compiling on.
327 # The default for this variable is chosen to keep these rules
328 # out of the way of the other rules for compiling the same source files.
331 HOST_CFLAGS
=$(ALL_CFLAGS
)
333 HOST_LDFLAGS
=$(LDFLAGS
)
334 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
335 HOST_ALLOCA
=$(ALLOCA
)
336 HOST_MALLOC
=$(MALLOC
)
337 HOST_OBSTACK
=$(OBSTACK
)
339 # Actual name to use when installing a native compiler.
340 GCC_INSTALL_NAME
= `t='$(program_transform_name)'; echo gcc | sed $$t`
342 # Actual name to use when installing a cross-compiler.
343 GCC_CROSS_NAME
= `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
345 # Choose the real default target.
348 # Choose the real install target.
349 INSTALL_TARGET
=install-normal
351 # Source for float.h. Overridden by cross-make.
354 # Extra symbols for fixproto to define when parsing headers.
357 # Extra flags to use when compiling crt{begin,end}.o.
360 # End of variables for you to override.
362 # Definition of `all' is here so that new rules inserted by sed
363 # do not specify the default target.
364 # The real definition is under `all.internal' (for native compilers)
365 # or `all.cross' (for cross compilers).
368 # This tells GNU Make version 3 not to put all variables in the environment.
371 # sed inserts variable overrides after the following line.
377 # Now figure out from those variables how to compile and link.
381 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
382 # ??? IN_GCC should be obsolete now.
383 INTERNAL_CFLAGS
= $(CROSS
) -DIN_GCC
385 # This is the variable actually used when we compile.
386 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
)
389 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
391 # Even if ALLOCA is set, don't use it if compiling with GCC.
392 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
393 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
394 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
395 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
397 # Dependency on obstack, alloca, malloc or whatever library facilities
398 # are not installed in the system libraries.
399 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
400 LIBDEPS
= $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
402 # Likewise, for use in the tools that must run on this machine
403 # even if we are cross-building GCC.
404 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
405 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
407 # How to link with both our special library facilities
408 # and the system's installed libraries.
409 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(CLIB
)
411 # Likewise, for use in the tools that must run on this machine
412 # even if we are cross-building GCC.
413 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
416 HOST_RTL
= $(HOST_PREFIX
)rtl.o
417 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
418 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
420 # Specify the directories to be searched for header files.
421 # Both . and srcdir are used, in that order,
422 # so that tm.h and config.h will be found in the compilation
423 # subdirectory rather than in the source directory.
424 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
426 # Always use -I$(srcdir)/config when compiling.
428 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
430 # This tells GNU make version 3 not to export all the variables
431 # defined in this file into the environment.
434 # Support for additional languages (other than c and objc).
435 # ??? objc can be supported this way too (leave for later).
437 # These next lines are overridden by configure.
442 # Flags to pass to recursive makes.
443 # CC is set by configure. Hosts without symlinks need special handling
444 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
446 # ??? The choices here will need some experimenting with.
448 "AR_FLAGS=$(AR_FLAGS)" \
449 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
451 "BISONFLAGS=$(BISONFLAGS)" \
452 "CC=set-by-configure" \
454 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
455 "LDFLAGS=$(LDFLAGS)" \
457 "LEXFLAGS=$(LEXFLAGS)" \
458 "MAKEINFO=$(MAKEINFO)" \
459 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
460 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
461 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
465 "exec_prefix=$(exec_prefix)" \
467 "tooldir=$(tooldir)" \
469 "libsubdir=$(libsubdir)"
471 # Lists of files for various purposes.
473 # A list of all the language-specific executables.
474 # This is overridden by configure.
475 COMPILERS
= cc1
$(exeext
) cc1obj
$(exeext
)
477 # Language-specific object files for C.
478 C_OBJS
= c-parse.o c-lang.o c-lex.o c-pragma.o \
479 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
481 # Language-specific object files for Objective C.
482 OBJC_OBJS
= objc-parse.o objc-act.o c-lex.o c-pragma.o \
483 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
485 # Files specific to the C interpreter bytecode compiler(s).
486 BC_OBJS
= bc-emit.o bc-optab.o
488 # Bytecode header files constructed at build time; vmsconfig.com wants this.
489 BC_ALL
= bc-arity.h bc-opcode.h bc-opname.h
491 # Language-independent object files.
492 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
493 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
494 rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
495 dbxout.o sdbout.o dwarfout.o xcoffout.o \
496 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
497 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
498 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
499 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
500 insn-attrtab.o
$(out_object_file
) getpwd.o convert.o
$(EXTRA_OBJS
)
502 # GEN files are listed separately, so they can be built before doing parallel
503 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
504 # them before rtl.o is compiled.
505 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
508 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
511 # Files to be copied away after each stage in building.
512 STAGESTUFF
= *$(objext
) insn-flags.h insn-config.h insn-codes.h \
513 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
514 insn-attr.h insn-attrtab.c insn-opinit.c \
515 stamp-flags stamp-config stamp-codes \
516 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
517 stamp-attr stamp-attrtab stamp-opinit stamp-proto \
518 genemit
$(exeext
) genoutput
$(exeext
) genrecog
$(exeext
) genextract
$(exeext
) \
519 genflags
$(exeext
) gencodes
$(exeext
) genconfig
$(exeext
) genpeep
$(exeext
) \
520 genattrtab
$(exeext
) genattr
$(exeext
) genopinit
$(exeext
) \
522 stamp-bcarity stamp-bcopcode stamp-bcopname \
523 bi-arity
$(exeext
) bi-opcode
$(exeext
) bi-opname
$(exeext
) \
524 $(GCC_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) \
525 $(CCCP
)$(exeext
) cc1obj
$(exeext
) enquire
$(exeext
) \
526 protoize
$(exeext
) unprotoize
$(exeext
) \
527 specs collect2
$(exeext
) $(USE_COLLECT2
) underscore.c \
528 *.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop \
529 *.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack \
533 # Members of libgcc1.a.
534 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
535 _lshrsi3 _ashrsi3 _ashlsi3 \
536 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
537 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
538 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
539 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
540 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
542 # Library members defined in libgcc2.c.
543 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
544 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
545 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
546 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
547 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
548 _fixtfdi _fixunstfdi _floatditf \
549 __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
550 _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
553 # Header files that are made available under the same name
554 # to programs compiled with GCC.
555 USER_H
= $(srcdir)/ginclude
/stdarg.h
$(srcdir)/ginclude
/stddef.h \
556 $(srcdir)/ginclude
/varargs.h
$(srcdir)/ginclude
/va-alpha.h \
557 $(srcdir)/ginclude
/va-h8300.h
$(srcdir)/ginclude
/va-i860.h \
558 $(srcdir)/ginclude
/va-i960.h
$(srcdir)/ginclude
/va-mips.h \
559 $(srcdir)/ginclude
/va-m88k.h
$(srcdir)/ginclude
/va-pa.h \
560 $(srcdir)/ginclude
/va-pyr.h
$(srcdir)/ginclude
/va-sparc.h \
561 $(srcdir)/ginclude
/va-clipper.h
$(srcdir)/ginclude
/va-spur.h \
562 $(srcdir)/ginclude
/iso646.h \
563 $(srcdir)/ginclude
/proto.h
$(EXTRA_HEADERS
)
565 # The files that "belong" in CONFIG_H are deliberately omitted
566 # because having them there would not be useful in actual practice.
567 # All they would do is cause complete recompilation every time
568 # one of the machine description files is edited.
569 # That may or may not be what one wants to do.
570 # If it is, rm *.o is an easy way to do it.
571 # CONFIG_H = $(host_xm_file) $(tm_file)
573 RTL_H
= rtl.h rtl.def machmode.h machmode.def
574 TREE_H
= tree.h real.h tree.def machmode.h machmode.def
575 BYTECODE_H
= bytecode.h bc-emit.h bc-optab.h
577 # Language makefile fragments.
579 # The following targets define the interface between us and the languages.
581 # all.build, all.cross, start.encap, rest.encap,
583 # install-normal, install-common, install-info, install-man,
584 # uninstall, distdir,
585 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
586 # stage1, stage2, stage3, stage4
588 # Each language is linked in with a series of hooks (since we can't use `::'
589 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
590 # Configure computes and adds these here.
594 # sed inserts language fragments after the following line.
595 ####language fragments
597 # End of language makefile fragments.
599 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
602 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
$(srcdir)/version.c \
603 $(srcdir)/config
/$(xmake_file
) $(srcdir)/config
/$(tmake_file
) \
605 cp config.status config.run
609 all.internal
: start.encap rest.encap
610 # This is what to compile if making a cross-compiler.
611 # Note that we can compile enquire using the cross-compiler just built,
612 # although we can't run it on this machine.
613 all.cross
: native gcc-cross specs stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) \
614 $(LIBGCC1_TEST
) $(EXTRA_PARTS
) lang.
all.cross
615 # This is what to compile if making gcc with a cross-compiler.
616 all.build
: native xgcc
$(EXTRA_PARTS
) lang.
all.build
617 # This is what must be made before installing GCC and converting libraries.
618 start.encap
: native xgcc specs
$(LIBGCC1
) xlimits.h lang.start.encap
619 # These can't be made until after GCC can run.
620 rest.encap
: stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) $(EXTRA_PARTS
) lang.rest.encap
621 # This is what is made with the host's compiler
622 # whether making a cross compiler or not.
623 native
: config.status
cpp $(LANGUAGES
) $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
625 # Define the names for selecting languages in LANGUAGES.
627 OBJC objc
: cc1obj objc-runtime
628 OBJECTIVE-C objective-c
: cc1obj objc-runtime
631 # Tell GNU make these are phony targets.
632 .PHONY
: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
634 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
635 # a target to build even if it is up-to-date. So we must verify that
636 # config.status does not exist before failing.
638 @if
[ ! -f config.status
] ; then \
639 echo You must configure gcc. Look at the INSTALL file for details.
; \
645 # On the target machine, finish building a cross compiler.
646 # This does the things that can't be done on the host machine.
647 rest.cross
: $(LIBGCC
) gfloat.h specs
649 # Verify that it works to compile and link libgcc1-test.
650 # If it does, then there are sufficient replacements for libgcc1.a.
651 libgcc1-test
: libgcc1-test.o native
$(GCC_PARTS
)
652 @echo
"Testing libgcc1. Ignore linker warning messages."
653 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) libgcc1-test.o
-o libgcc1-test \
654 -nostartfiles
-nostdlib
`$(GCC_FOR_TARGET) --print-libgcc-file-name`
655 libgcc1-test.o
: libgcc1-test.c native xgcc
656 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) -c
$(srcdir)/libgcc1-test.c
658 # Recompile all the language-independent object files.
659 # This is used only if the user explicitly asks for it.
660 compilations
: ${OBJS}
662 # Create a list of the language-independent object files so the language
663 # subdirectories needn't mention their names explicitly.
664 stamp-objlist
: Makefile
$(OBJS
) $(BC_OBJS
)
665 echo
" $(OBJS) $(BC_OBJS)" | sed
-e
's, \([a-z]\), ../\1,g' >stamp-objlist
667 # We call this executable `xgcc' rather than `gcc'
668 # to avoid confusion if the current directory is in the path
669 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
670 xgcc
: gcc.o version.o
$(LIBDEPS
)
671 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ gcc.o version.o
$(LIBS
)
673 # Dump a specs file to make -B./ read these specs over installed ones.
675 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
678 # We do want to create an executable named `xgcc', so we can use it to
680 # Also create gcc-cross, so that install-common will install properly.
682 cp xgcc
$(exeext
) gcc-cross
$(exeext
)
684 cc1
: $(P
) $(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
685 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
687 cc1obj
: $(P
) $(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
688 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
690 # Copy float.h from its source.
692 cp
$(FLOAT_H
) gfloat.h
694 # Create float.h source for the native machine.
696 -.
/enquire
-f
> tmp-float.h
697 mv tmp-float.h float.h-nat
699 # Create a dummy float.h source for a cross-compiler.
701 echo
"#error float.h values not known for cross-compiler" > t-float.h-cross
702 mv t-float.h-cross float.h-cross
704 # Used to compile enquire with standard cc, but have forgotten why.
705 # Let's try with GCC.
706 enquire
: enquire.o
$(GCC_PARTS
)
707 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o
$@
708 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
) stmp-int-hdrs
709 # Breaking this line caused a problem with one version of GNU make.
710 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) -I.
-c
$(srcdir)/enquire.c
712 # Build the version of limits.h that we will install.
713 xlimits.h
: glimits.h limitx.h limity.h
714 if
$(LIMITS_H_TEST
) ; then \
715 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
717 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
719 mv tmp-xlimits.h xlimits.h
722 # This is done in two parts because some functions, in libgcc1.c,
723 # must be compiled with something other than GCC,
724 # while the rest, in libgcc2.c, must be compiled with xgcc.
725 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
727 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
728 # LIBCONVERT should put its output in libgcc1.conv.
729 libgcc1.conv
: libgcc1.a
730 $(LIBCONVERT
) libgcc1.a libgcc1.conv
732 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
733 # Make an empty file instead.
734 libgcc1.null
: $(GCC_PASSES
)
735 echo
"__foo () {}" > dummy.c
736 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
737 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy
$(objext
)
738 rm -f dummy
$(objext
) dummy.c
740 # This is $(LIBGCC1) for a cross-compiler.
741 # We have no automatic way of building libgcc1.a,
742 # so it's up to the installer to find a way to do that.
743 # This rule deliberately does not depend on libgcc1.a
744 # so that it will fail if the installer hasn't provided it.
746 mv libgcc1.a libgcc1.cross ||
(echo You must find a way to make libgcc1.a
; false
)
748 # Compile the library of arithmetic subroutines with the native compiler.
749 # Don't compile it with GCC!
750 # (That would cause most arithmetic functions to call themselves.)
751 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
753 # Actually build it in tmplibgcc1.a, then rename at end,
754 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
755 # -e causes any failing command to make this rule fail.
756 # -e doesn't work in certain shells, so we test $$? as well.
757 # lynx has a broken ar, it always complains when the initial library is
758 # empty, thus this command works only if we don't do -e
759 # There is a trailing backslash (\) deleted from the following line.
761 for name in
$(LIB1FUNCS
); \
764 rm -f
$${name}$(objext
); \
765 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
766 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
767 mv libgcc1
$(objext
) $${name}$(objext
); \
768 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
769 rm -f
$${name}$(objext
); \
771 # Some shells crash when a loop has no items.
772 # So make sure there is always at least one--`..'.
774 # We don't use -e here because there are if statements
775 # that should not make the command give up when the if condition is false.
776 # Instead, we test for failure after each command where it matters.
777 for file in ..
$(LIB1FUNCS_EXTRA
); \
779 if
[ x
$${file} != x..
]; then \
780 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
782 if
[ $${name}.asm
= $${file} ]; then \
783 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
785 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
786 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
787 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
788 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
789 rm -f
$${name}.s
$${name}$(objext
); \
793 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc1.a
; else true
; fi
794 mv tmplibgcc1.a libgcc1.a
796 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
797 # functions. LIB1ASMSRC is the name of the source file in the config
799 libgcc1-asm.a
: libgcc2.ready config.status
$(srcdir)/config
/$(LIB1ASMSRC
)
800 -rm -f tmplibgcc1.a libgcc1.S
801 cp
$(srcdir)/config
/$(LIB1ASMSRC
) libgcc1.S
802 # Actually build it in tmplibgcc1.a, then rename at end,
803 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
804 # -e causes any failing command to make this rule fail.
805 # -e doesn't work in certain shells, so we test $$? as well.
806 # lynx has a broken ar, it always complains when the initial library is
807 # empty, thus this command works only if we don't do -e
808 # There is a trailing backslash (\) deleted from the following line.
810 for name in
$(LIB1ASMFUNCS
); \
813 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} libgcc1.S
; \
814 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
815 mv libgcc1
$(objext
) $${name}$(objext
); \
816 $(AR
) $(AR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
817 rm -f
$${name}$(objext
); \
820 mv tmplibgcc1.a libgcc1-asm.a
822 # Generate assembly versions of the functions required for libgcc1.
823 # You'll still need to massage the code by hand (possibly hacking
824 # underscores and local labels) but this will get you started.
825 libgcc1.S
: libgcc1.c
$(CONFIG_H
) config.status
828 for name in
$(LIB1FUNCS
); \
831 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -S
-DL
$${name} $(srcdir)/libgcc1.c
; \
832 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
833 echo
'#ifdef ' L
$${name} >> libgcc1.S
; \
834 cat libgcc1.s
>> libgcc1.S
; \
835 echo
'#endif /*' L
$${name} '*/' >> libgcc1.S
; \
836 echo
"" >> libgcc1.S
; \
839 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
840 # But recompiling cc1 should not force recompilation of libgcc2.a.
841 # If you want to force recompilation, delete libgcc2.a.
842 libgcc2.ready
: $(GCC_PASSES
) $(LIBGCC2_DEPS
) stmp-int-hdrs
843 -if
[ -f libgcc2.ready
] ; then \
846 touch libgcc2.ready
; \
849 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2FUNCS_EXTRA
) \
850 machmode.h longlong.h gbl-ctors.h config.status
851 # Actually build it in tmplibgcc2.a, then rename at end,
852 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
854 # -e causes any failing command to make this rule fail.
855 # -e doesn't work in certain shells, so we test $$? as well.
856 # lynx has a broken ar, it always complains when the initial library is
857 # empty, thus this command works only if we don't do -e
858 # There is a trailing backslash (\) deleted from the following line.
860 for name in
$(LIB2FUNCS
); \
863 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
864 $(srcdir)/libgcc2.c
-o
$${name}$(objext
); \
865 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
866 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}$(objext
); \
867 rm -f
$${name}$(objext
); \
869 # Some shells crash when a loop has no items.
870 # So make sure there is always at least one--`..'.
872 # We don't use -e here because there are if statements
873 # that should not make the command give up when the if condition is false.
874 # Instead, we test for failure after each command where it matters.
875 for file in ..
$(LIB2FUNCS_EXTRA
); \
877 if
[ x
$${file} != x..
]; then \
878 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
879 oname
=` echo $${name} | sed -e 's,.*/,,'`; \
881 if
[ $${name}.asm
= $${file} ]; then \
882 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
884 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
885 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
886 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${oname}$(objext
); \
887 rm -f
$${name}.s
$${oname}$(objext
); \
891 mv tmplibgcc2.a libgcc2.a
892 # These lines were deleted from above the mv command
893 # because ranlibing libgcc.a itself should suffice.
894 # -if [ x${HPUX_GAS} = x ] ; then \
895 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
898 # Combine the various libraries into a single library, libgcc.a.
899 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
900 -rm -rf tmplibgcc.a libgcc.a tmpcopy
902 -if
[ x
$(LIBGCC1
) != x
]; \
903 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
906 # Some versions of ar (specifically the one in RISC/os 5.x), create an
907 # unwritable table of contents file, and then print an error message when
908 # the second ar command tries to overwrite this file. To avoid the error
909 # message from ar, we make sure all files are writable.
910 -(cd tmpcopy
; chmod
+w
* > /dev
/null
2>&1)
911 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
912 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
914 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
915 # Actually build it in tmplibgcc.a, then rename at end,
916 # so that libgcc.a itself remains nonexistent if compilation is aborted.
917 mv tmplibgcc.a libgcc.a
919 # Use the genmultilib shell script to generate the information the gcc
920 # driver program needs to select the library directory based on the
922 multilib.h
: $(srcdir)/genmultilib Makefile
923 $(SHELL
) $(srcdir)/genmultilib
"$(MULTILIB_OPTIONS)" \
924 "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
926 # Build multiple copies of libgcc.a, one for each target switch.
927 stmp-multilib
: $(LIBGCC1
) libgcc2.c libgcc2.ready
$(CONFIG_H
) \
928 $(LIB2FUNCS_EXTRA
) machmode.h longlong.h gbl-ctors.h config.status
929 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
930 dir=`echo $$i | sed -e 's/;.*$$//'`; \
931 flags
=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
932 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
933 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
934 RANLIB
="$(RANLIB)" RANLIB_TEST
="$(RANLIB_TEST)" \
935 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
936 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS) $${flags}" \
937 LIBGCC1
="$(LIBGCC1)" LIBGCC2
="$(LIBGCC2)" \
938 dir="$${dir}" stmp-multilib-sub
; \
939 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
943 # Subroutine of stmp-multilib so make -n works.
945 rm -f
$(dir)/libgcc.a
$(LIBGCC2
)
946 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
947 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
948 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
949 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC2
)
950 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
952 else rm -f
$(LIBGCC1
); \
954 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
957 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
958 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
959 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
960 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC1
); \
962 rm -rf tmplibgcc.a tmpcopy
964 if
[ x
$(LIBGCC1
) != x
]; \
965 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
968 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
969 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*.o
)
970 rm -rf libgcc2.a tmpcopy
971 if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
972 if
[ -d
$(dir) ]; then true
; else mkdir
$(dir); fi
973 mv tmplibgcc.a
$(dir)/libgcc.a
975 objc-runtime
: libobjc.a
977 # Build the Objective C runtime library.
978 libobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
$(USE_COLLECT2
) $(EXTRA_PARTS
)
979 if
[ -d objc
]; then true
; else mkdir objc
; fi
981 srcdir1
=`cd $(srcdir); pwd`; \
983 $(MAKE
) -f
$${srcdir1}/objc
/Makefile libobjc.a \
984 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
985 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
986 GCC_CFLAGS
="$(GCC_CFLAGS)"
988 ln objc
/libobjc.a .
>/dev
/null
2>&1 || cp objc
/libobjc.a .
989 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) libobjc.a
; else true
; fi
991 # This is used by objc/Makefile if the user runs that directly.
992 sublibobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
994 srcdir1
=`cd $(srcdir); pwd`; \
996 $(MAKE
) -f
$$srcdir1/objc
/Makefile libobjc.a \
997 srcdir=$$srcdir1 tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
998 GCC_FOR_TARGET
="$$thisdir1/xgcc -B$$thisdir1/" \
999 GCC_CFLAGS
="$(GCC_CFLAGS)"
1001 # Compile two additional files that are linked with every program
1002 # linked using GCC on system V, for the sake of C++ constructors.
1003 crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1004 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1005 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
1006 -g0
-c
$(srcdir)/crtstuff.c
1007 mv crtstuff
$(objext
) $@
1009 crtend.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1010 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1011 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
1012 -g0
-c
$(srcdir)/crtstuff.c
1013 mv crtstuff
$(objext
) $@
1015 # Compiling object files from source files.
1017 # Note that dependencies on obstack.h are not written
1018 # because that file is not part of GCC.
1020 # C language specific files.
1022 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1023 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1024 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
1025 $(srcdir)/c-parse.h
: $(srcdir)/c-parse.c
1026 $(srcdir)/c-parse.c
: $(srcdir)/c-parse.y
1027 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
1028 $(srcdir)/c-parse.y
: c-parse.in
1029 sed
-e
"/^ifobjc$$/,/^end ifobjc$$/d" \
1030 -e
"/^ifc$$/d" -e
"/^end ifc$$/d" \
1031 $(srcdir)/c-parse.in
>tmp-c-parse.y
1032 $(srcdir)/move-if-change tmp-c-parse.y
$(srcdir)/c-parse.y
1034 $(srcdir)/c-gperf.h
: c-parse.gperf
1035 gperf
-p
-j1
-i
1 -g
-o
-t
-G
-N is_reserved_word
-k1
,3,$$ \
1036 $(srcdir)/c-parse.gperf
>tmp-gperf.h
1037 $(srcdir)/move-if-change tmp-gperf.h
$(srcdir)/c-gperf.h
1039 c-decl.o
: c-decl.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h output.h
1040 c-typeck.o
: c-typeck.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h output.h
1041 c-lang.o
: c-lang.c
$(CONFIG_H
) $(TREE_H
)
1042 c-lex.o
: c-lex.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h
$(srcdir)/c-parse.h \
1043 input.h flags.h
$(srcdir)/c-gperf.h c-pragma.h
1044 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
1045 c-convert.o
: c-convert.c
$(CONFIG_H
) $(TREE_H
) flags.h
1046 c-pragma.o
: c-pragma.c
$(CONFIG_H
) $(TREE_H
) c-pragma.h
1047 c-iterate.o
: c-iterate.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h flags.h
1049 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1052 ln collect2
$(exeext
) ld$(exeext
) > /dev
/null
2>&1 \
1053 || cp collect2
$(exeext
) ld$(exeext
)
1055 collect2
: collect2.o cplus-dem.o underscore.o version.o
$(LIBDEPS
)
1056 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1057 -rm -f collect2
$(exeext
)
1058 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ collect2.o \
1059 cplus-dem.o underscore.o version.o
$(LIBS
)
1061 collect2.o
: collect2.c
$(CONFIG_H
) gstab.h obstack.h demangle.h
1062 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1063 -DTARGET_MACHINE
=\"$(target
)\" $(MAYBE_USE_COLLECT2
) \
1064 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1066 cplus-dem.o
: cplus-dem.c demangle.h
1068 underscore.c
: $(GCC_PASSES
)
1069 echo
"int xxy_us_dummy;" >tmp-dum.c
1070 $(GCC_FOR_TARGET
) -S tmp-dum.c
1071 echo
'/*WARNING: This file is automatically generated!*/' >tmp-under.c
1072 if grep _xxy_us_dummy tmp-dum.s
> /dev
/null
; then \
1073 echo
"int prepends_underscore = 1;" >>tmp-under.c
; \
1075 echo
"int prepends_underscore = 0;" >>tmp-under.c
; \
1077 $(srcdir)/move-if-change tmp-under.c underscore.c
1078 -rm -f tmp-dum.c tmp-dum.s
1080 # Objective C language specific files.
1082 objc-parse.o
: $(srcdir)/objc-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1083 c-tree.h input.h flags.h objc-act.h
1084 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/objc-parse.c
1085 $(srcdir)/objc-parse.c
: $(srcdir)/objc-parse.y
1086 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) objc-parse.y
-o objc-parse.c
1087 $(srcdir)/objc-parse.y
: $(srcdir)/c-parse.in
1088 sed
-e
"/^ifc$$/,/^end ifc$$/d" \
1089 -e
"/^ifobjc$$/d" -e
"/^end ifobjc$$/d" \
1090 $(srcdir)/c-parse.in
>tmp-objc-prs.y
1091 $(srcdir)/move-if-change tmp-objc-prs.y
$(srcdir)/objc-parse.y
1093 objc-act.o
: objc-act.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h c-lex.h \
1094 flags.h objc-act.h input.h function.h
$(srcdir)/c-parse.h
1096 # A file used by all variants of C.
1098 c-common.o
: c-common.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
1100 # Language-independent files.
1102 gcc.o
: gcc.c
$(CONFIG_H
) multilib.h config.status
$(lang_specs_files
)
1103 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1104 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
1105 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
1106 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1107 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
1108 -DTOOLDIR_BASE_PREFIX
=\"$(exec_prefix)/\" \
1109 $(MAYBE_TARGET_DEFAULT
) \
1110 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1112 dumpvers
: dumpvers.c
1114 version.o
: version.c
1115 obstack.o
: obstack.c
1117 convert.o
: convert.c
$(CONFIG_H
) $(TREE_H
) flags.h convert.h
1119 tree.o
: tree.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1120 print-tree.o
: print-tree.c
$(CONFIG_H
) $(TREE_H
)
1121 stor-layout.o
: stor-layout.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1122 fold-const.o
: fold-const.c
$(CONFIG_H
) $(TREE_H
) flags.h
1123 toplev.o
: toplev.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) bytecode.h bc-emit.h \
1124 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1125 $(lang_options_files
)
1126 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1127 $(MAYBE_TARGET_DEFAULT
) $(MAYBE_USE_COLLECT2
) \
1128 -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1130 rtl.o
: rtl.c
$(CONFIG_H
) $(RTL_H
)
1132 print-rtl.o
: print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1133 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1135 varasm.o
: varasm.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h function.h \
1136 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1137 output.h bytecode.h c-pragma.h
1138 function.o
: function.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1139 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1140 recog.h output.h bytecode.h
1141 stmt.o
: stmt.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1142 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
1143 recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
1145 expr.o
: expr.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h regs.h \
1146 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1147 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1148 bc-emit.h modemap.def
1149 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
1151 expmed.o
: expmed.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1152 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1153 explow.o
: explow.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h hard-reg-set.h \
1154 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1155 optabs.o
: optabs.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1156 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1157 dbxout.o
: dbxout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h regs.h \
1158 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1159 sdbout.o
: sdbout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) gsyms.h flags.h \
1160 insn-config.h reload.h
1161 dwarfout.o
: dwarfout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) dwarf.h flags.h \
1162 insn-config.h reload.h output.h defaults.h
1163 xcoffout.o
: xcoffout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) xcoffout.h flags.h
1164 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1165 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1166 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1167 real.o
: real.c
$(CONFIG_H
) $(TREE_H
)
1168 getpwd.o
: getpwd.c
$(CONFIG_H
)
1170 integrate.o
: integrate.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h integrate.h \
1171 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
1174 jump.o
: jump.c
$(CONFIG_H
) $(RTL_H
) flags.h hard-reg-set.h regs.h \
1175 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1176 stupid.o
: stupid.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h
1178 cse.o
: cse.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h real.h \
1179 insn-config.h recog.h
1180 loop.o
: loop.c
$(CONFIG_H
) $(RTL_H
) flags.h loop.h insn-config.h \
1181 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1182 unroll.o
: unroll.c
$(CONFIG_H
) $(RTL_H
) insn-config.h insn-codes.h \
1183 integrate.h regs.h flags.h expr.h loop.h
1184 flow.o
: flow.c
$(CONFIG_H
) $(RTL_H
) flags.h insn-config.h \
1185 basic-block.h regs.h hard-reg-set.h output.h
1186 combine.o
: combine.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1187 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1188 basic-block.h recog.h real.h hard-reg-set.h
1189 regclass.o
: regclass.c
$(CONFIG_H
) $(RTL_H
) hard-reg-set.h flags.h \
1190 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1191 local-alloc.o
: local-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h basic-block.h \
1192 regs.h hard-reg-set.h insn-config.h recog.h output.h
1193 global.o
: global.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1194 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1196 reload.o
: reload.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1197 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1198 reload1.o
: reload1.c
$(CONFIG_H
) $(RTL_H
) flags.h expr.h \
1199 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1200 basic-block.h recog.h output.h
1201 caller-save.o
: caller-save.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1202 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
1203 reorg.o
: reorg.c
$(CONFIG_H
) $(RTL_H
) conditions.h hard-reg-set.h \
1204 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1206 sched.o
: sched.c
$(CONFIG_H
) $(RTL_H
) basic-block.h regs.h hard-reg-set.h \
1207 flags.h insn-config.h insn-attr.h
1208 final.o
: final.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h regs.h \
1209 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
1210 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1211 recog.o
: recog.c
$(CONFIG_H
) $(RTL_H
) \
1212 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1213 insn-flags.h insn-codes.h real.h
1214 reg-stack.o
: reg-stack.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) \
1215 regs.h hard-reg-set.h flags.h insn-config.h
1217 $(out_object_file
): $(out_file
) $(CONFIG_H
) \
1218 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1219 insn-flags.h output.h insn-attr.h insn-codes.h
1220 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(out_file
)
1222 # Build auxiliary files that support ecoff format.
1223 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1224 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tfile.o version.o
$(LIBS
)
1226 mips-tfile.o
: mips-tfile.c
$(CONFIG_H
) $(RTL_H
)
1228 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1229 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tdump.o version.o
$(LIBS
)
1231 mips-tdump.o
: mips-tdump.c
$(CONFIG_H
) $(RTL_H
)
1233 # Build file to support OSF/rose half-pic format.
1234 halfpic.o
: halfpic.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
)
1236 # Normally this target is not used; but it is used if you
1237 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1238 # from the GNU Emacs distribution.
1240 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
1241 -c
`echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1244 # Generate header and source files from the machine description,
1247 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
1248 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1249 insn-attr.h insn-attrtab.c
1251 # The following pair of rules has this effect:
1252 # genconfig is run only if the md has changed since genconfig was last run;
1253 # but the file insn-config.h is touched only when its contents actually change.
1255 # Each of the other insn-* files is handled by a similar pair of rules.
1257 # This causes an anomaly in the results of make -n
1258 # because insn-* is older than stamp-*
1259 # and thus make -n thinks that insn-* will be updated
1260 # and force recompilation of things that depend on it.
1261 # We use move-if-change precisely to avoid such recompilation.
1262 # But there is no way to teach make -n that it will be avoided.
1264 # Each of the insn-*.[ch] rules has a semicolon at the end,
1265 # for otherwise the system Make on SunOS 4.1 never tries
1266 # to recompile insn-*.o. To avoid problems and extra noise from
1267 # versions of make which don't like empty commands (nothing after the
1268 # trailing `;'), we call true for each.
1270 insn-config.h
: stamp-config
; @true
1271 stamp-config
: $(md_file
) genconfig
$(srcdir)/move-if-change
1272 .
/genconfig
$(md_file
) > tmp-config.h
1273 $(srcdir)/move-if-change tmp-config.h insn-config.h
1276 insn-flags.h
: stamp-flags
; @true
1277 stamp-flags
: $(md_file
) genflags
$(srcdir)/move-if-change
1278 .
/genflags
$(md_file
) > tmp-flags.h
1279 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1282 insn-codes.h
: stamp-codes
; @true
1283 stamp-codes
: $(md_file
) gencodes
$(srcdir)/move-if-change
1284 .
/gencodes
$(md_file
) > tmp-codes.h
1285 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1288 insn-emit.o
: insn-emit.c
$(CONFIG_H
) $(RTL_H
) expr.h real.h output.h \
1289 insn-config.h insn-flags.h insn-codes.h
1290 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
1292 insn-emit.c
: stamp-emit
; @true
1293 stamp-emit
: $(md_file
) genemit
$(srcdir)/move-if-change
1294 .
/genemit
$(md_file
) > tmp-emit.c
1295 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1298 insn-recog.o
: insn-recog.c
$(CONFIG_H
) $(RTL_H
) insn-config.h recog.h \
1299 real.h output.h flags.h
1300 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
1302 insn-recog.c
: stamp-recog
; @true
1303 stamp-recog
: $(md_file
) genrecog
$(srcdir)/move-if-change
1304 .
/genrecog
$(md_file
) > tmp-recog.c
1305 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1308 insn-opinit.o
: insn-opinit.c
$(CONFIG_H
) $(RTL_H
) insn-codes.h insn-flags.h \
1309 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1310 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-opinit.c
1312 insn-opinit.c
: stamp-opinit
; @true
1313 stamp-opinit
: $(md_file
) genopinit
$(srcdir)/move-if-change
1314 .
/genopinit
$(md_file
) > tmp-opinit.c
1315 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1318 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
1319 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
1321 insn-extract.c
: stamp-extract
; @true
1322 stamp-extract
: $(md_file
) genextract
$(srcdir)/move-if-change
1323 .
/genextract
$(md_file
) > tmp-extract.c
1324 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1327 insn-peep.o
: insn-peep.c
$(CONFIG_H
) $(RTL_H
) regs.h output.h real.h
1328 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
1330 insn-peep.c
: stamp-peep
; @true
1331 stamp-peep
: $(md_file
) genpeep
$(srcdir)/move-if-change
1332 .
/genpeep
$(md_file
) > tmp-peep.c
1333 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1336 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h output.h \
1337 insn-attr.h insn-config.h
1338 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
1340 insn-attr.h
: stamp-attr
; @true
1341 stamp-attr
: $(md_file
) genattr
$(srcdir)/move-if-change
1342 .
/genattr
$(md_file
) > tmp-attr.h
1343 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1346 insn-attrtab.c
: stamp-attrtab
; @true
1347 stamp-attrtab
: $(md_file
) genattrtab
$(srcdir)/move-if-change
1348 if cmp
-s
$(PREMADE_ATTRTAB_MD
) $(md_file
); \
1350 echo Using
$(PREMADE_ATTRTAB
); \
1351 cp
$(PREMADE_ATTRTAB
) tmp-attrtab.c
; \
1353 .
/genattrtab
$(md_file
) > tmp-attrtab.c
; \
1355 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1358 insn-output.o
: insn-output.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h conditions.h \
1359 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1361 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
1363 insn-output.c
: stamp-output
; @true
1364 stamp-output
: $(md_file
) genoutput
$(srcdir)/move-if-change
1365 .
/genoutput
$(md_file
) > tmp-output.c
1366 $(srcdir)/move-if-change tmp-output.c insn-output.c
1369 # Compile the programs that generate insn-* from the machine description.
1370 # They are compiled with $(HOST_CC), and associated libraries,
1371 # since they need to run on this machine
1372 # even if GCC is being compiled to run on some other machine.
1374 # $(CONFIG_H) is omitted from the deps of the gen*.o
1375 # because these programs don't really depend on anything
1376 # about the target machine. They do depend on config.h itself,
1377 # since that describes the host machine.
1379 # Pass the md file through cpp if the target requests it.
1380 $(MD_FILE
): $(MD_DEPS
)
1382 $(MD_CPP
) $(MD_CPPFLAGS
) $(md_file
) | sed
's/^# /; /g' > tmp-
$@
1385 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1386 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1387 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
1389 genconfig.o
: genconfig.c
$(RTL_H
) $(build_xm_file
)
1390 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
1392 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1393 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1394 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
1396 genflags.o
: genflags.c
$(RTL_H
) $(build_xm_file
)
1397 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
1399 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1400 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1401 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
1403 gencodes.o
: gencodes.c
$(RTL_H
) $(build_xm_file
)
1404 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
1406 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1407 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1408 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
1410 genemit.o
: genemit.c
$(RTL_H
) $(build_xm_file
)
1411 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
1413 genopinit
: genopinit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1414 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1415 genopinit.o
$(HOST_RTL
) $(HOST_LIBS
)
1417 genopinit.o
: genopinit.c
$(RTL_H
) $(build_xm_file
)
1418 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genopinit.c
1420 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1421 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1422 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
1424 genrecog.o
: genrecog.c
$(RTL_H
) $(build_xm_file
)
1425 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
1427 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1428 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1429 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
1431 genextract.o
: genextract.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1432 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
1434 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1435 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1436 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
1438 genpeep.o
: genpeep.c
$(RTL_H
) $(build_xm_file
)
1439 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
1441 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1442 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1443 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
1445 genattr.o
: genattr.c
$(RTL_H
) $(build_xm_file
)
1446 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1448 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1449 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1450 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1452 genattrtab.o
: genattrtab.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1453 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1455 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1456 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1457 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1459 genoutput.o
: genoutput.c
$(RTL_H
) $(build_xm_file
)
1460 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1462 # Compile the libraries to be used by gen*.
1463 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1464 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1465 # with the rules for rtl.o, alloca.o, etc.
1466 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1467 rm -f
$(HOST_PREFIX
)rtl.c
1468 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtl.c
> $(HOST_PREFIX
)rtl.c
1469 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1471 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1472 rm -f
$(HOST_PREFIX
)print-rtl.c
1473 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c
> $(HOST_PREFIX
)print-rtl.c
1474 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1476 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1477 rm -f
$(HOST_PREFIX
)rtlanal.c
1478 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c
> $(HOST_PREFIX
)rtlanal.c
1479 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1481 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1482 rm -f
$(HOST_PREFIX
)alloca.c
1483 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1484 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1486 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1487 rm -f
$(HOST_PREFIX
)obstack.c
1488 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/obstack.c
> $(HOST_PREFIX
)obstack.c
1489 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1491 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1492 rm -f
$(HOST_PREFIX
)malloc.c
1493 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/malloc.c
> $(HOST_PREFIX
)malloc.c
1494 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1496 # This satisfies the dependency that we get if you cross-compile a compiler
1497 # that does not need to compile alloca, malloc or whatever.
1499 touch
$(HOST_PREFIX_1
)
1501 # Remake bytecode files.
1502 BI_OBJ
=bi-parser.o bi-lexer.o bi-reverse.o
1504 bc-emit.o
: bc-emit.c
$(CONFIG_H
) $(RTL_H
) real.h
$(BYTECODE_H
) \
1505 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1506 bc-optab.o
: bc-optab.c
$(CONFIG_H
) $(REAL_H
) $(BYTECODE_H
) \
1507 bc-opcode.h bc-typecd.h bc-typecd.def
1509 bi-arity
: bi-arity.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1510 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1511 bi-arity.o
$(BI_OBJ
) $(HOST_LIBS
)
1512 bi-opcode
: bi-opcode.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1513 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1514 bi-opcode.o
$(BI_OBJ
) $(HOST_LIBS
)
1515 bi-opname
: bi-opname.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1516 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1517 bi-opname.o
$(BI_OBJ
) $(HOST_LIBS
)
1519 $(srcdir)/bi-parser.h
: $(srcdir)/bi-parser.c
1520 $(srcdir)/bi-parser.c
: $(srcdir)/bi-parser.y
1521 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d bi-parser.y
-o bi-parser.c
1523 bi-parser.o
: $(srcdir)/bi-parser.c bi-defs.h
$(build_xm_file
)
1524 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1525 $(srcdir)/bi-parser.c
1526 bi-lexer.o
: bi-lexer.c
$(srcdir)/bi-parser.h
$(build_xm_file
)
1527 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1528 $(srcdir)/bi-lexer.c
1529 bi-arity.o
: bi-arity.c bi-defs.h
$(build_xm_file
)
1530 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1531 $(srcdir)/bi-arity.c
1532 bi-opcode.o
: bi-opcode.c bi-defs.h
$(build_xm_file
)
1533 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1534 $(srcdir)/bi-opcode.c
1535 bi-opname.o
: bi-opname.c bi-defs.h
$(build_xm_file
)
1536 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1537 $(srcdir)/bi-opname.c
1538 bi-reverse.o
: bi-reverse.c bi-defs.h
1539 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1540 $(srcdir)/bi-reverse.c
1542 bc-arity.h
: stamp-bcarity
; @true
1543 stamp-bcarity
: $(srcdir)/bytecode.def bi-arity
$(srcdir)/move-if-change
1544 .
/bi-arity
< $(srcdir)/bytecode.def
>tmp-bc-arity.h
1545 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1548 bc-opcode.h
: stamp-bcopcode
; @true
1549 stamp-bcopcode
: $(srcdir)/bytecode.def bi-opcode
$(srcdir)/move-if-change
1550 .
/bi-opcode
< $(srcdir)/bytecode.def
>tmp-bcopcd.h
1551 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1552 touch stamp-bcopcode
1554 bc-opname.h
: stamp-bcopname
; @true
1555 stamp-bcopname
: $(srcdir)/bytecode.def bi-opname
$(srcdir)/move-if-change
1556 .
/bi-opname
< $(srcdir)/bytecode.def
>tmp-bcopnm.h
1557 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1558 touch stamp-bcopname
1560 bytecode.
mostlyclean:
1561 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1563 bytecode.
distclean bytecode.
clean: bytecode.
mostlyclean
1564 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1566 bytecode.maintainer-clean
: bytecode.
clean
1567 -rm -f bi-parser.c bi-parser.h
1570 # Remake cpp and protoize.
1572 # Making the preprocessor
1575 ln
$(CCCP
)$(exeext
) cpp$(exeext
) > /dev
/null
2>&1 \
1576 || cp
$(CCCP
)$(exeext
) cpp$(exeext
)
1577 cccp
: cccp.o cexp.o version.o
$(LIBDEPS
)
1578 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cccp.o cexp.o \
1580 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
)
1581 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1582 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1583 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1585 cccp.o
: cccp.c
$(CONFIG_H
) pcp.h version.c config.status
1586 # The reason we use $(libdir)/g++-include rather than using libsubdir
1587 # is for compatibility with the current version of libg++.
1588 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1589 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1590 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1591 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1592 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1593 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1594 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1596 cppmain
: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1597 version.o
$(LIBDEPS
)
1598 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cppmain.o cpplib.o cpphash.o \
1599 cppalloc.o cpperror.o cppexp.o version.o
$(LIBS
)
1601 cpplib.o
: cpplib.c
$(CONFIG_H
) cpplib.h cpphash.h config.status
1602 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1603 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1604 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1605 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1606 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1607 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1608 -c
`echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1610 cpperror.o
: cpperror.c
$(CONFIG_H
) cpplib.h
1612 cppexp.o
: cppexp.c
$(CONFIG_H
) cpplib.h
1614 cpphash.o
: cpphash.c cpplib.h cpphash.h
1616 # Note for the stamp targets, we run the program `true' instead of
1617 # having an empty command (nothing following the semicolon).
1619 proto
: config.status protoize unprotoize SYSCALLS.c.X
1621 protoize
: protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1622 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1623 protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1624 protoize.o
: stamp-proto
; @true
1626 unprotoize
: unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1627 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1628 unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1629 unprotoize.o
: stamp-proto
; @true
1631 stamp-proto
: protoize.c getopt.h
$(CONFIG_H
)
1632 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1633 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1634 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1635 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1636 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1637 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1638 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1639 -DUNPROTOIZE
$(srcdir)/protoize.c
1640 mv protoize
$(objext
) unprotoize
$(objext
)
1641 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1642 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1643 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1644 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1645 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1646 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1647 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1648 $(srcdir)/protoize.c
1651 getopt.o
: getopt.c getopt.h
1652 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1653 getopt1.o
: getopt1.c getopt.h
1654 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1656 # This info describes the target machine, so compile with GCC just built.
1657 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) \
1659 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1660 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1661 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1662 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
1663 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1666 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1667 -rm -f tmp-proto.
[cso
]
1668 cp
$(srcdir)/protoize.c tmp-proto.c
1669 chmod u
+w tmp-proto.c
1670 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1671 $(CFLAGS) $(INCLUDES) \
1672 -DGCC_INCLUDE_DIR=0 \
1673 -DGPLUSPLUS_INCLUDE_DIR=0 \
1674 -DCROSS_INCLUDE_DIR=0 \
1675 -DTOOL_INCLUDE_DIR=0 \
1676 -DSTD_PROTO_DIR=0" tmp-proto.c
1677 @echo
'**********' Expect
400 lines of differences.
1678 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
1679 -wc
-l tmp-proto.diff
1680 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1681 $(CFLAGS) $(INCLUDES) \
1682 -DGCC_INCLUDE_DIR=0 \
1683 -DGPLUSPLUS_INCLUDE_DIR=0 \
1684 -DCROSS_INCLUDE_DIR=0 \
1685 -DTOOL_INCLUDE_DIR=0 \
1686 -DSTD_PROTO_DIR=0" tmp-proto.c
1687 @echo Expect zero differences.
1688 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1689 -rm -f tmp-proto.
[cs
] tmp-proto
$(objext
)
1691 # Build the include directory. The stamp files are stmp-* rather than
1692 # stamp-* so that mostlyclean does not force the include directory to
1695 # Build the include directory except for float.h (which depends upon
1697 stmp-int-hdrs
: stmp-fixinc
$(USER_H
) xlimits.h objc-headers
1698 # Copy in the headers provided with gcc.
1699 # The sed command gets just the last file name component;
1700 # this is necessary because VPATH could add a dirname.
1701 # Using basename would be simpler, but some systems don't have it.
1704 for file in
$(USER_H
); do \
1705 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1706 rm -f
$$objdir/include/$$realfile; \
1707 cp ginclude
/$$realfile $$objdir/include; \
1708 chmod a
+r
$$objdir/include/$$realfile; \
1710 rm -f
include/limits.h
1711 cp xlimits.h
include/limits.h
1712 chmod a
+r
include/limits.h
1713 # Install the README
1714 rm -f
include/README
1715 cp
$(srcdir)/README-fixinc
include/README
1716 chmod a
+r
include/README
1719 # Build the complete include directory.
1720 stmp-headers
: stmp-int-hdrs gfloat.h
1721 rm -f
include/float.h
1722 cp gfloat.h
include/float.h
1723 chmod a
+r
include/float.h
1726 # Build fixed copies of system files.
1727 stmp-fixinc
: $(FIXINCLUDES
) gsyslimits.h
1730 if
[ x
$(FIXINCLUDES
) != xMakefile.in
]; \
1732 for
dir in
$(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
); do \
1735 $(SHELL
) $(srcdir)/$(FIXINCLUDES
) include $$dir; \
1740 rm -f
include/syslimits.h
1741 if
[ -f
include/limits.h
]; then \
1742 mv
include/limits.h
include/syslimits.h
; \
1744 cp
$(srcdir)/gsyslimits.h
include/syslimits.h
; \
1746 chmod a
+r
include/syslimits.h
1749 # copy objc header files into build directory
1750 objc-headers
: stmp-fixinc
1751 if
[ -d
include ]; then true
; else mkdir
include; fi
1752 if
[ -d objc
]; then true
; else mkdir objc
; fi
1754 srcdir1
=`cd $(srcdir); pwd`; \
1756 $(MAKE
) -f
$${srcdir1}/objc
/Makefile copy-headers \
1757 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1758 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
1759 GCC_CFLAGS
="$(GCC_CFLAGS)" incinstalldir
=$${thisdir1}/include
1762 # Files related to the fixproto script.
1764 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
1765 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1767 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
1768 mv tmp-deduced.h deduced.h
1770 gen-protos
: gen-protos.o scan.o cppalloc.o
$(HOST_LIBDEPS
)
1771 ${HOST_CC} $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1772 gen-protos.o scan.o cppalloc.o
$(HOST_LIBS
)
1774 gen-protos.o
: gen-protos.c scan.h
$(build_xm_file
)
1775 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gen-protos.c
1777 scan.o
: scan.c scan.h
$(build_xm_file
)
1778 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan.c
1780 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1781 cat deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
1782 mv tmp-fixtmp.c fixtmp.c
1783 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
1784 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
1785 | .
/gen-protos
>xsys-protos.hT
1786 mv xsys-protos.hT xsys-protos.h
1789 fix-header
: fix-header.o scan-decls.o scan.o xsys-protos.h
$(HOST_LIBDEPS
) \
1790 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1791 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ fix-header.o \
1792 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1793 cppexp.o
$(HOST_LIBS
)
1795 fix-header.o
: fix-header.c obstack.h scan.h xsys-protos.h
$(build_xm_file
)
1796 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/fix-header.c
1798 scan-decls.o
: scan-decls.c scan.h cpplib.h
$(build_xm_file
)
1799 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan-decls.c
1801 # stmp-fixproto depends on this, not on fix-header directly.
1802 # The idea is to make sure fix-header gets built,
1803 # but not rerun fixproto after each stage
1804 # just because fix-header's mtime has changed.
1805 fixhdr.ready
: fix-header
1806 -if
[ -f fixhdr.ready
] ; then \
1809 touch fixhdr.ready
; \
1812 # stmp-headers is to make sure fixincludes has already finished.
1813 # The if statement is so that we don't run fixproto a second time
1814 # if it has already been run on the files in `include'.
1815 stmp-fixproto
: fixhdr.ready fixproto stmp-headers
1816 @echo
"Various warnings and error messages from fixproto are normal"
1817 -if
[ -d
include ] ; then true
; else mkdir
include; fi
1818 -if
[ -f
include/fixed
] ; then true
; \
1820 : This line works around a
'make' bug in BSDI
1.1.
; \
1821 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
1822 $(SHELL
) ${srcdir}/fixproto
include include $(SYSTEM_HEADER_DIR
); \
1823 touch
include/fixed
; \
1827 # Remake the info files.
1830 info: $(srcdir)/cpp.
info $(srcdir)/gcc.
info lang.
info
1832 $(srcdir)/cpp.
info: cpp.texi
1833 cd
$(srcdir); $(MAKEINFO
) cpp.texi
1835 $(srcdir)/gcc.
info: gcc.texi extend.texi
install.texi invoke.texi \
1836 md.texi rtl.texi tm.texi
1837 cd
$(srcdir); $(MAKEINFO
) gcc.texi
1839 dvi: $(srcdir)/gcc.
dvi $(srcdir)/cpp.
dvi lang.
dvi
1841 # This works with GNU Make's default rule.
1842 $(srcdir)/gcc.
dvi: gcc.texi extend.texi
install.texi invoke.texi \
1843 md.texi rtl.texi tm.texi
1846 # This works with GNU Make's default rule.
1847 $(srcdir)/cpp.
dvi: cpp.texi
1850 $(srcdir)/INSTALL
: install1.texi
install.texi
1851 $(MAKEINFO
) -D INSTALLONLY
--no-header
--no-split \
1852 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
1854 # Deletion of files made during compilation.
1855 # There are four levels of this:
1856 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
1857 # `mostlyclean' is useful while working on a particular type of machine.
1858 # It deletes most, but not all, of the files made by compilation.
1859 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1860 # `clean' deletes everything made by running `make all'.
1861 # `distclean' also deletes the files made by config.
1862 # `maintainer-clean' also deletes everything that could be regenerated
1863 # automatically. We remove as much from the language subdirectories as we can
1864 # (less duplicated code).
1867 mostlyclean: bytecode.
mostlyclean lang.
mostlyclean
1868 -rm -f
$(STAGESTUFF
)
1869 # Clean the objc subdir if we created one.
1870 if
[ -d objc
]; then \
1871 srcdir1
=`cd $(srcdir); pwd`; \
1872 cd objc
; $(MAKE
) -f
$$srcdir1/objc
/Makefile
mostlyclean; \
1875 # Delete the temporary source copies for cross compilation.
1876 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
1877 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
1878 -rm -f
$(HOST_PREFIX_1
)obstack.c
1879 # Delete the temp files made in the course of building libgcc.a.
1880 -rm -f tmplibgcc
* tmpcopy xlimits.h
1881 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
1882 # Delete other temporary files.
1883 -rm -f tmp-float.h tmp-gcc.xtar.gz
1884 -rm -f tmp-foo1 tmp-foo2 tmp-proto.
* tmp-unproto
.1 tmp-SYSCALLS.s
1885 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
1886 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
1887 -rm -f tmp-fixtmp.c xsys-protos.hT
1888 # Delete the stamp files.
1889 -rm -f stamp-
* tmp-
*
1890 -rm -f
*/stamp-
* */tmp-
*
1891 # Delete debugging dump files.
1892 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
1893 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
1894 -rm -f
*/*.greg
*/*.lreg
*/*.combine
*/*.flow
*/*.cse
*/*.jump
*/*.rtl
1895 -rm -f
*/*.tree
*/*.loop
*/*.dbr
*/*.jump2
*/*.sched
*/*.cse2
1896 -rm -f
*/*.sched2
*/*.stack
1897 # Delete some files made during installation.
1898 -rm -f specs gfloat.h float.h-
* enquire SYSCALLS.c.X SYSCALLS.c
1899 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
1900 # Delete files generated for fixproto
1901 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
1902 gen-protos fixproto.list fixtmp.
* fixhdr.ready
1903 # Delete unwanted output files from TeX.
1904 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
1905 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
1906 # Delete sorted indices we don't actually use.
1907 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1908 # Delete core dumps.
1911 # Delete all files made by compilation
1912 # that don't exist in the distribution.
1913 clean: mostlyclean bytecode.
clean lang.
clean
1914 # It may not be quite desirable to delete unprotoize.c here,
1915 # but the spec for `make clean' requires it.
1916 # Using unprotoize.c is not quite right in the first place,
1917 # but what better way is there?
1918 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
1919 -rm -f libgcc1.null
$(LIB2FUNCS_EXTRA
)
1922 -if
[ -f md.pre-cpp
]; then \
1925 # Delete the include directory.
1926 -rm -rf stmp-
* include objc-headers
1928 # Delete files used by the "multilib" facility (including libgcc subdirs).
1929 -rm -f multilib.h tmpmultilib
*
1930 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
1931 rm -rf
$(MULTILIB_DIRNAMES
); \
1932 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
1933 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
1936 # Delete all files that users would normally create
1937 # while building and installing GCC.
1938 distclean: clean bytecode.
distclean lang.
distclean
1939 -rm -f tm.h config.h tconfig.h hconfig.h md
1940 -rm -f config.status config.run
1941 -rm -f Makefile specs.h options.h
*.oaux
1942 -rm -fr stage1 stage2 stage3 stage4
1943 -rm -f
*/stage1
*/stage2
*/stage3
*/stage4
*/include
1944 -rm -f objc-parse.output
1945 -rm -f c-parse.output
1948 # Delete anything likely to be found in the source directory
1949 # that shouldn't be in the distribution.
1950 extraclean
: distclean lang.extraclean
1951 -rm -rf
=* .
/"#"* *~
* config
/=* config
/"#"* config
/*~
*
1952 -rm -f patch
* *.orig
*.rej config
/patch
* config
/*.orig config
/*.rej
1953 -rm -f config
/*/=* config
/*/"#"* config
/*/*~
*
1954 -rm -f config
/*/*.orig config
/*/*.rej
1955 -rm -f
*.
dvi *.ps
*.oaux
*.d
*.
[zZ
] *.gz
1956 -rm -f
*.
tar *.xtar
*diff
*.diff.
* *.
tar.
* *.xtar.
* *diffs
1957 -rm -f
*lose config
/*lose config
/*/*lose
1958 -rm -f
*.s
*.s
[0-9] *.i install1.texi config
/ChangeLog
1959 -rm -f
*/=* */"#"* */*~
*
1960 -rm -f
*/patch
* */*.orig
*/*.rej
1961 -rm -f
*/*.
dvi */*.oaux
*/*.d
*/*.
[zZ
] */*.gz
1962 -rm -f
*/*.
tar */*.xtar
*/*diff
*/*.diff.
* */*.
tar.
* */*.xtar.
* */*diffs
1963 -rm -f
*/*lose
*/*.s
*/*.s
[0-9] */*.i
1965 # Get rid of every file that's generated from some other file.
1966 # Most of these files ARE PRESENT in the GCC distribution.
1967 maintainer-clean
: distclean bytecode.maintainer-clean lang.maintainer-clean
1968 -rm -f c-parse.y c-gperf.h objc-parse.y
1969 -rm -f objc-parse.c objc-parse.output
1970 -rm -f c-parse.c c-parse.h c-parse.output
1971 -rm -f cexp.c cexp.output TAGS
1972 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
1973 -rm -f gcc.
info* gcc.??s gcc.
*aux
1975 # Entry points `install' and `uninstall'.
1976 # Also use `install-collect2' to install collect2 when the config files don't.
1978 # The semicolon is to prevent the install.sh -> install default rule
1979 # from doing anything. Having it run true helps avoid problems and
1980 # noise from versions of make which don't like to have null commands.
1981 install: $(INSTALL_TARGET
) ; @true
1983 # Copy the compiler files into directories where they will be run.
1984 # Install the driver last so that the window when things are
1986 install-normal
: install-common
$(INSTALL_HEADERS
) $(INSTALL_LIBGCC
) \
1987 install-libobjc install-man install-info lang.install-normal install-driver
1989 # Do nothing while making gcc with a cross-compiler. The person who
1990 # makes gcc for the target machine has to know how to put a complete
1991 # gcc together by hand.
1992 install-build
: force
1993 @echo You have to
install gcc on your target machine by hand.
1995 # Run this on the target machine
1996 # to finish installation of cross compiler.
1997 install-cross-rest
: install-float-h-cross
1999 # Install float.h for cross compiler.
2000 # Run this on the target machine!
2001 install-float-h-cross
: install-dir
2002 # if [ -f enquire ] ; then true; else false; fi
2003 # Note: don't use -. We should fail right away if enquire was not made.
2004 .
/enquire
-f
> $(tmpdir
)/float.h
2005 -rm -f
$(libsubdir
)/include/float.h
2006 $(INSTALL_DATA
) $(tmpdir
)/float.h
$(libsubdir
)/include/float.h
2007 -rm -f
$(tmpdir
)/float.h
2008 chmod a-x
$(libsubdir
)/include/float.h
2010 # Create the installation directory.
2012 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; chmod a
+rx
$(libdir) ; fi
2013 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; chmod a
+rx
$(libdir)/gcc-lib
; fi
2014 # This dir isn't currently searched by cpp.
2015 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2016 -if
[ -d
$(libdir)/gcc-lib
/$(target
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
) ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
) ; fi
2017 -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
2018 -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
2019 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; chmod a
+rx
$(bindir) ; fi
2020 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; chmod a
+rx
$(includedir) ; fi
2021 -if
[ -d
$(tooldir
) ] ; then true
; else mkdir
$(tooldir
) ; chmod a
+rx
$(tooldir
) ; fi
2022 -if
[ -d
$(assertdir
) ] ; then true
; else mkdir
$(assertdir
) ; chmod a
+rx
$(assertdir
) ; fi
2023 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; chmod a
+rx
$(infodir) ; fi
2024 # We don't use mkdir -p to create the parents of mandir,
2025 # because some systems don't support it.
2026 # Instead, we use this technique to create the immediate parent of mandir.
2027 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2028 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; chmod a
+rx
$$parent ; fi
2029 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; chmod a
+rx
$(mandir) ; fi
2031 # Install the compiler executables built during cross compilation.
2032 install-common
: native install-dir
$(EXTRA_PARTS
) lang.install-common
2033 for file in
$(COMPILERS
); do \
2034 if
[ -f
$$file ] ; then \
2035 rm -f
$(libsubdir
)/$$file; \
2036 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2040 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
2041 if
[ x
"$$file" != x..
]; then \
2042 rm -f
$(libsubdir
)/$$file; \
2043 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2046 for file in
$(EXTRA_PARTS
) ..
; do \
2047 if
[ x
"$$file" != x..
]; then \
2048 rm -f
$(libsubdir
)/$$file; \
2049 $(INSTALL_DATA
) $$file $(libsubdir
)/$$file; \
2052 # Don't mess with specs if it doesn't exist yet.
2053 -if
[ -f specs
] ; then \
2054 rm -f
$(libsubdir
)/specs
; \
2055 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
; \
2057 # Install protoize if it was compiled.
2058 -if
[ -f protoize
$(exeext
) ]; \
2060 rm -f
$(bindir)/protoize
$(exeext
); \
2061 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(bindir)/protoize
$(exeext
); \
2062 rm -f
$(bindir)/unprotoize
$(exeext
); \
2063 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(bindir)/unprotoize
$(exeext
); \
2064 rm -f
$(libsubdir
)/SYSCALLS.c.X
; \
2065 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
; \
2066 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
; \
2068 -rm -f
$(libsubdir
)/cpp$(exeext
)
2069 $(INSTALL_PROGRAM
) cpp$(exeext
) $(libsubdir
)/cpp$(exeext
)
2071 # Install the driver program as $(target)-gcc
2072 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2073 install-driver
: xgcc
2074 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2075 rm -f
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2076 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2077 if
[ -d
$(tooldir
)/bin
/.
] ; then \
2078 rm -f
$(tooldir
)/bin
/gcc
$(exeext
); \
2079 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(tooldir
)/bin
/gcc
$(exeext
); \
2082 rm -f
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2083 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2084 rm -f
$(bindir)/$(target
)-gcc-1
$(exeext
); \
2085 ln
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
) \
2087 || cp
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
); \
2088 mv
$(bindir)/$(target
)-gcc-1
$(exeext
) $(bindir)/$(target
)-gcc
$(exeext
); \
2091 # Install the info files.
2092 install-info
: doc install-dir lang.install-info
2093 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2094 cd
$(srcdir); for f in
cpp.
info* gcc.
info*; \
2095 do
$(INSTALL_DATA
) $$f $(infodir)/$$f; done
2096 -chmod a-x
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2098 # Install the man pages.
2099 install-man
: install-dir
$(srcdir)/gcc
.1 $(srcdir)/cccp
.1 lang.install-man
2100 -if
[ -f gcc-cross
] ; then \
2101 rm -f
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2102 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2103 chmod a-x
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2105 rm -f
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2106 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2107 chmod a-x
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2109 -rm -f
$(mandir)/cccp
$(manext)
2110 -$(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
2111 -chmod a-x
$(mandir)/cccp
$(manext)
2113 # Install the library.
2114 install-libgcc
: libgcc.a install-dir
2115 -if
[ -f libgcc.a
] ; then \
2116 rm -f
$(libsubdir
)/libgcc.a
; \
2117 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
2118 if
$(RANLIB_TEST
) ; then \
2119 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
2120 chmod a-x
$(libsubdir
)/libgcc.a
; \
2123 # Install multiple versions of libgcc.a.
2124 install-multilib
: stmp-multilib install-dir
2125 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
2126 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2127 if
[ -d
$(libsubdir
)/$${dir} ]; then true
; else mkdir
$(libsubdir
)/$${dir}; fi
; \
2128 rm -f
$(libsubdir
)/$${dir}/libgcc.a
; \
2129 $(INSTALL_DATA
) $${dir}/libgcc.a
$(libsubdir
)/$${dir}/libgcc.a
; \
2130 if
$(RANLIB_TEST
); then \
2131 (cd
$(libsubdir
)/$${dir}; $(RANLIB
) libgcc.a
); else true
; fi
; \
2132 chmod a-x
$(libsubdir
)/$${dir}/libgcc.a
; \
2135 # Install the objc run time library.
2136 install-libobjc
: install-dir
2137 -if
[ -f libobjc.a
] ; then \
2138 rm -f
$(libsubdir
)/libobjc.a
; \
2139 $(INSTALL_DATA
) libobjc.a
$(libsubdir
)/libobjc.a
; \
2140 if
$(RANLIB_TEST
) ; then \
2141 (cd
$(libsubdir
); $(RANLIB
) libobjc.a
); else true
; fi
; \
2142 chmod a-x
$(libsubdir
)/libobjc.a
; \
2145 # Install all the header files built in the include subdirectory.
2146 install-headers
: install-include-dir
$(INSTALL_HEADERS_DIR
) install-assert-h
2147 # Fix symlinks to absolute paths in the installed include directory to
2148 # point to the installed directory, not the build directory.
2149 -files
=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2150 if
[ $$?
-eq
0 ]; then \
2151 dir=`cd include; pwd`; \
2152 for i in
$$files; do \
2153 dest
=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2154 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2155 rm -f
$(libsubdir
)/include/$$i; \
2156 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir
)/include/$$i; \
2161 # Create or recreate the gcc private include file directory.
2162 install-include-dir
: install-dir
2163 -rm -rf
$(libsubdir
)/include
2164 mkdir
$(libsubdir
)/include
2165 -chmod a
+rx
$(libsubdir
)/include
2167 # Install the include directory using tar.
2168 install-headers-tar
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2170 tar -cf
- .
; exit
0) |
(cd
$(libsubdir
)/include; tar $(TAROUTOPTS
) - )
2171 # /bin/sh on some systems returns the status of the first tar,
2172 # and that can lose with GNU tar which always writes a full block.
2173 # So use `exit 0' to ignore its exit status.
2175 # Install the include directory using cpio.
2176 install-headers-cpio
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2177 (cd
include; find .
-print) |
(cd
include; cpio
-pdum
$(libsubdir
)/include)
2179 # Put assert.h where it won't override GNU libc's assert.h.
2180 # It goes in a dir that is searched after GNU libc's headers;
2181 # thus, the following conditionals are no longer needed.
2182 # But it's not worth deleting them now.
2183 ## Don't replace the assert.h already there if it is not from GCC.
2184 ## This code would be simpler if it tested for -f ... && ! grep ...
2185 ## but supposedly the ! operator is missing in sh on some systems.
2186 install-assert-h
: assert.h install-dir
2187 if
[ -f
$(assertdir
)/assert.h
]; \
2189 if grep
"__eprintf" $(assertdir
)/assert.h
>/dev
/null
; \
2191 rm -f
$(assertdir
)/assert.h
; \
2192 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2193 chmod a-x
$(assertdir
)/assert.h
; \
2197 rm -f
$(assertdir
)/assert.h
; \
2198 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2199 chmod a-x
$(assertdir
)/assert.h
; \
2202 # Use this target to install the program `collect2' under the name `ld'.
2203 install-collect2
: collect2 install-dir
2204 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(libsubdir
)/ld$(exeext
)
2205 # Install the driver program as $(libsubdir)/gcc for collect2.
2206 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(libsubdir
)/gcc
$(exeext
)
2208 # Cancel installation by deleting the installed files.
2209 uninstall: lang.
uninstall
2210 -rm -rf
$(libsubdir
)
2211 -rm -rf
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2212 -rm -rf
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
)
2213 -rm -rf
$(bindir)/protoize
$(exeext
)
2214 -rm -rf
$(bindir)/unprotoize
$(exeext
)
2215 -rm -rf
$(mandir)/$(GCC_INSTALL_NAME
)$(manext)
2216 -rm -rf
$(mandir)/$(GCC_CROSS_NAME
)$(manext)
2217 -rm -rf
$(mandir)/cccp
$(manext)
2218 -rm -rf
$(mandir)/protoize
$(manext)
2219 -rm -rf
$(mandir)/unprotoize
$(manext)
2221 # These exist for maintenance purposes.
2223 # Update the tags table.
2227 mv
-f c-parse.
[ch
] objc-parse.c cexp.c
=*.
[chy
] temp
; \
2228 etags
*.y
*.h
*.c
; \
2232 # Create the distribution tar file.
2233 #dist: gcc-$(version).tar.gz
2236 gcc.xtar.gz
: gcc.xtar
2237 gzip
--best
< gcc.xtar
> tmp-gcc.xtar.gz
2238 mv tmp-gcc.xtar.gz gcc.xtar.gz
2240 #gcc-$(version).tar.gz: gcc-$(version).tar
2241 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2243 #gcc-$(version).tar:
2245 # Make the distribution.
2246 tar -chf gcc.xtar gcc-
$(version
)
2248 # This target exists to do the initial work before the language specific
2250 distdir-start
: doc
$(srcdir)/INSTALL
$(srcdir)/c-parse.y
$(srcdir)/c-gperf.h \
2251 $(srcdir)/objc-parse.y
$(srcdir)/c-parse.c
$(srcdir)/objc-parse.c \
2253 @if grep
-s
"for version ${mainversion}" gcc.texi
> /dev
/null
; \
2255 else echo
"You must update the version number in \`gcc.texi'"; sleep
10;\
2257 # Update the version number in README
2258 awk
'$$1 " " $$2 " " $$3 == "This directory contains" \
2259 { $$6 = version; print $$0 } \
2260 $$1 " " $$2 " " $$3 != "This directory contains"' \
2261 version
=$(version
) README
> tmp.README
2262 mv tmp.README README
2263 -rm -rf gcc-
$(version
) tmp
2264 # Put all the files in a temporary subdirectory
2265 # which has the name that we want to have in the tar file.
2270 for file in
*[0-9a-zA-Z
+]; do \
2271 ln
$$file tmp
> /dev
/null
2>&1 || cp
$$file tmp
; \
2274 for file in
*[0-9a-zA-Z
+]; do \
2275 if
test -d
$$file && test "$$file" != RCS
; then \
2276 mkdir ..
/tmp
/config
/$$file; \
2278 for subfile in
*[0-9a-zA-Z
+]; do \
2279 ln
$$subfile ..
/..
/tmp
/config
/$$file >/dev
/null
2>&1 \
2280 || cp
$$subfile ..
/..
/tmp
/config
/$$file; \
2284 ln
$$file ..
/tmp
/config
>/dev
/null
2>&1 \
2285 || cp
$$file ..
/tmp
/config
; \
2289 for file in
*[0-9a-zA-Z
+]; do \
2290 ln
$$file ..
/tmp
/ginclude
>/dev
/null
2>&1 \
2291 || cp
$$file ..
/tmp
/ginclude
; \
2294 for file in
*[0-9a-zA-Z
+]; do \
2295 ln
$$file ..
/tmp
/objc
>/dev
/null
2>&1 || cp
$$file ..
/tmp
/objc
; \
2299 # Finish making `distdir', after the languages have done their thing.
2301 mv tmp gcc-
$(version
)
2302 # Get rid of everything we don't want in the distribution. We'd want
2303 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2305 cd gcc-
$(version
); make extraclean
2307 distdir
: distdir-start lang.distdir distdir-finish
2309 # make diff oldversion=M.N
2310 # creates a diff file between an older distribution and this one.
2311 # The -P option assumes this is GNU diff.
2313 diff
-rc2P
-x c-parse.y
-x c-parse.c
-x c-parse.h
-x c-gperf.h \
2314 -x cexp.c
-x bi-parser.c
-x objc-parse.y
-x objc-parse.c \
2316 -x
"gcc.??" -x
"gcc.??s" -x gcc.aux
-x
"gcc.info*" \
2317 -x
"cpp.??" -x
"cpp.??s" -x
cpp.aux
-x
"cpp.info*" \
2318 $(LANG_DIFF_EXCLUDES
) \
2319 gcc-
$(oldversion
) gcc-
$(version
) > diffs
2322 # Only build the C compiler for stage1, because that is the only one that
2323 # we can guarantee will build with the native compiler, and also it is the
2324 # only thing useful for building stage2.
2325 $(MAKE
) CC
="$(CC)" libdir=$(libdir) LANGUAGES
=c
2327 # This used to define ALLOCA as empty, but that would lead to bad results
2328 # for a subsequent `make install' since that would not have ALLOCA empty.
2329 # To prevent `make install' from compiling alloca.o and then relinking cc1
2330 # because alloca.o is newer, we permit these recursive makes to compile
2331 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2332 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2334 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2337 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2339 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2342 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2344 # Compare the object files in the current directory with those in the
2347 # ./ avoids bug in some versions of tail.
2349 for file in
*$(objext
); do \
2350 tail
+16c .
/$$file > tmp-foo1
; \
2351 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2352 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2354 for
dir in tmp-foo
$(SUBDIRS
); do \
2355 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2356 for file in
$$dir/*$(objext
); do \
2357 tail
+16c .
/$$file > tmp-foo1
; \
2358 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2359 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2365 # Similar, but compare with stage3 directory
2367 for file in
*$(objext
); do \
2368 tail
+16c .
/$$file > tmp-foo1
; \
2369 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2370 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2372 for
dir in tmp-foo
$(SUBDIRS
); do \
2373 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2374 for file in
$$dir/*$(objext
); do \
2375 tail
+16c .
/$$file > tmp-foo1
; \
2376 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2377 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
); \
2383 # Compare the object files in the current directory with those in the
2384 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2385 # running tail and the overhead of twice copying each object file.
2388 for file in
*$(objext
); do \
2389 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2391 for
dir in tmp-foo
$(SUBDIRS
); do \
2392 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2393 for file in
$$dir/*.o
; do \
2394 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2399 # Similar, but compare with stage3 directory
2401 for file in
*$(objext
); do \
2402 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2404 for
dir in tmp-foo
$(SUBDIRS
); do \
2405 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2406 for file in
$$dir/*$(objext
); do \
2407 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2412 # Copy the object files from a particular stage into a subdirectory.
2414 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2415 -for
dir in .
$(SUBDIRS
) ; \
2417 if
[ -d stage1
/$$dir ] ; then true
; else mkdir stage1
/$$dir ; fi
; \
2419 -mv
$(STAGESTUFF
) stage1
2420 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2421 # dir will work properly.
2422 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage1 || cp
as$(exeext
) stage1
; else true
; fi
2423 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage1 || cp
ld$(exeext
) stage1
; else true
; fi
2424 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage1 || cp collect-ld
$(exeext
) stage1
; else true
; fi
2425 -rm -f stage1
/libgcc.a
2427 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
2428 stage1
: force stage1-start lang.stage1
2431 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2432 -for
dir in .
$(SUBDIRS
) ; \
2434 if
[ -d stage2
/$$dir ] ; then true
; else mkdir stage2
/$$dir ; fi
; \
2436 -mv
$(STAGESTUFF
) stage2
2437 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2438 # dir will work properly.
2439 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage2 || cp
as$(exeext
) stage2
; else true
; fi
2440 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage2 || cp
ld$(exeext
) stage2
; else true
; fi
2441 -if
[ -f collect-ld
] ; then ln
-s ..
/collect-ld
$(exeext
) stage2 || cp collect-ld
$(exeext
) stage2
; else true
; fi
2442 -rm -f stage2
/libgcc.a
2444 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
2445 stage2
: force stage2-start lang.stage2
2448 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2449 -for
dir in .
$(SUBDIRS
) ; \
2451 if
[ -d stage3
/$$dir ] ; then true
; else mkdir stage3
/$$dir ; fi
; \
2453 -mv
$(STAGESTUFF
) stage3
2454 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2455 # dir will work properly.
2456 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage3 || cp
as$(exeext
) stage3
; else true
; fi
2457 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage3 || cp
ld$(exeext
) stage3
; else true
; fi
2458 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage3 || cp collect-ld
$(exeext
) stage3
; else true
; fi
2459 -rm -f stage3
/libgcc.a
2461 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
2462 stage3
: force stage3-start lang.stage3
2465 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2466 -for
dir in .
$(SUBDIRS
) ; \
2468 if
[ -d stage4
/$$dir ] ; then true
; else mkdir stage4
/$$dir ; fi
; \
2470 -mv
$(STAGESTUFF
) stage4
2471 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2472 # dir will work properly.
2473 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage4 || cp
as$(exeext
) stage4
; else true
; fi
2474 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage4 || cp
ld$(exeext
) stage4
; else true
; fi
2475 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage4 || cp collect-ld
$(exeext
) stage4
; else true
; fi
2476 -rm -f stage4
/libgcc.a
2478 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
2479 stage4
: force stage4-start lang.stage4
2481 # Copy just the executable files from a particular stage into a subdirectory,
2482 # and delete the object files. Use this if you're just verifying a version
2483 # that is pretty sure to work, and you are short of disk space.
2484 risky-stage1
: stage1
2487 risky-stage2
: stage2
2490 risky-stage3
: stage3
2493 risky-stage4
: stage4
2496 #In GNU Make, ignore whether `stage*' exists.
2497 .PHONY
: stage1 stage2 stage3 stage4
clean maintainer-clean TAGS bootstrap
2498 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4