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 # Header files that are made available under the same name
106 # to programs compiled with GCC.
107 USER_H
= $(srcdir)/ginclude
/stdarg.h
$(srcdir)/ginclude
/stddef.h \
108 $(srcdir)/ginclude
/varargs.h
$(srcdir)/ginclude
/va-alpha.h \
109 $(srcdir)/ginclude
/va-h8300.h
$(srcdir)/ginclude
/va-i860.h \
110 $(srcdir)/ginclude
/va-i960.h
$(srcdir)/ginclude
/va-mips.h \
111 $(srcdir)/ginclude
/va-m88k.h
$(srcdir)/ginclude
/va-pa.h \
112 $(srcdir)/ginclude
/va-pyr.h
$(srcdir)/ginclude
/va-sparc.h \
113 $(srcdir)/ginclude
/va-clipper.h
$(srcdir)/ginclude
/va-spur.h \
114 $(srcdir)/ginclude
/iso646.h
$(srcdir)/ginclude
/va-ppc.h \
115 $(srcdir)/ginclude
/proto.h
$(EXTRA_HEADERS
)
117 # Target to use whe installing assert.h. Some systems may
118 # want to set this empty.
119 INSTALL_ASSERT_H
= install-assert-h
121 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
122 # Usually the one we just built.
123 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
124 GCC_FOR_TARGET
= .
/xgcc
-B.
/
126 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
127 # It omits XCFLAGS, and specifies -B./.
128 # It also specifies -I./include to find, e.g., stddef.h.
129 GCC_CFLAGS
=$(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) -I.
/include
131 # Special flags for compiling enquire.
132 # We disable optimization to make floating point more reliable.
133 ENQUIRE_CFLAGS
= -DNO_MEM
-DNO_LONG_DOUBLE_IO
-O0
134 ENQUIRE_LDFLAGS
= $(LDFLAGS
)
136 # Sed command to transform gcc to installed name. Overwritten by configure.
137 program_transform_name
= -e s
,x
,x
,
138 program_transform_cross_name
= -e s
,^
,$(target
)-,
140 # Tools to use when building a cross-compiler.
141 # These are used because `configure' appends `cross-make'
142 # to the makefile when making a cross-compiler.
144 TARGET_TOOLPREFIX
= $(tooldir
)/bin
/
145 AR_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ar
146 AR_FOR_TARGET_FLAGS
= rc
147 RANLIB_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ranlib
148 RANLIB_TEST_FOR_TARGET
= [ -f
$(TARGET_TOOLPREFIX
)ranlib
]
150 # Dir to search for system headers. Overridden by cross-make.
151 SYSTEM_HEADER_DIR
= /usr
/include
153 # Control whether to run fixproto.
154 STMP_FIXPROTO
= stmp-fixproto
156 # Test to see whether <limits.h> exists in the system header files.
157 LIMITS_H_TEST
= [ -f
$(SYSTEM_HEADER_DIR
)/limits.h
]
159 # There may be a premade insn-attrtab.c for this machine.
160 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
161 # PREMADE_ATTRTAB is the file name of the file to use.
162 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
163 PREMADE_ATTRTAB_MD
= Makefile
# Guaranteed not to cmp equal to md.
166 target
= ...
`configure' substitutes actual target name here.
167 xmake_file= ... `configure
' substitutes actual x- file name here.
168 tmake_file= ... `configure' substitutes actual t- file name here.
169 out_file
= ...
`configure' substitutes actual out file name here.
170 out_object_file= ... `configure
' substitutes actual out object file name here.
171 md_file= ... `configure' substitutes actual md file name here.
172 tm_file
= ...
`configure' substitutes actual tm file name here.
173 build_xm_file= ... `configure
' substitutes actual build xm- file name here.
174 host_xm_file= ... `configure' substitutes actual host xm- file name here.
175 lang_specs_files
= ...
`configure' substitutes actual lang spec file names here.
176 lang_options_files= ... `configure
' puts actual lang options file names here.
177 version=`sed -e 's
/.
*\"\
([^
\"]*\
)[ \"].
*/\
1/' < $(srcdir)/version.c`
178 mainversion=`sed -e 's
/.
*\"\
([0-9]*\.
[0-9]*\
).
*/\
1/' < $(srcdir)/version.c`
180 # Directory where sources are, from where we are.
182 # Common prefix for installation directories.
183 # NOTE: This directory must exist when you start installation.
185 # Directory in which to put localized header files. On the systems with
186 # gcc as the native cc, `local_prefix' may not be
`prefix' which is
188 # NOTE: local_prefix *should not* default from prefix.
189 local_prefix = /usr/local
190 # Directory in which to put host dependent programs and libraries
191 exec_prefix = $(prefix)
192 # Directory in which to put the executable for the command `gcc'
193 bindir = $(exec_prefix)/bin
194 # Directory in which to put the directories used by the compiler.
195 libdir = $(exec_prefix)/lib
196 # Directory in which the compiler finds executables, libraries, etc.
197 libsubdir
= $(libdir)/gcc-lib
/$(target
)/$(version
)
198 # Directory in which the compiler finds g++ includes.
199 gxx_include_dir
= $(libdir)/g
++-include
200 # Directory to search for site-specific includes.
201 includedir = $(local_prefix
)/include
202 # assertdir is overridden in cross-make.
203 # (But this currently agrees with what is in cross-make.)
204 assertdir
= $(tooldir
)/include
205 # where the info files go
206 infodir = $(prefix)/info
207 # Extension (if any) to put in installed man-page filename.
212 # Directory in which to put man pages.
213 mandir = $(prefix)/man
/man1
214 # Directory in which to find other cross-compilation tools and headers.
215 # Used in install-cross.
216 tooldir
= $(exec_prefix)/$(target
)
217 # Dir for temp files.
220 # Additional system libraries to link with.
223 # Change this to a null string if obstacks are installed in the
227 # Specify the rule for actually making libgcc.a,
229 # and the rule for installing it.
230 INSTALL_LIBGCC
= install-libgcc
232 # Specify the rule for actually making libgcc1.a.
233 # The value may be empty; that means to do absolutely nothing
234 # with or for libgcc1.a.
237 # Specify the rule for making libgcc1.a for a cross-compiler.
238 # The default rule assumes that libgcc1.a is supplied by the user.
239 CROSS_LIBGCC1
= libgcc1.cross
241 # Specify the rule for actually making libgcc2.a.
244 # Options to use when compiling libgcc2.a.
245 # -g1 causes output of debug info only for file-scope entities.
246 # we use this here because that should be enough, and also
247 # so that -g1 will be tested.
248 LIBGCC2_CFLAGS
= -O2
$(LIBGCC2_INCLUDES
) $(GCC_CFLAGS
) $(TARGET_LIBGCC2_CFLAGS
) -g1
250 # Additional options to use when compiling libgcc2.a.
251 # Some targets override this to -Iinclude
254 # Additional target-dependent options for compiling libgcc2.a.
255 TARGET_LIBGCC2_CFLAGS
=
257 # Things which must be built before building libgcc2.a.
258 # Some targets override this to stmp-int-hdrs
261 # Enquire target (This is a variable so that a target can choose not to
265 # libgcc1-test target (must also be overridable for a target)
266 LIBGCC1_TEST
= libgcc1-test
268 # List of extra executables that should be compiled for this target machine
269 # that are used for compiling from source code to object code.
270 # The rules for compiling them should be in the t-* file for the machine.
273 # Like EXTRA_PASSES, but these are used when linking.
276 # List of extra object files that should be compiled for this target machine.
277 # The rules for compiling them should be in the t-* file for the machine.
280 # List of extra object files that should be compiled and linked with
281 # compiler proper (cc1, cc1obj, cc1plus).
284 # List of extra object files that should be compiled and linked with
288 # List of additional header files to install.
289 # Often this is edited directly by `configure'.
292 # Set this to `ld' to enable use of collect2.
294 # It is convenient for configure to add the assignment at the beginning,
295 # so don't override it here.
297 # List of extra C and assembler files to add to libgcc1.a.
298 # Assembler files should have names ending in `.asm'.
301 # List of extra C and assembler files to add to libgcc2.a.
302 # Assembler files should have names ending in `.asm'.
305 # Default float.h source to use for cross-compiler.
306 # This is overidden by configure.
307 CROSS_FLOAT_H
=float.h-cross
309 # Program to convert libraries.
312 # Control whether header files are installed.
313 INSTALL_HEADERS
=install-headers
315 # Options for tar when copying trees. So HPUX can override it.
318 # Select which version of fixincludes to use (I.E. regular versus SVR4)
319 # This value is overridden directly by configure.
320 FIXINCLUDES
=fixincludes
322 # Additional directories of header files to run fixincludes on.
323 # These should be directories searched automatically by default
324 # just as /usr/include is.
325 # *Do not* use this for directories that happen to contain
326 # header files, but are not searched automatically by default.
327 # On most systems, this is empty.
328 OTHER_FIXINCLUDES_DIRS
=
330 # List of things which should already be built whenever we try to use xgcc
331 # to compile anything (without linking).
332 GCC_PASSES
=xgcc cc1
cpp $(EXTRA_PASSES
)
334 # List of things which should already be built whenever we try to use xgcc
336 GCC_PARTS
=$(GCC_PASSES
) $(LIBGCC
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
338 # Directory to link to, when using the target `maketest'.
341 # Guaranteed to not exist when not passing md through cpp.
342 # This value is overridden directly by configure.
343 MD_FILE
= md-cpp-not-used
345 # Flags to use when cross-building GCC.
346 # Prefix to apply to names of object files when using them
347 # to run on the machine we are compiling on.
349 # Prefix to apply to names of object files when compiling them
350 # to run on the machine we are compiling on.
351 # The default for this variable is chosen to keep these rules
352 # out of the way of the other rules for compiling the same source files.
355 HOST_CFLAGS
=$(ALL_CFLAGS
)
357 HOST_LDFLAGS
=$(LDFLAGS
)
358 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
359 HOST_ALLOCA
=$(ALLOCA
)
360 HOST_MALLOC
=$(MALLOC
)
361 HOST_OBSTACK
=$(OBSTACK
)
363 # Actual name to use when installing a native compiler.
364 GCC_INSTALL_NAME
= `t='$(program_transform_name)'; echo gcc | sed $$t`
366 # Actual name to use when installing a cross-compiler.
367 GCC_CROSS_NAME
= `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
369 # Choose the real default target.
372 # Choose the real install target.
373 INSTALL_TARGET
=install-normal
375 # Source for float.h. Overridden by cross-make.
378 # Extra symbols for fixproto to define when parsing headers.
381 # Extra flags to use when compiling crt{begin,end}.o.
384 # End of variables for you to override.
386 # Definition of `all' is here so that new rules inserted by sed
387 # do not specify the default target.
388 # The real definition is under `all.internal' (for native compilers)
389 # or `all.cross' (for cross compilers).
392 # This tells GNU Make version 3 not to put all variables in the environment.
395 # sed inserts variable overrides after the following line.
401 # Now figure out from those variables how to compile and link.
405 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
406 # ??? IN_GCC should be obsolete now.
407 INTERNAL_CFLAGS
= $(CROSS
) -DIN_GCC
409 # This is the variable actually used when we compile.
410 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
)
413 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
415 # Even if ALLOCA is set, don't use it if compiling with GCC.
416 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
417 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
418 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
419 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
421 # Dependency on obstack, alloca, malloc or whatever library facilities
422 # are not installed in the system libraries.
423 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
424 LIBDEPS
= $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
426 # Likewise, for use in the tools that must run on this machine
427 # even if we are cross-building GCC.
428 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
429 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
431 # How to link with both our special library facilities
432 # and the system's installed libraries.
433 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(CLIB
)
435 # Likewise, for use in the tools that must run on this machine
436 # even if we are cross-building GCC.
437 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
440 HOST_RTL
= $(HOST_PREFIX
)rtl.o
441 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
442 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
444 # Specify the directories to be searched for header files.
445 # Both . and srcdir are used, in that order,
446 # so that tm.h and config.h will be found in the compilation
447 # subdirectory rather than in the source directory.
448 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
450 # Always use -I$(srcdir)/config when compiling.
452 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
454 # This tells GNU make version 3 not to export all the variables
455 # defined in this file into the environment.
458 # Support for additional languages (other than c and objc).
459 # ??? objc can be supported this way too (leave for later).
461 # These next lines are overridden by configure.
466 # Flags to pass to recursive makes.
467 # CC is set by configure. Hosts without symlinks need special handling
468 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
470 # ??? The choices here will need some experimenting with.
472 "AR_FLAGS=$(AR_FLAGS)" \
473 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
475 "BISONFLAGS=$(BISONFLAGS)" \
476 "CC=set-by-configure" \
478 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
479 "LDFLAGS=$(LDFLAGS)" \
481 "LEXFLAGS=$(LEXFLAGS)" \
482 "MAKEINFO=$(MAKEINFO)" \
483 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
484 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
485 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
489 "exec_prefix=$(exec_prefix)" \
491 "tooldir=$(tooldir)" \
493 "libsubdir=$(libsubdir)"
495 # Lists of files for various purposes.
497 # A list of all the language-specific executables.
498 # This is overridden by configure.
499 COMPILERS
= cc1
$(exeext
) cc1obj
$(exeext
)
501 # Language-specific object files for C.
502 C_OBJS
= c-parse.o c-lang.o c-lex.o c-pragma.o \
503 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
505 # Language-specific object files for Objective C.
506 OBJC_OBJS
= objc-parse.o objc-act.o c-lex.o c-pragma.o \
507 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
509 # Files specific to the C interpreter bytecode compiler(s).
510 BC_OBJS
= bc-emit.o bc-optab.o
512 # Bytecode header files constructed at build time; vmsconfig.com wants this.
513 BC_ALL
= bc-arity.h bc-opcode.h bc-opname.h
515 # Language-independent object files.
516 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
517 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
518 rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
519 dbxout.o sdbout.o dwarfout.o xcoffout.o \
520 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
521 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
522 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
523 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
524 insn-attrtab.o
$(out_object_file
) getpwd.o convert.o
$(EXTRA_OBJS
)
526 # GEN files are listed separately, so they can be built before doing parallel
527 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
528 # them before rtl.o is compiled.
529 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
532 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
535 # Files to be copied away after each stage in building.
536 STAGESTUFF
= *$(objext
) insn-flags.h insn-config.h insn-codes.h \
537 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
538 insn-attr.h insn-attrtab.c insn-opinit.c \
539 stamp-flags stamp-config stamp-codes \
540 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
541 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS \
542 genemit
$(exeext
) genoutput
$(exeext
) genrecog
$(exeext
) genextract
$(exeext
) \
543 genflags
$(exeext
) gencodes
$(exeext
) genconfig
$(exeext
) genpeep
$(exeext
) \
544 genattrtab
$(exeext
) genattr
$(exeext
) genopinit
$(exeext
) \
546 stamp-bcarity stamp-bcopcode stamp-bcopname \
547 bi-arity
$(exeext
) bi-opcode
$(exeext
) bi-opname
$(exeext
) \
548 $(GCC_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross
$(exeext
) \
549 $(CCCP
)$(exeext
) cc1obj
$(exeext
) enquire
$(exeext
) \
550 protoize
$(exeext
) unprotoize
$(exeext
) \
551 specs collect2
$(exeext
) $(USE_COLLECT2
) underscore.c \
552 *.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop \
553 *.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack \
557 # Members of libgcc1.a.
558 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
559 _lshrsi3 _ashrsi3 _ashlsi3 \
560 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
561 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
562 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
563 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
564 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
566 # Library members defined in libgcc2.c.
567 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
568 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
569 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
570 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
571 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
572 _fixtfdi _fixunstfdi _floatditf \
573 __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
574 _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
577 # The files that "belong" in CONFIG_H are deliberately omitted
578 # because having them there would not be useful in actual practice.
579 # All they would do is cause complete recompilation every time
580 # one of the machine description files is edited.
581 # That may or may not be what one wants to do.
582 # If it is, rm *.o is an easy way to do it.
583 # CONFIG_H = $(host_xm_file) $(tm_file)
585 RTL_H
= rtl.h rtl.def machmode.h machmode.def
586 TREE_H
= tree.h real.h tree.def machmode.h machmode.def
587 BYTECODE_H
= bytecode.h bc-emit.h bc-optab.h
589 # Language makefile fragments.
591 # The following targets define the interface between us and the languages.
593 # all.build, all.cross, start.encap, rest.encap,
595 # install-normal, install-common, install-info, install-man,
596 # uninstall, distdir,
597 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
598 # stage1, stage2, stage3, stage4
600 # Each language is linked in with a series of hooks (since we can't use `::'
601 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
602 # Configure computes and adds these here.
606 # sed inserts language fragments after the following line.
607 ####language fragments
609 # End of language makefile fragments.
611 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
614 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
$(srcdir)/version.c \
615 $(srcdir)/config
/$(xmake_file
) $(srcdir)/config
/$(tmake_file
) \
617 cp config.status config.run
621 all.internal
: start.encap rest.encap
622 # This is what to compile if making a cross-compiler.
623 # Note that we can compile enquire using the cross-compiler just built,
624 # although we can't run it on this machine.
625 all.cross
: native gcc-cross specs stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) \
626 $(LIBGCC1_TEST
) $(EXTRA_PARTS
) lang.
all.cross
627 # This is what to compile if making gcc with a cross-compiler.
628 all.build
: native xgcc
$(EXTRA_PARTS
) lang.
all.build
629 # This is what must be made before installing GCC and converting libraries.
630 start.encap
: native xgcc specs
$(LIBGCC1
) xlimits.h lang.start.encap
631 # These can't be made until after GCC can run.
632 rest.encap
: stmp-headers
$(LIBGCC
) $(STMP_FIXPROTO
) $(EXTRA_PARTS
) lang.rest.encap
633 # This is what is made with the host's compiler
634 # whether making a cross compiler or not.
635 native
: config.status
cpp $(LANGUAGES
) $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
637 # Define the names for selecting languages in LANGUAGES.
639 OBJC objc
: cc1obj objc-runtime
640 OBJECTIVE-C objective-c
: cc1obj objc-runtime
643 # Tell GNU make these are phony targets.
644 .PHONY
: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
646 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
647 # a target to build even if it is up-to-date. So we must verify that
648 # config.status does not exist before failing.
650 @if
[ ! -f config.status
] ; then \
651 echo You must configure gcc. Look at the INSTALL file for details.
; \
657 # On the target machine, finish building a cross compiler.
658 # This does the things that can't be done on the host machine.
659 rest.cross
: $(LIBGCC
) gfloat.h specs
661 # Verify that it works to compile and link libgcc1-test.
662 # If it does, then there are sufficient replacements for libgcc1.a.
663 libgcc1-test
: libgcc1-test.o native
$(GCC_PARTS
)
664 @echo
"Testing libgcc1. Ignore linker warning messages."
665 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) libgcc1-test.o
-o libgcc1-test \
666 -nostartfiles
-nostdlib
`$(GCC_FOR_TARGET) --print-libgcc-file-name`
667 libgcc1-test.o
: libgcc1-test.c native xgcc
668 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) -c
$(srcdir)/libgcc1-test.c
670 # Recompile all the language-independent object files.
671 # This is used only if the user explicitly asks for it.
672 compilations
: ${OBJS}
674 # Create a list of the language-independent object files so the language
675 # subdirectories needn't mention their names explicitly.
676 stamp-objlist
: Makefile
$(OBJS
) $(BC_OBJS
)
677 echo
" $(OBJS) $(BC_OBJS)" | sed
-e
's, \([a-z]\), ../\1,g' -e
's/\.o/$(objext)/g' >stamp-objlist
679 # We call this executable `xgcc' rather than `gcc'
680 # to avoid confusion if the current directory is in the path
681 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
682 xgcc
: gcc.o version.o
$(LIBDEPS
) $(EXTRA_GCC_OBJS
)
683 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ gcc.o version.o
$(EXTRA_GCC_OBJS
) $(LIBS
)
685 # Dump a specs file to make -B./ read these specs over installed ones.
687 $(GCC_FOR_TARGET
) -dumpspecs
> tmp-specs
690 # We do want to create an executable named `xgcc', so we can use it to
692 # Also create gcc-cross, so that install-common will install properly.
694 cp xgcc
$(exeext
) gcc-cross
$(exeext
)
696 cc1
: $(P
) $(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
697 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(C_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
699 cc1obj
: $(P
) $(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBDEPS
)
700 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJC_OBJS
) $(OBJS
) $(BC_OBJS
) $(LIBS
)
702 # Copy float.h from its source.
705 cp
$(FLOAT_H
) gfloat.h
707 # Create float.h source for the native machine.
709 -.
/enquire
-f
> tmp-float.h
710 mv tmp-float.h float.h-nat
712 # Create a dummy float.h source for a cross-compiler.
713 # ??? This isn't used anymore. Should we create config/float-unkn.h
714 # and make that the default float_format in configure?
716 echo
"#error float.h values not known for cross-compiler" > t-float.h-cross
717 mv t-float.h-cross float.h-cross
719 # Used to compile enquire with standard cc, but have forgotten why.
720 # Let's try with GCC.
721 enquire
: enquire.o
$(GCC_PARTS
)
722 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o
$@
723 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
) stmp-int-hdrs
724 # Breaking this line caused a problem with one version of GNU make.
725 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) -I.
-c
$(srcdir)/enquire.c
727 # Build the version of limits.h that we will install.
728 xlimits.h
: glimits.h limitx.h limity.h
729 if
$(LIMITS_H_TEST
) ; then \
730 cat
$(srcdir)/limitx.h
$(srcdir)/glimits.h
$(srcdir)/limity.h
> tmp-xlimits.h
; \
732 cat
$(srcdir)/glimits.h
> tmp-xlimits.h
; \
734 mv tmp-xlimits.h xlimits.h
737 # This is done in two parts because some functions, in libgcc1.c,
738 # must be compiled with something other than GCC,
739 # while the rest, in libgcc2.c, must be compiled with xgcc.
740 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
742 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
743 # LIBCONVERT should put its output in libgcc1.conv.
744 libgcc1.conv
: libgcc1.a
745 $(LIBCONVERT
) libgcc1.a libgcc1.conv
747 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
748 # Make an empty file instead.
749 libgcc1.null
: $(GCC_PASSES
)
750 echo
"__foo () {}" > dummy.c
751 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
752 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy
$(objext
)
753 rm -f dummy
$(objext
) dummy.c
755 # This is $(LIBGCC1) for a cross-compiler.
756 # We have no automatic way of building libgcc1.a,
757 # so it's up to the installer to find a way to do that.
758 # This rule deliberately does not depend on libgcc1.a
759 # so that it will fail if the installer hasn't provided it.
761 mv libgcc1.a libgcc1.cross ||
(echo You must find a way to make libgcc1.a
; false
)
763 # Compile the library of arithmetic subroutines with the native compiler.
764 # Don't compile it with GCC!
765 # (That would cause most arithmetic functions to call themselves.)
766 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
768 # Actually build it in tmplibgcc1.a, then rename at end,
769 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
770 # -e causes any failing command to make this rule fail.
771 # -e doesn't work in certain shells, so we test $$? as well.
772 # lynx has a broken ar, it always complains when the initial library is
773 # empty, thus this command works only if we don't do -e
774 # There is a trailing backslash (\) deleted from the following line.
776 for name in
$(LIB1FUNCS
); \
779 rm -f
$${name}$(objext
); \
780 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
781 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
782 mv libgcc1
$(objext
) $${name}$(objext
); \
783 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
784 rm -f
$${name}$(objext
); \
786 # Some shells crash when a loop has no items.
787 # So make sure there is always at least one--`..'.
789 # We don't use -e here because there are if statements
790 # that should not make the command give up when the if condition is false.
791 # Instead, we test for failure after each command where it matters.
792 for file in ..
$(LIB1FUNCS_EXTRA
); \
794 if
[ x
$${file} != x..
]; then \
795 name
=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
797 if
[ $${name}.asm
= $${file} ]; then \
798 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
800 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
801 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
802 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
803 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
804 rm -f
$${name}.s
$${name}$(objext
); \
808 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc1.a
; else true
; fi
809 mv tmplibgcc1.a libgcc1.a
811 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
812 # functions. LIB1ASMSRC is the name of the source file in the config
814 libgcc1-asm.a
: libgcc2.ready config.status
$(srcdir)/config
/$(LIB1ASMSRC
)
815 -rm -f tmplibgcc1.a libgcc1.S
816 cp
$(srcdir)/config
/$(LIB1ASMSRC
) libgcc1.S
817 # Actually build it in tmplibgcc1.a, then rename at end,
818 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
819 # -e causes any failing command to make this rule fail.
820 # -e doesn't work in certain shells, so we test $$? as well.
821 # lynx has a broken ar, it always complains when the initial library is
822 # empty, thus this command works only if we don't do -e
823 # There is a trailing backslash (\) deleted from the following line.
825 for name in
$(LIB1ASMFUNCS
); \
828 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} libgcc1.S
; \
829 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
830 mv libgcc1
$(objext
) $${name}$(objext
); \
831 $(AR
) $(AR_FLAGS
) tmplibgcc1.a
$${name}$(objext
); \
832 rm -f
$${name}$(objext
); \
835 mv tmplibgcc1.a libgcc1-asm.a
837 # Generate assembly versions of the functions required for libgcc1.
838 # You'll still need to massage the code by hand (possibly hacking
839 # underscores and local labels) but this will get you started.
840 libgcc1.S
: libgcc1.c
$(CONFIG_H
) config.status
843 for name in
$(LIB1FUNCS
); \
846 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -S
-DL
$${name} $(srcdir)/libgcc1.c
; \
847 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
848 echo
'#ifdef ' L
$${name} >> libgcc1.S
; \
849 cat libgcc1.s
>> libgcc1.S
; \
850 echo
'#endif /*' L
$${name} '*/' >> libgcc1.S
; \
851 echo
"" >> libgcc1.S
; \
854 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
855 # But recompiling cc1 should not force recompilation of libgcc2.a.
856 # If you want to force recompilation, delete libgcc2.a.
857 libgcc2.ready
: $(GCC_PASSES
) $(LIBGCC2_DEPS
) stmp-int-hdrs
858 -if
[ -f libgcc2.ready
] ; then \
861 touch libgcc2.ready
; \
864 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2FUNCS_EXTRA
) \
865 machmode.h longlong.h gbl-ctors.h config.status
866 # Actually build it in tmplibgcc2.a, then rename at end,
867 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
869 # -e causes any failing command to make this rule fail.
870 # -e doesn't work in certain shells, so we test $$? as well.
871 # lynx has a broken ar, it always complains when the initial library is
872 # empty, thus this command works only if we don't do -e
873 # There is a trailing backslash (\) deleted from the following line.
875 for name in
$(LIB2FUNCS
); \
878 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
879 $(srcdir)/libgcc2.c
-o
$${name}$(objext
); \
880 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
881 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}$(objext
); \
882 rm -f
$${name}$(objext
); \
884 # Some shells crash when a loop has no items.
885 # So make sure there is always at least one--`..'.
887 # We don't use -e here because there are if statements
888 # that should not make the command give up when the if condition is false.
889 # Instead, we test for failure after each command where it matters.
890 for file in ..
$(LIB2FUNCS_EXTRA
); \
892 if
[ x
$${file} != x..
]; then \
893 name
=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
894 oname
=` echo $${name} | sed -e 's,.*/,,'`; \
896 if
[ $${name}.asm
= $${file} ]; then \
897 cp
$${file} $${name}.s || exit
1; file
=$${name}.s
; \
899 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
900 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
901 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${oname}$(objext
); \
902 rm -f
$${name}.s
$${oname}$(objext
); \
906 mv tmplibgcc2.a libgcc2.a
907 # These lines were deleted from above the mv command
908 # because ranlibing libgcc.a itself should suffice.
909 # -if [ x${HPUX_GAS} = x ] ; then \
910 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
913 # Combine the various libraries into a single library, libgcc.a.
914 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
915 -rm -rf tmplibgcc.a libgcc.a tmpcopy
917 -if
[ x
$(LIBGCC1
) != x
]; \
918 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
921 # Some versions of ar (specifically the one in RISC/os 5.x), create an
922 # unwritable table of contents file, and then print an error message when
923 # the second ar command tries to overwrite this file. To avoid the error
924 # message from ar, we make sure all files are writable.
925 -(cd tmpcopy
; chmod
+w
* > /dev
/null
2>&1)
926 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
927 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
929 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
930 # Actually build it in tmplibgcc.a, then rename at end,
931 # so that libgcc.a itself remains nonexistent if compilation is aborted.
932 mv tmplibgcc.a libgcc.a
934 # Use the genmultilib shell script to generate the information the gcc
935 # driver program needs to select the library directory based on the
937 multilib.h
: $(srcdir)/genmultilib Makefile
938 $(SHELL
) $(srcdir)/genmultilib
"$(MULTILIB_OPTIONS)" \
939 "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" "$(MULTILIB_EXCEPTIONS)" > multilib.h
941 # Build multiple copies of libgcc.a, one for each target switch.
942 stmp-multilib
: $(LIBGCC1
) libgcc2.c libgcc2.ready
$(CONFIG_H
) \
943 $(LIB2FUNCS_EXTRA
) machmode.h longlong.h gbl-ctors.h config.status
944 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
945 dir=`echo $$i | sed -e 's/;.*$$//'`; \
946 flags
=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
947 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
948 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
949 RANLIB
="$(RANLIB)" RANLIB_TEST
="$(RANLIB_TEST)" \
950 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
951 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS) $${flags}" \
952 LIBGCC1
="$(LIBGCC1)" LIBGCC2
="$(LIBGCC2)" \
953 dir="$${dir}" stmp-multilib-sub
; \
954 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
958 # Subroutine of stmp-multilib so make -n works.
960 rm -f
$(dir)/libgcc.a
$(LIBGCC2
)
961 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
962 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
963 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
964 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC2
)
965 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
967 else rm -f
$(LIBGCC1
); \
969 if
[ x
$(LIBGCC1
) != xlibgcc1-asm.a
]; \
972 $(MAKE
) GCC_FOR_TARGET
="$(GCC_FOR_TARGET)" \
973 AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" CC
="$(CC)" CFLAGS
="$(CFLAGS)" \
974 HOST_PREFIX
="$(HOST_PREFIX)" HOST_PREFIX_1
="$(HOST_PREFIX_1)" \
975 LIBGCC2_CFLAGS
="$(LIBGCC2_CFLAGS)" $(LIBGCC1
); \
977 rm -rf tmplibgcc.a tmpcopy
979 if
[ x
$(LIBGCC1
) != x
]; \
980 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
983 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
984 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*$(objext
))
985 rm -rf libgcc2.a tmpcopy
986 if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
987 if
[ -d
$(dir) ]; then true
; else mkdir
$(dir); fi
988 mv tmplibgcc.a
$(dir)/libgcc.a
990 objc-runtime
: libobjc.a
992 # Build the Objective C runtime library.
993 libobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
$(USE_COLLECT2
) $(EXTRA_PARTS
)
994 if
[ -d objc
]; then true
; else mkdir objc
; fi
996 srcdir1
=`cd $(srcdir); pwd`; \
998 $(MAKE
) -f
$${srcdir1}/objc
/Makefile libobjc.a \
999 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1000 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
1001 GCC_CFLAGS
="$(GCC_CFLAGS)"
1003 ln objc
/libobjc.a .
>/dev
/null
2>&1 || cp objc
/libobjc.a .
1004 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) libobjc.a
; else true
; fi
1006 # This is used by objc/Makefile if the user runs that directly.
1007 sublibobjc.a
: cc1obj stmp-int-hdrs libgcc2.ready
1009 srcdir1
=`cd $(srcdir); pwd`; \
1011 $(MAKE
) -f
$$srcdir1/objc
/Makefile libobjc.a \
1012 srcdir=$$srcdir1 tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1013 GCC_FOR_TARGET
="$$thisdir1/xgcc -B$$thisdir1/" \
1014 GCC_CFLAGS
="$(GCC_CFLAGS)"
1016 # Compile two additional files that are linked with every program
1017 # linked using GCC on systems using COFF or ELF, for the sake of C++
1019 crtbegin.o
: stamp-crt
; @true
1020 crtend.o
: stamp-crt
; @true
1022 stamp-crt
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1023 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1024 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
1025 -g0
-c
$(srcdir)/crtstuff.c
1026 mv crtstuff
$(objext
) crtbegin
$(objext
)
1027 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1028 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
1029 -g0
-c
$(srcdir)/crtstuff.c
1030 mv crtstuff
$(objext
) crtend
$(objext
)
1033 # On some systems we also want to install versions of these files
1034 # compiled using PIC for use in shared libraries.
1035 crtbeginS.o crtendS.o
: stamp-crtS
; @true
1037 stamp-crtS
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
1038 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1039 -DCRT_BEGIN
-finhibit-size-directive
-fno-inline-functions \
1040 -g0
-c
$(srcdir)/crtstuff.c
-fPIC
1041 mv crtstuff
$(objext
) crtbeginS
$(objext
)
1042 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) $(CRTSTUFF_T_CFLAGS
) \
1043 -DCRT_END
-finhibit-size-directive
-fno-inline-functions \
1044 -g0
-c
$(srcdir)/crtstuff.c
-fPIC
1045 mv crtstuff
$(objext
) crtendS
$(objext
)
1048 # Compiling object files from source files.
1050 # Note that dependencies on obstack.h are not written
1051 # because that file is not part of GCC.
1053 # C language specific files.
1055 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1056 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1057 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
1058 $(srcdir)/c-parse.h
: $(srcdir)/c-parse.c
1059 $(srcdir)/c-parse.c
: $(srcdir)/c-parse.y
1060 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
1061 $(srcdir)/c-parse.y
: c-parse.in
1062 echo
'/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1063 sed
-e
"/^ifobjc$$/,/^end ifobjc$$/d" \
1064 -e
"/^ifc$$/d" -e
"/^end ifc$$/d" \
1065 $(srcdir)/c-parse.in
>>tmp-c-parse.y
1066 $(srcdir)/move-if-change tmp-c-parse.y
$(srcdir)/c-parse.y
1068 $(srcdir)/c-gperf.h
: c-parse.gperf
1069 gperf
-p
-j1
-i
1 -g
-o
-t
-G
-N is_reserved_word
-k1
,3,$$ \
1070 $(srcdir)/c-parse.gperf
>tmp-gperf.h
1071 $(srcdir)/move-if-change tmp-gperf.h
$(srcdir)/c-gperf.h
1073 c-decl.o
: c-decl.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h output.h
1074 c-typeck.o
: c-typeck.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h output.h
1075 c-lang.o
: c-lang.c
$(CONFIG_H
) $(TREE_H
)
1076 c-lex.o
: c-lex.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h
$(srcdir)/c-parse.h \
1077 input.h flags.h
$(srcdir)/c-gperf.h c-pragma.h
1078 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
1079 c-convert.o
: c-convert.c
$(CONFIG_H
) $(TREE_H
) flags.h
1080 c-pragma.o
: c-pragma.c
$(CONFIG_H
) $(TREE_H
) c-pragma.h
1081 c-iterate.o
: c-iterate.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h flags.h
1083 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1086 ln collect2
$(exeext
) ld$(exeext
) > /dev
/null
2>&1 \
1087 || cp collect2
$(exeext
) ld$(exeext
)
1089 collect2
: collect2.o cplus-dem.o underscore.o version.o
$(LIBDEPS
)
1090 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1091 -rm -f collect2
$(exeext
)
1092 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ collect2.o \
1093 cplus-dem.o underscore.o version.o
$(LIBS
)
1095 collect2.o
: collect2.c
$(CONFIG_H
) gstab.h obstack.h demangle.h
1096 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1097 -DTARGET_MACHINE
=\"$(target
)\" $(MAYBE_USE_COLLECT2
) \
1098 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1100 cplus-dem.o
: cplus-dem.c demangle.h
1102 underscore.c
: stamp-under
; @true
1104 stamp-under
: $(GCC_PASSES
)
1105 echo
"int xxy_us_dummy;" >tmp-dum.c
1106 $(GCC_FOR_TARGET
) -S tmp-dum.c
1107 echo
'/*WARNING: This file is automatically generated!*/' >tmp-under.c
1108 if grep _xxy_us_dummy tmp-dum.s
> /dev
/null
; then \
1109 echo
"int prepends_underscore = 1;" >>tmp-under.c
; \
1111 echo
"int prepends_underscore = 0;" >>tmp-under.c
; \
1113 $(srcdir)/move-if-change tmp-under.c underscore.c
1114 -rm -f tmp-dum.c tmp-dum.s
1117 # Objective C language specific files.
1119 objc-parse.o
: $(srcdir)/objc-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
1120 c-tree.h input.h flags.h objc-act.h
1121 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/objc-parse.c
1122 $(srcdir)/objc-parse.c
: $(srcdir)/objc-parse.y
1123 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) objc-parse.y
-o objc-parse.c
1124 $(srcdir)/objc-parse.y
: $(srcdir)/c-parse.in
1125 echo
'/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
1126 sed
-e
"/^ifc$$/,/^end ifc$$/d" \
1127 -e
"/^ifobjc$$/d" -e
"/^end ifobjc$$/d" \
1128 $(srcdir)/c-parse.in
>>tmp-objc-prs.y
1129 $(srcdir)/move-if-change tmp-objc-prs.y
$(srcdir)/objc-parse.y
1131 objc-act.o
: objc-act.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) c-tree.h c-lex.h \
1132 flags.h objc-act.h input.h function.h
$(srcdir)/c-parse.h
1134 # A file used by all variants of C.
1136 c-common.o
: c-common.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
1138 # Language-independent files.
1140 gcc.o
: gcc.c
$(CONFIG_H
) multilib.h config.status
$(lang_specs_files
)
1141 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1142 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
1143 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
1144 -DDEFAULT_TARGET_VERSION
=\"$(version
)\" \
1145 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
1146 -DTOOLDIR_BASE_PREFIX
=\"$(exec_prefix)/\" \
1147 $(MAYBE_TARGET_DEFAULT
) \
1148 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1150 dumpvers
: dumpvers.c
1152 version.o
: version.c
1153 obstack.o
: obstack.c
1155 convert.o
: convert.c
$(CONFIG_H
) $(TREE_H
) flags.h convert.h
1157 tree.o
: tree.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1158 print-tree.o
: print-tree.c
$(CONFIG_H
) $(TREE_H
)
1159 stor-layout.o
: stor-layout.c
$(CONFIG_H
) $(TREE_H
) flags.h function.h
1160 fold-const.o
: fold-const.c
$(CONFIG_H
) $(TREE_H
) flags.h
1161 toplev.o
: toplev.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) bytecode.h bc-emit.h \
1162 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1163 $(lang_options_files
)
1164 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1165 $(MAYBE_TARGET_DEFAULT
) $(MAYBE_USE_COLLECT2
) \
1166 -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1168 rtl.o
: rtl.c
$(CONFIG_H
) $(RTL_H
)
1170 print-rtl.o
: print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1171 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1173 varasm.o
: varasm.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h function.h \
1174 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1175 output.h bytecode.h c-pragma.h
1176 function.o
: function.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1177 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1178 recog.h output.h bytecode.h
1179 stmt.o
: stmt.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
1180 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
1181 recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
1183 expr.o
: expr.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h regs.h \
1184 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1185 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1186 bc-emit.h modemap.def
1187 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
1189 expmed.o
: expmed.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1190 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1191 explow.o
: explow.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h hard-reg-set.h \
1192 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1193 optabs.o
: optabs.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1194 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1195 dbxout.o
: dbxout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h regs.h \
1196 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1197 sdbout.o
: sdbout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) gsyms.h flags.h \
1198 insn-config.h reload.h
1199 dwarfout.o
: dwarfout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) dwarf.h flags.h \
1200 insn-config.h reload.h output.h defaults.h
1201 xcoffout.o
: xcoffout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) xcoffout.h flags.h
1202 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
1203 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1204 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1205 real.o
: real.c
$(CONFIG_H
) $(TREE_H
)
1206 getpwd.o
: getpwd.c
$(CONFIG_H
)
1208 integrate.o
: integrate.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h integrate.h \
1209 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
1212 jump.o
: jump.c
$(CONFIG_H
) $(RTL_H
) flags.h hard-reg-set.h regs.h \
1213 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1214 stupid.o
: stupid.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h
1216 cse.o
: cse.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h real.h \
1217 insn-config.h recog.h
1218 loop.o
: loop.c
$(CONFIG_H
) $(RTL_H
) flags.h loop.h insn-config.h \
1219 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1220 unroll.o
: unroll.c
$(CONFIG_H
) $(RTL_H
) insn-config.h insn-codes.h \
1221 integrate.h regs.h flags.h expr.h loop.h
1222 flow.o
: flow.c
$(CONFIG_H
) $(RTL_H
) flags.h insn-config.h \
1223 basic-block.h regs.h hard-reg-set.h output.h
1224 combine.o
: combine.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1225 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1226 basic-block.h recog.h real.h hard-reg-set.h
1227 regclass.o
: regclass.c
$(CONFIG_H
) $(RTL_H
) hard-reg-set.h flags.h \
1228 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1229 local-alloc.o
: local-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h basic-block.h \
1230 regs.h hard-reg-set.h insn-config.h recog.h output.h
1231 global.o
: global.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1232 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1234 reload.o
: reload.c
$(CONFIG_H
) $(RTL_H
) flags.h output.h \
1235 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1236 reload1.o
: reload1.c
$(CONFIG_H
) $(RTL_H
) real.h flags.h expr.h \
1237 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1238 basic-block.h recog.h output.h
1239 caller-save.o
: caller-save.c
$(CONFIG_H
) $(RTL_H
) flags.h \
1240 regs.h hard-reg-set.h insn-codes.h insn-config.h basic-block.h recog.h \
1242 reorg.o
: reorg.c
$(CONFIG_H
) $(RTL_H
) conditions.h hard-reg-set.h \
1243 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1245 sched.o
: sched.c
$(CONFIG_H
) $(RTL_H
) basic-block.h regs.h hard-reg-set.h \
1246 flags.h insn-config.h insn-attr.h
1247 final.o
: final.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h regs.h \
1248 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
1249 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1250 recog.o
: recog.c
$(CONFIG_H
) $(RTL_H
) \
1251 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1252 insn-flags.h insn-codes.h real.h
1253 reg-stack.o
: reg-stack.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) \
1254 regs.h hard-reg-set.h flags.h insn-config.h
1256 $(out_object_file
): $(out_file
) $(CONFIG_H
) $(TREE_H
) \
1257 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1258 insn-flags.h output.h insn-attr.h insn-codes.h
1259 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(out_file
)
1261 # Build auxiliary files that support ecoff format.
1262 mips-tfile
: mips-tfile.o version.o
$(LIBDEPS
)
1263 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tfile.o version.o
$(LIBS
)
1265 mips-tfile.o
: mips-tfile.c
$(CONFIG_H
) $(RTL_H
)
1267 mips-tdump
: mips-tdump.o version.o
$(LIBDEPS
)
1268 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@ mips-tdump.o version.o
$(LIBS
)
1270 mips-tdump.o
: mips-tdump.c
$(CONFIG_H
) $(RTL_H
)
1272 # Build file to support OSF/rose half-pic format.
1273 halfpic.o
: halfpic.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
)
1275 # Normally this target is not used; but it is used if you
1276 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1277 # from the GNU Emacs distribution.
1279 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
1280 -c
`echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1283 # Generate header and source files from the machine description,
1286 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
1287 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1288 insn-attr.h insn-attrtab.c
1290 # The following pair of rules has this effect:
1291 # genconfig is run only if the md has changed since genconfig was last run;
1292 # but the file insn-config.h is touched only when its contents actually change.
1294 # Each of the other insn-* files is handled by a similar pair of rules.
1296 # This causes an anomaly in the results of make -n
1297 # because insn-* is older than stamp-*
1298 # and thus make -n thinks that insn-* will be updated
1299 # and force recompilation of things that depend on it.
1300 # We use move-if-change precisely to avoid such recompilation.
1301 # But there is no way to teach make -n that it will be avoided.
1303 # Each of the insn-*.[ch] rules has a semicolon at the end,
1304 # for otherwise the system Make on SunOS 4.1 never tries
1305 # to recompile insn-*.o. To avoid problems and extra noise from
1306 # versions of make which don't like empty commands (nothing after the
1307 # trailing `;'), we call true for each.
1309 insn-config.h
: stamp-config
; @true
1310 stamp-config
: $(md_file
) genconfig
$(srcdir)/move-if-change
1311 .
/genconfig
$(md_file
) > tmp-config.h
1312 $(srcdir)/move-if-change tmp-config.h insn-config.h
1315 insn-flags.h
: stamp-flags
; @true
1316 stamp-flags
: $(md_file
) genflags
$(srcdir)/move-if-change
1317 .
/genflags
$(md_file
) > tmp-flags.h
1318 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1321 insn-codes.h
: stamp-codes
; @true
1322 stamp-codes
: $(md_file
) gencodes
$(srcdir)/move-if-change
1323 .
/gencodes
$(md_file
) > tmp-codes.h
1324 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1327 insn-emit.o
: insn-emit.c
$(CONFIG_H
) $(RTL_H
) expr.h real.h output.h \
1328 insn-config.h insn-flags.h insn-codes.h
1329 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
1331 insn-emit.c
: stamp-emit
; @true
1332 stamp-emit
: $(md_file
) genemit
$(srcdir)/move-if-change
1333 .
/genemit
$(md_file
) > tmp-emit.c
1334 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1337 insn-recog.o
: insn-recog.c
$(CONFIG_H
) $(RTL_H
) insn-config.h recog.h \
1338 real.h output.h flags.h
1339 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
1341 insn-recog.c
: stamp-recog
; @true
1342 stamp-recog
: $(md_file
) genrecog
$(srcdir)/move-if-change
1343 .
/genrecog
$(md_file
) > tmp-recog.c
1344 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1347 insn-opinit.o
: insn-opinit.c
$(CONFIG_H
) $(RTL_H
) insn-codes.h insn-flags.h \
1348 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1349 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-opinit.c
1351 insn-opinit.c
: stamp-opinit
; @true
1352 stamp-opinit
: $(md_file
) genopinit
$(srcdir)/move-if-change
1353 .
/genopinit
$(md_file
) > tmp-opinit.c
1354 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1357 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
1358 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
1360 insn-extract.c
: stamp-extract
; @true
1361 stamp-extract
: $(md_file
) genextract
$(srcdir)/move-if-change
1362 .
/genextract
$(md_file
) > tmp-extract.c
1363 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1366 insn-peep.o
: insn-peep.c
$(CONFIG_H
) $(RTL_H
) regs.h output.h real.h
1367 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
1369 insn-peep.c
: stamp-peep
; @true
1370 stamp-peep
: $(md_file
) genpeep
$(srcdir)/move-if-change
1371 .
/genpeep
$(md_file
) > tmp-peep.c
1372 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1375 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h output.h \
1376 insn-attr.h insn-config.h
1377 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
1379 insn-attr.h
: stamp-attr
; @true
1380 stamp-attr
: $(md_file
) genattr
$(srcdir)/move-if-change
1381 .
/genattr
$(md_file
) > tmp-attr.h
1382 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1385 insn-attrtab.c
: stamp-attrtab
; @true
1386 stamp-attrtab
: $(md_file
) genattrtab
$(srcdir)/move-if-change
1387 if cmp
-s
$(PREMADE_ATTRTAB_MD
) $(md_file
); \
1389 echo Using
$(PREMADE_ATTRTAB
); \
1390 cp
$(PREMADE_ATTRTAB
) tmp-attrtab.c
; \
1392 .
/genattrtab
$(md_file
) > tmp-attrtab.c
; \
1394 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1397 insn-output.o
: insn-output.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h conditions.h \
1398 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1400 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
1402 insn-output.c
: stamp-output
; @true
1403 stamp-output
: $(md_file
) genoutput
$(srcdir)/move-if-change
1404 .
/genoutput
$(md_file
) > tmp-output.c
1405 $(srcdir)/move-if-change tmp-output.c insn-output.c
1408 # Compile the programs that generate insn-* from the machine description.
1409 # They are compiled with $(HOST_CC), and associated libraries,
1410 # since they need to run on this machine
1411 # even if GCC is being compiled to run on some other machine.
1413 # $(CONFIG_H) is omitted from the deps of the gen*.o
1414 # because these programs don't really depend on anything
1415 # about the target machine. They do depend on config.h itself,
1416 # since that describes the host machine.
1418 # Pass the md file through cpp if the target requests it.
1419 $(MD_FILE
): $(MD_DEPS
)
1421 $(MD_CPP
) $(MD_CPPFLAGS
) $(md_file
) | sed
's/^# /; /g' > tmp-
$@
1424 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1425 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1426 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
1428 genconfig.o
: genconfig.c
$(RTL_H
) $(build_xm_file
)
1429 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
1431 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1432 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1433 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
1435 genflags.o
: genflags.c
$(RTL_H
) $(build_xm_file
)
1436 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
1438 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1439 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1440 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
1442 gencodes.o
: gencodes.c
$(RTL_H
) $(build_xm_file
)
1443 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
1445 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1446 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1447 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
1449 genemit.o
: genemit.c
$(RTL_H
) $(build_xm_file
)
1450 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
1452 genopinit
: genopinit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1453 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1454 genopinit.o
$(HOST_RTL
) $(HOST_LIBS
)
1456 genopinit.o
: genopinit.c
$(RTL_H
) $(build_xm_file
)
1457 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genopinit.c
1459 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1460 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1461 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
1463 genrecog.o
: genrecog.c
$(RTL_H
) $(build_xm_file
)
1464 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
1466 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1467 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1468 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
1470 genextract.o
: genextract.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1471 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
1473 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1474 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1475 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
1477 genpeep.o
: genpeep.c
$(RTL_H
) $(build_xm_file
)
1478 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
1480 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1481 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1482 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
1484 genattr.o
: genattr.c
$(RTL_H
) $(build_xm_file
)
1485 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1487 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1488 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1489 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1491 genattrtab.o
: genattrtab.c
$(RTL_H
) $(build_xm_file
) insn-config.h
1492 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1494 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1495 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1496 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1498 genoutput.o
: genoutput.c
$(RTL_H
) $(build_xm_file
)
1499 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1501 # Compile the libraries to be used by gen*.
1502 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1503 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1504 # with the rules for rtl.o, alloca.o, etc.
1505 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1506 rm -f
$(HOST_PREFIX
)rtl.c
1507 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtl.c
> $(HOST_PREFIX
)rtl.c
1508 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1510 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1511 rm -f
$(HOST_PREFIX
)print-rtl.c
1512 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c
> $(HOST_PREFIX
)print-rtl.c
1513 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1515 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1516 rm -f
$(HOST_PREFIX
)rtlanal.c
1517 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c
> $(HOST_PREFIX
)rtlanal.c
1518 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1520 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1521 rm -f
$(HOST_PREFIX
)alloca.c
1522 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1523 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1525 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1526 rm -f
$(HOST_PREFIX
)obstack.c
1527 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/obstack.c
> $(HOST_PREFIX
)obstack.c
1528 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1530 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1531 rm -f
$(HOST_PREFIX
)malloc.c
1532 sed
-e
's/config[.]h/hconfig.h/' $(srcdir)/malloc.c
> $(HOST_PREFIX
)malloc.c
1533 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1535 # This satisfies the dependency that we get if you cross-compile a compiler
1536 # that does not need to compile alloca, malloc or whatever.
1538 touch
$(HOST_PREFIX_1
)
1540 # Remake bytecode files.
1541 BI_OBJ
=bi-parser.o bi-lexer.o bi-reverse.o
1543 bc-emit.o
: bc-emit.c
$(CONFIG_H
) $(RTL_H
) real.h
$(BYTECODE_H
) \
1544 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1545 bc-optab.o
: bc-optab.c
$(CONFIG_H
) $(REAL_H
) $(BYTECODE_H
) \
1546 bc-opcode.h bc-typecd.h bc-typecd.def
1548 bi-arity
: bi-arity.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1549 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1550 bi-arity.o
$(BI_OBJ
) $(HOST_LIBS
)
1551 bi-opcode
: bi-opcode.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1552 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1553 bi-opcode.o
$(BI_OBJ
) $(HOST_LIBS
)
1554 bi-opname
: bi-opname.o
$(BI_OBJ
) $(HOST_LIBDEPS
)
1555 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1556 bi-opname.o
$(BI_OBJ
) $(HOST_LIBS
)
1558 $(srcdir)/bi-parser.h
: $(srcdir)/bi-parser.c
1559 $(srcdir)/bi-parser.c
: $(srcdir)/bi-parser.y
1560 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d bi-parser.y
-o bi-parser.c
1562 bi-parser.o
: $(srcdir)/bi-parser.c bi-defs.h
$(build_xm_file
)
1563 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1564 $(srcdir)/bi-parser.c
1565 bi-lexer.o
: bi-lexer.c
$(srcdir)/bi-parser.h
$(build_xm_file
)
1566 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1567 $(srcdir)/bi-lexer.c
1568 bi-arity.o
: bi-arity.c bi-defs.h
$(build_xm_file
)
1569 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1570 $(srcdir)/bi-arity.c
1571 bi-opcode.o
: bi-opcode.c bi-defs.h
$(build_xm_file
)
1572 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1573 $(srcdir)/bi-opcode.c
1574 bi-opname.o
: bi-opname.c bi-defs.h
$(build_xm_file
)
1575 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1576 $(srcdir)/bi-opname.c
1577 bi-reverse.o
: bi-reverse.c bi-defs.h
1578 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) \
1579 $(srcdir)/bi-reverse.c
1581 bc-arity.h
: stamp-bcarity
; @true
1582 stamp-bcarity
: $(srcdir)/bytecode.def bi-arity
$(srcdir)/move-if-change
1583 .
/bi-arity
< $(srcdir)/bytecode.def
>tmp-bc-arity.h
1584 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1587 bc-opcode.h
: stamp-bcopcode
; @true
1588 stamp-bcopcode
: $(srcdir)/bytecode.def bi-opcode
$(srcdir)/move-if-change
1589 .
/bi-opcode
< $(srcdir)/bytecode.def
>tmp-bcopcd.h
1590 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1591 touch stamp-bcopcode
1593 bc-opname.h
: stamp-bcopname
; @true
1594 stamp-bcopname
: $(srcdir)/bytecode.def bi-opname
$(srcdir)/move-if-change
1595 .
/bi-opname
< $(srcdir)/bytecode.def
>tmp-bcopnm.h
1596 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1597 touch stamp-bcopname
1599 bytecode.
mostlyclean:
1600 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1602 bytecode.
distclean bytecode.
clean: bytecode.
mostlyclean
1603 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1605 bytecode.maintainer-clean
: bytecode.
clean
1606 -rm -f bi-parser.c bi-parser.h
1609 # Remake cpp and protoize.
1611 # Making the preprocessor
1614 ln
$(CCCP
)$(exeext
) cpp$(exeext
) > /dev
/null
2>&1 \
1615 || cp
$(CCCP
)$(exeext
) cpp$(exeext
)
1616 cccp
: cccp.o cexp.o version.o
$(LIBDEPS
)
1617 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cccp.o cexp.o \
1619 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
)
1620 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1621 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1622 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1624 cccp.o
: cccp.c
$(CONFIG_H
) pcp.h version.c config.status
1625 # The reason we use $(libdir)/g++-include rather than using libsubdir
1626 # is for compatibility with the current version of libg++.
1627 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1628 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1629 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1630 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1631 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1632 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1633 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1635 cppmain
: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1636 version.o
$(LIBDEPS
)
1637 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ cppmain.o cpplib.o cpphash.o \
1638 cppalloc.o cpperror.o cppexp.o version.o
$(LIBS
)
1640 cpplib.o
: cpplib.c
$(CONFIG_H
) cpplib.h cpphash.h config.status
1641 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1642 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1643 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1644 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1645 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1646 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1647 -c
`echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1649 cpperror.o
: cpperror.c
$(CONFIG_H
) cpplib.h
1651 cppexp.o
: cppexp.c
$(CONFIG_H
) cpplib.h
1653 cpphash.o
: cpphash.c cpplib.h cpphash.h
1655 cppalloc.o
: cppalloc.c
$(CONFIG_H
)
1657 # Note for the stamp targets, we run the program `true' instead of
1658 # having an empty command (nothing following the semicolon).
1660 proto
: config.status protoize unprotoize SYSCALLS.c.X
1662 protoize
: protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1663 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1664 protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1665 protoize.o
: stamp-proto
; @true
1667 unprotoize
: unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1668 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o
$@ \
1669 unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
)
1670 unprotoize.o
: stamp-proto
; @true
1672 stamp-proto
: protoize.c getopt.h
$(CONFIG_H
)
1673 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1674 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1675 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1676 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1677 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1678 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1679 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1680 -DUNPROTOIZE
$(srcdir)/protoize.c
1681 mv protoize
$(objext
) unprotoize
$(objext
)
1682 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1683 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1684 -DGPLUSPLUS_INCLUDE_DIR
=\"$(gxx_include_dir
)\" \
1685 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1686 -DTOOL_INCLUDE_DIR
=\"$(tooldir
)/include\" \
1687 -DLOCAL_INCLUDE_DIR
=\"$(includedir)\" \
1688 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1689 $(srcdir)/protoize.c
1692 getopt.o
: getopt.c getopt.h
1693 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1694 getopt1.o
: getopt1.c getopt.h
1695 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1697 # This info describes the target machine, so compile with GCC just built.
1698 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
) \
1700 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1701 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1702 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1703 -aux-info
$@
-S
-o tmp-SYSCALLS.s SYSCALLS.c
1704 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1707 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1708 -rm -f tmp-proto.
[cso
]
1709 cp
$(srcdir)/protoize.c tmp-proto.c
1710 chmod u
+w tmp-proto.c
1711 .
/protoize
-N
-B .
/ -x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1712 $(CFLAGS) $(INCLUDES) \
1713 -DGCC_INCLUDE_DIR=0 \
1714 -DGPLUSPLUS_INCLUDE_DIR=0 \
1715 -DCROSS_INCLUDE_DIR=0 \
1716 -DTOOL_INCLUDE_DIR=0 \
1717 -DSTD_PROTO_DIR=0" tmp-proto.c
1718 @echo
'**********' Expect
400 lines of differences.
1719 -diff
$(srcdir)/protoize.c tmp-proto.c
> tmp-proto.diff
1720 -wc
-l tmp-proto.diff
1721 .
/unprotoize
-N
-x getopt.h
-c
"-B./ -Wall -Wwrite-strings \
1722 $(CFLAGS) $(INCLUDES) \
1723 -DGCC_INCLUDE_DIR=0 \
1724 -DGPLUSPLUS_INCLUDE_DIR=0 \
1725 -DCROSS_INCLUDE_DIR=0 \
1726 -DTOOL_INCLUDE_DIR=0 \
1727 -DSTD_PROTO_DIR=0" tmp-proto.c
1728 @echo Expect zero differences.
1729 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1730 -rm -f tmp-proto.
[cs
] tmp-proto
$(objext
)
1732 # Build the include directory. The stamp files are stmp-* rather than
1733 # stamp-* so that mostlyclean does not force the include directory to
1736 # Build the include directory except for float.h (which depends upon
1738 stmp-int-hdrs
: stmp-fixinc
$(USER_H
) xlimits.h objc-headers
1739 # Copy in the headers provided with gcc.
1740 # The sed command gets just the last file name component;
1741 # this is necessary because VPATH could add a dirname.
1742 # Using basename would be simpler, but some systems don't have it.
1745 for file in ..
$(USER_H
); do \
1746 if
[ X
$$file != X..
]; then \
1747 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1748 rm -f
$$objdir/include/$$realfile; \
1749 cp ginclude
/$$realfile $$objdir/include; \
1750 chmod a
+r
$$objdir/include/$$realfile; \
1753 rm -f
include/limits.h
1754 cp xlimits.h
include/limits.h
1755 chmod a
+r
include/limits.h
1756 # Install the README
1757 rm -f
include/README
1758 cp
$(srcdir)/README-fixinc
include/README
1759 chmod a
+r
include/README
1762 # Build the complete include directory.
1763 stmp-headers
: stmp-int-hdrs gfloat.h
1764 rm -f
include/float.h
1765 cp gfloat.h
include/float.h
1766 chmod a
+r
include/float.h
1769 # Build fixed copies of system files.
1770 stmp-fixinc
: $(FIXINCLUDES
) gsyslimits.h
1773 if
[ x
$(FIXINCLUDES
) != xMakefile.in
]; \
1775 for
dir in
$(SYSTEM_HEADER_DIR
) $(OTHER_FIXINCLUDES_DIRS
); do \
1778 $(SHELL
) $(srcdir)/$(FIXINCLUDES
) include $$dir; \
1783 rm -f
include/syslimits.h
1784 if
[ -f
include/limits.h
]; then \
1785 mv
include/limits.h
include/syslimits.h
; \
1787 cp
$(srcdir)/gsyslimits.h
include/syslimits.h
; \
1789 chmod a
+r
include/syslimits.h
1792 # copy objc header files into build directory
1793 objc-headers
: stmp-fixinc
1794 if
[ -d
include ]; then true
; else mkdir
include; fi
1795 if
[ -d objc
]; then true
; else mkdir objc
; fi
1797 srcdir1
=`cd $(srcdir); pwd`; \
1799 $(MAKE
) -f
$${srcdir1}/objc
/Makefile copy-headers \
1800 srcdir=$${srcdir1} tooldir
=$(tooldir
) AR
="$(AR)" AR_FLAGS
="$(AR_FLAGS)" \
1801 GCC_FOR_TARGET
="$${thisdir1}/xgcc -B$${thisdir1}/" \
1802 GCC_CFLAGS
="$(GCC_CFLAGS)" incinstalldir
=$${thisdir1}/include
1805 # Files related to the fixproto script.
1807 deduced.h
: $(GCC_PASSES
) $(srcdir)/scan-types.sh stmp-int-hdrs
1808 CC
="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1810 $(SHELL
) $(srcdir)/scan-types.sh
"$(srcdir)" >tmp-deduced.h
1811 mv tmp-deduced.h deduced.h
1813 gen-protos
: gen-protos.o scan.o cppalloc.o
$(HOST_LIBDEPS
)
1814 ${HOST_CC} $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ \
1815 gen-protos.o scan.o cppalloc.o
$(HOST_LIBS
)
1817 gen-protos.o
: gen-protos.c scan.h
$(build_xm_file
)
1818 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gen-protos.c
1820 scan.o
: scan.c scan.h
$(build_xm_file
)
1821 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan.c
1823 xsys-protos.h
: $(GCC_PASSES
) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1824 cat deduced.h
$(srcdir)/sys-protos.h
> tmp-fixtmp.c
1825 mv tmp-fixtmp.c fixtmp.c
1826 $(GCC_FOR_TARGET
) fixtmp.c
-w
-U__SIZE_TYPE__
-U__PTRDIFF_TYPE__
-U__WCHAR_TYPE__
-E \
1827 | sed
-e
's/ / /g' -e
's/ *(/ (/g' -e
's/ [ ]*/ /g' -e
's/( )/()/' \
1828 | .
/gen-protos
>xsys-protos.hT
1829 mv xsys-protos.hT xsys-protos.h
1832 fix-header
: fix-header.o scan-decls.o scan.o xsys-protos.h
$(HOST_LIBDEPS
) \
1833 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1834 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o
$@ fix-header.o \
1835 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1836 cppexp.o
$(HOST_LIBS
)
1838 fix-header.o
: fix-header.c obstack.h scan.h xsys-protos.h
$(build_xm_file
)
1839 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/fix-header.c
1841 scan-decls.o
: scan-decls.c scan.h cpplib.h
$(build_xm_file
)
1842 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/scan-decls.c
1844 # stmp-fixproto depends on this, not on fix-header directly.
1845 # The idea is to make sure fix-header gets built,
1846 # but not rerun fixproto after each stage
1847 # just because fix-header's mtime has changed.
1848 fixhdr.ready
: fix-header
1849 -if
[ -f fixhdr.ready
] ; then \
1852 touch fixhdr.ready
; \
1855 # stmp-headers is to make sure fixincludes has already finished.
1856 # The if statement is so that we don't run fixproto a second time
1857 # if it has already been run on the files in `include'.
1858 stmp-fixproto
: fixhdr.ready fixproto stmp-headers
1859 @echo
"Various warnings and error messages from fixproto are normal"
1860 -if
[ -d
include ] ; then true
; else mkdir
include; fi
1861 -if
[ -f
include/fixed
] ; then true
; \
1863 : This line works around a
'make' bug in BSDI
1.1.
; \
1864 FIXPROTO_DEFINES
="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES
; \
1865 $(SHELL
) ${srcdir}/fixproto
include include $(SYSTEM_HEADER_DIR
); \
1866 touch
include/fixed
; \
1870 # Remake the info files.
1873 info: $(srcdir)/cpp.
info $(srcdir)/gcc.
info lang.
info
1875 $(srcdir)/cpp.
info: cpp.texi
1876 cd
$(srcdir); $(MAKEINFO
) cpp.texi
1878 $(srcdir)/gcc.
info: gcc.texi extend.texi
install.texi invoke.texi \
1879 md.texi rtl.texi tm.texi
1880 cd
$(srcdir); $(MAKEINFO
) gcc.texi
1882 dvi: $(srcdir)/gcc.
dvi $(srcdir)/cpp.
dvi lang.
dvi
1884 # This works with GNU Make's default rule.
1885 $(srcdir)/gcc.
dvi: gcc.texi extend.texi
install.texi invoke.texi \
1886 md.texi rtl.texi tm.texi
1889 # This works with GNU Make's default rule.
1890 $(srcdir)/cpp.
dvi: cpp.texi
1893 $(srcdir)/INSTALL
: install1.texi
install.texi
1894 $(MAKEINFO
) -D INSTALLONLY
--no-header
--no-split \
1895 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
1897 # Deletion of files made during compilation.
1898 # There are four levels of this:
1899 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
1900 # `mostlyclean' is useful while working on a particular type of machine.
1901 # It deletes most, but not all, of the files made by compilation.
1902 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1903 # `clean' deletes everything made by running `make all'.
1904 # `distclean' also deletes the files made by config.
1905 # `maintainer-clean' also deletes everything that could be regenerated
1906 # automatically. We remove as much from the language subdirectories as we can
1907 # (less duplicated code).
1910 mostlyclean: bytecode.
mostlyclean lang.
mostlyclean
1911 -rm -f
$(STAGESTUFF
)
1912 # Clean the objc subdir if we created one.
1913 if
[ -d objc
]; then \
1914 srcdir1
=`cd $(srcdir); pwd`; \
1915 cd objc
; $(MAKE
) -f
$$srcdir1/objc
/Makefile
mostlyclean; \
1918 # Delete the temporary source copies for cross compilation.
1919 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
1920 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
1921 -rm -f
$(HOST_PREFIX_1
)obstack.c
1922 # Delete the temp files made in the course of building libgcc.a.
1923 -rm -f tmplibgcc
* tmpcopy xlimits.h
1924 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
1925 # Delete other temporary files.
1926 -rm -f tmp-float.h tmp-gcc.xtar.gz
1927 -rm -f tmp-foo1 tmp-foo2 tmp-proto.
* tmp-unproto
.1 tmp-SYSCALLS.s
1928 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
1929 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
1930 -rm -f tmp-fixtmp.c xsys-protos.hT
1931 # Delete the stamp files.
1932 -rm -f stamp-
* tmp-
*
1933 -rm -f
*/stamp-
* */tmp-
*
1934 # Delete debugging dump files.
1935 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
1936 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
1937 -rm -f
*/*.greg
*/*.lreg
*/*.combine
*/*.flow
*/*.cse
*/*.jump
*/*.rtl
1938 -rm -f
*/*.tree
*/*.loop
*/*.dbr
*/*.jump2
*/*.sched
*/*.cse2
1939 -rm -f
*/*.sched2
*/*.stack
1940 # Delete some files made during installation.
1941 -rm -f specs gfloat.h float.h-
* enquire SYSCALLS.c.X SYSCALLS.c
1942 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
1943 # Delete files generated for fixproto
1944 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
1945 gen-protos fixproto.list fixtmp.
* fixhdr.ready
1946 # Delete unwanted output files from TeX.
1947 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
1948 -rm -f
*/*.toc
*/*.log
*/*.vr
*/*.fn
*/*.cp
*/*.tp
*/*.ky
*/*.pg
1949 # Delete sorted indices we don't actually use.
1950 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1951 # Delete core dumps.
1954 # Delete all files made by compilation
1955 # that don't exist in the distribution.
1956 clean: mostlyclean bytecode.
clean lang.
clean
1957 # It may not be quite desirable to delete unprotoize.c here,
1958 # but the spec for `make clean' requires it.
1959 # Using unprotoize.c is not quite right in the first place,
1960 # but what better way is there?
1961 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
1965 -if
[ -f md.pre-cpp
]; then \
1968 # Delete the include directory.
1969 -rm -rf stmp-
* include objc-headers
1971 # Delete files used by the "multilib" facility (including libgcc subdirs).
1972 -rm -f multilib.h tmpmultilib
*
1973 -if
[ "x$(MULTILIB_DIRNAMES)" != x
] ; then \
1974 rm -rf
$(MULTILIB_DIRNAMES
); \
1975 else if
[ "x$(MULTILIB_OPTIONS)" != x
] ; then \
1976 rm -rf
`echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
1979 # Delete all files that users would normally create
1980 # while building and installing GCC.
1981 distclean: clean bytecode.
distclean lang.
distclean
1982 -rm -f tm.h config.h tconfig.h hconfig.h md
1983 -rm -f config.status config.run
1984 -rm -f Makefile specs.h options.h
*.oaux
1985 -rm -fr stage1 stage2 stage3 stage4
1986 -rm -f
*/stage1
*/stage2
*/stage3
*/stage4
*/include
1987 -rm -f objc-parse.output
1988 -rm -f c-parse.output
1992 # Delete anything likely to be found in the source directory
1993 # that shouldn't be in the distribution.
1994 extraclean
: distclean lang.extraclean
1995 -rm -rf
=* .
/"#"* *~
* config
/=* config
/"#"* config
/*~
*
1996 -rm -f patch
* *.orig
*.rej config
/patch
* config
/*.orig config
/*.rej
1997 -rm -f config
/*/=* config
/*/"#"* config
/*/*~
*
1998 -rm -f config
/*/*.orig config
/*/*.rej
1999 -rm -f
*.
dvi *.ps
*.oaux
*.d
*.
[zZ
] *.gz
2000 -rm -f
*.
tar *.xtar
*diff
*.diff.
* *.
tar.
* *.xtar.
* *diffs
2001 -rm -f
*lose config
/*lose config
/*/*lose
2002 -rm -f
*.s
*.s
[0-9] *.i install1.texi config
/ChangeLog
2003 -rm -f
*/=* */"#"* */*~
*
2004 -rm -f
*/patch
* */*.orig
*/*.rej
2005 -rm -f
*/*.
dvi */*.oaux
*/*.d
*/*.
[zZ
] */*.gz
2006 -rm -f
*/*.
tar */*.xtar
*/*diff
*/*.diff.
* */*.
tar.
* */*.xtar.
* */*diffs
2007 -rm -f
*/*lose
*/*.s
*/*.s
[0-9] */*.i
2009 # Get rid of every file that's generated from some other file.
2010 # Most of these files ARE PRESENT in the GCC distribution.
2011 maintainer-clean
: distclean bytecode.maintainer-clean lang.maintainer-clean
2012 -rm -f c-parse.y c-gperf.h objc-parse.y
2013 -rm -f objc-parse.c objc-parse.output
2014 -rm -f c-parse.c c-parse.h c-parse.output
2015 -rm -f cexp.c cexp.output TAGS
2016 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
2017 -rm -f gcc.
info* gcc.??s gcc.
*aux
2019 # Entry points `install' and `uninstall'.
2020 # Also use `install-collect2' to install collect2 when the config files don't.
2022 # The semicolon is to prevent the install.sh -> install default rule
2023 # from doing anything. Having it run true helps avoid problems and
2024 # noise from versions of make which don't like to have null commands.
2025 install: $(INSTALL_TARGET
) ; @true
2027 # Copy the compiler files into directories where they will be run.
2028 # Install the driver last so that the window when things are
2030 install-normal
: install-common
$(INSTALL_HEADERS
) $(INSTALL_LIBGCC
) \
2031 install-libobjc install-man install-info lang.install-normal install-driver
2033 # Do nothing while making gcc with a cross-compiler. The person who
2034 # makes gcc for the target machine has to know how to put a complete
2035 # gcc together by hand.
2036 install-build
: force
2037 @echo You have to
install gcc on your target machine by hand.
2039 # Run this on the target machine
2040 # to finish installation of cross compiler.
2041 install-cross-rest
: install-float-h-cross
2043 # Install float.h for cross compiler.
2044 # Run this on the target machine!
2045 install-float-h-cross
: install-dir
2046 # if [ -f enquire ] ; then true; else false; fi
2047 # Note: don't use -. We should fail right away if enquire was not made.
2048 .
/enquire
-f
> $(tmpdir
)/float.h
2049 -rm -f
$(libsubdir
)/include/float.h
2050 $(INSTALL_DATA
) $(tmpdir
)/float.h
$(libsubdir
)/include/float.h
2051 -rm -f
$(tmpdir
)/float.h
2052 chmod a-x
$(libsubdir
)/include/float.h
2054 # Create the installation directory.
2056 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; chmod a
+rx
$(libdir) ; fi
2057 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; chmod a
+rx
$(libdir)/gcc-lib
; fi
2058 # This dir isn't currently searched by cpp.
2059 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2060 -if
[ -d
$(libdir)/gcc-lib
/$(target
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
) ; chmod a
+rx
$(libdir)/gcc-lib
/$(target
) ; fi
2061 -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
2062 -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
2063 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; chmod a
+rx
$(bindir) ; fi
2064 -if
[ -d
$(includedir) ] ; then true
; else mkdir
$(includedir) ; chmod a
+rx
$(includedir) ; fi
2065 -if
[ -d
$(tooldir
) ] ; then true
; else mkdir
$(tooldir
) ; chmod a
+rx
$(tooldir
) ; fi
2066 -if
[ -d
$(assertdir
) ] ; then true
; else mkdir
$(assertdir
) ; chmod a
+rx
$(assertdir
) ; fi
2067 -if
[ -d
$(infodir) ] ; then true
; else mkdir
$(infodir) ; chmod a
+rx
$(infodir) ; fi
2068 # We don't use mkdir -p to create the parents of mandir,
2069 # because some systems don't support it.
2070 # Instead, we use this technique to create the immediate parent of mandir.
2071 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2072 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; chmod a
+rx
$$parent ; fi
2073 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; chmod a
+rx
$(mandir) ; fi
2075 # Install the compiler executables built during cross compilation.
2076 install-common
: native install-dir
$(EXTRA_PARTS
) lang.install-common
2077 for file in
$(COMPILERS
); do \
2078 if
[ -f
$$file ] ; then \
2079 rm -f
$(libsubdir
)/$$file; \
2080 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2084 for file in
$(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
2085 if
[ x
"$$file" != x..
]; then \
2086 rm -f
$(libsubdir
)/$$file; \
2087 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
2090 for file in
$(EXTRA_PARTS
) ..
; do \
2091 if
[ x
"$$file" != x..
]; then \
2092 rm -f
$(libsubdir
)/$$file; \
2093 $(INSTALL_DATA
) $$file $(libsubdir
)/$$file; \
2096 # Don't mess with specs if it doesn't exist yet.
2097 -if
[ -f specs
] ; then \
2098 rm -f
$(libsubdir
)/specs
; \
2099 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
; \
2101 # Install protoize if it was compiled.
2102 -if
[ -f protoize
$(exeext
) ]; \
2104 rm -f
$(bindir)/protoize
$(exeext
); \
2105 $(INSTALL_PROGRAM
) protoize
$(exeext
) $(bindir)/protoize
$(exeext
); \
2106 rm -f
$(bindir)/unprotoize
$(exeext
); \
2107 $(INSTALL_PROGRAM
) unprotoize
$(exeext
) $(bindir)/unprotoize
$(exeext
); \
2108 rm -f
$(libsubdir
)/SYSCALLS.c.X
; \
2109 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
; \
2110 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
; \
2112 -rm -f
$(libsubdir
)/cpp$(exeext
)
2113 $(INSTALL_PROGRAM
) cpp$(exeext
) $(libsubdir
)/cpp$(exeext
)
2115 # Install the driver program as $(target)-gcc
2116 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2117 install-driver
: xgcc
2118 -if
[ -f gcc-cross
$(exeext
) ] ; then \
2119 rm -f
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2120 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(bindir)/$(GCC_CROSS_NAME
)$(exeext
); \
2121 if
[ -d
$(tooldir
)/bin
/.
] ; then \
2122 rm -f
$(tooldir
)/bin
/gcc
$(exeext
); \
2123 $(INSTALL_PROGRAM
) gcc-cross
$(exeext
) $(tooldir
)/bin
/gcc
$(exeext
); \
2126 rm -f
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2127 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(bindir)/$(GCC_INSTALL_NAME
)$(exeext
); \
2128 rm -f
$(bindir)/$(target
)-gcc-1
$(exeext
); \
2129 ln
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
) \
2131 || cp
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
) $(bindir)/$(target
)-gcc-1
$(exeext
); \
2132 mv
$(bindir)/$(target
)-gcc-1
$(exeext
) $(bindir)/$(target
)-gcc
$(exeext
); \
2135 # Install the info files.
2136 install-info
: doc install-dir lang.install-info
2137 -rm -f
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2138 cd
$(srcdir); for f in
cpp.
info* gcc.
info*; \
2139 do
$(INSTALL_DATA
) $$f $(infodir)/$$f; done
2140 -chmod a-x
$(infodir)/cpp.
info* $(infodir)/gcc.
info*
2142 # Install the man pages.
2143 install-man
: install-dir
$(srcdir)/gcc
.1 $(srcdir)/cccp
.1 lang.install-man
2144 -if
[ -f gcc-cross
] ; then \
2145 rm -f
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2146 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2147 chmod a-x
$(mandir)/$(GCC_CROSS_NAME
)$(manext); \
2149 rm -f
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2150 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2151 chmod a-x
$(mandir)/$(GCC_INSTALL_NAME
)$(manext); \
2153 -rm -f
$(mandir)/cccp
$(manext)
2154 -$(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
2155 -chmod a-x
$(mandir)/cccp
$(manext)
2157 # Install the library.
2158 install-libgcc
: libgcc.a install-dir
2159 -if
[ -f libgcc.a
] ; then \
2160 rm -f
$(libsubdir
)/libgcc.a
; \
2161 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
2162 if
$(RANLIB_TEST
) ; then \
2163 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
2164 chmod a-x
$(libsubdir
)/libgcc.a
; \
2167 # Install multiple versions of libgcc.a.
2168 install-multilib
: stmp-multilib install-dir
2169 for i in
`$(GCC_FOR_TARGET) --print-multi-lib`; do \
2170 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2171 if
[ -d
$(libsubdir
)/$${dir} ]; then true
; else mkdir
$(libsubdir
)/$${dir}; fi
; \
2172 rm -f
$(libsubdir
)/$${dir}/libgcc.a
; \
2173 $(INSTALL_DATA
) $${dir}/libgcc.a
$(libsubdir
)/$${dir}/libgcc.a
; \
2174 if
$(RANLIB_TEST
); then \
2175 (cd
$(libsubdir
)/$${dir}; $(RANLIB
) libgcc.a
); else true
; fi
; \
2176 chmod a-x
$(libsubdir
)/$${dir}/libgcc.a
; \
2179 # Install the objc run time library.
2180 install-libobjc
: install-dir
2181 -if
[ -f libobjc.a
] ; then \
2182 rm -f
$(libsubdir
)/libobjc.a
; \
2183 $(INSTALL_DATA
) libobjc.a
$(libsubdir
)/libobjc.a
; \
2184 if
$(RANLIB_TEST
) ; then \
2185 (cd
$(libsubdir
); $(RANLIB
) libobjc.a
); else true
; fi
; \
2186 chmod a-x
$(libsubdir
)/libobjc.a
; \
2189 # Install all the header files built in the include subdirectory.
2190 install-headers
: install-include-dir
$(INSTALL_HEADERS_DIR
) $(INSTALL_ASSERT_H
)
2191 # Fix symlinks to absolute paths in the installed include directory to
2192 # point to the installed directory, not the build directory.
2193 -files
=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2194 if
[ $$?
-eq
0 ]; then \
2195 dir=`cd include; pwd`; \
2196 for i in
$$files; do \
2197 dest
=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2198 if expr
"$$dest" : "$$dir.*" > /dev
/null
; then \
2199 rm -f
$(libsubdir
)/include/$$i; \
2200 ln
-s
`echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir
)/include/$$i; \
2205 # Create or recreate the gcc private include file directory.
2206 install-include-dir
: install-dir
2207 -rm -rf
$(libsubdir
)/include
2208 mkdir
$(libsubdir
)/include
2209 -chmod a
+rx
$(libsubdir
)/include
2211 # Install the include directory using tar.
2212 install-headers-tar
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2214 tar -cf
- .
; exit
0) |
(cd
$(libsubdir
)/include; tar $(TAROUTOPTS
) - )
2215 # /bin/sh on some systems returns the status of the first tar,
2216 # and that can lose with GNU tar which always writes a full block.
2217 # So use `exit 0' to ignore its exit status.
2219 # Install the include directory using cpio.
2220 install-headers-cpio
: stmp-headers
$(STMP_FIXPROTO
) install-include-dir
2221 (cd
include; find .
-print) |
(cd
include; cpio
-pdum
$(libsubdir
)/include)
2223 # Put assert.h where it won't override GNU libc's assert.h.
2224 # It goes in a dir that is searched after GNU libc's headers;
2225 # thus, the following conditionals are no longer needed.
2226 # But it's not worth deleting them now.
2227 ## Don't replace the assert.h already there if it is not from GCC.
2228 ## This code would be simpler if it tested for -f ... && ! grep ...
2229 ## but supposedly the ! operator is missing in sh on some systems.
2230 install-assert-h
: assert.h install-dir
2231 if
[ -f
$(assertdir
)/assert.h
]; \
2233 if grep
"__eprintf" $(assertdir
)/assert.h
>/dev
/null
; \
2235 rm -f
$(assertdir
)/assert.h
; \
2236 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2237 chmod a-x
$(assertdir
)/assert.h
; \
2241 rm -f
$(assertdir
)/assert.h
; \
2242 $(INSTALL_DATA
) $(srcdir)/assert.h
$(assertdir
)/assert.h
; \
2243 chmod a-x
$(assertdir
)/assert.h
; \
2246 # Use this target to install the program `collect2' under the name `ld'.
2247 install-collect2
: collect2 install-dir
2248 $(INSTALL_PROGRAM
) collect2
$(exeext
) $(libsubdir
)/ld$(exeext
)
2249 # Install the driver program as $(libsubdir)/gcc for collect2.
2250 $(INSTALL_PROGRAM
) xgcc
$(exeext
) $(libsubdir
)/gcc
$(exeext
)
2252 # Cancel installation by deleting the installed files.
2253 uninstall: lang.
uninstall
2254 -rm -rf
$(libsubdir
)
2255 -rm -rf
$(bindir)/$(GCC_INSTALL_NAME
)$(exeext
)
2256 -rm -rf
$(bindir)/$(GCC_CROSS_NAME
)$(exeext
)
2257 -rm -rf
$(bindir)/protoize
$(exeext
)
2258 -rm -rf
$(bindir)/unprotoize
$(exeext
)
2259 -rm -rf
$(mandir)/$(GCC_INSTALL_NAME
)$(manext)
2260 -rm -rf
$(mandir)/$(GCC_CROSS_NAME
)$(manext)
2261 -rm -rf
$(mandir)/cccp
$(manext)
2262 -rm -rf
$(mandir)/protoize
$(manext)
2263 -rm -rf
$(mandir)/unprotoize
$(manext)
2265 # These exist for maintenance purposes.
2267 # Update the tags table.
2271 mv
-f c-parse.
[ch
] objc-parse.c cexp.c
=*.
[chy
] temp
; \
2272 etags
*.y
*.h
*.c
; \
2276 # Create the distribution tar file.
2277 #dist: gcc-$(version).tar.gz
2280 gcc.xtar.gz
: gcc.xtar
2281 gzip
--best
< gcc.xtar
> tmp-gcc.xtar.gz
2282 mv tmp-gcc.xtar.gz gcc.xtar.gz
2284 #gcc-$(version).tar.gz: gcc-$(version).tar
2285 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2287 #gcc-$(version).tar:
2289 # Make the distribution.
2290 tar -chf gcc.xtar gcc-
$(version
)
2292 # This target exists to do the initial work before the language specific
2294 distdir-start
: doc
$(srcdir)/INSTALL
$(srcdir)/c-parse.y
$(srcdir)/c-gperf.h \
2295 $(srcdir)/objc-parse.y
$(srcdir)/c-parse.c
$(srcdir)/objc-parse.c \
2297 @if grep
-s
"for version ${mainversion}" gcc.texi
> /dev
/null
; \
2299 else echo
"You must update the version number in \`gcc.texi'"; sleep
10;\
2301 # Update the version number in README
2302 awk
'$$1 " " $$2 " " $$3 == "This directory contains" \
2303 { $$6 = version; print $$0 } \
2304 $$1 " " $$2 " " $$3 != "This directory contains"' \
2305 version
=$(version
) README
> tmp.README
2306 mv tmp.README README
2307 -rm -rf gcc-
$(version
) tmp
2308 # Put all the files in a temporary subdirectory
2309 # which has the name that we want to have in the tar file.
2314 for file in
*[0-9a-zA-Z
+]; do \
2315 ln
$$file tmp
> /dev
/null
2>&1 || cp
$$file tmp
; \
2318 for file in
*[0-9a-zA-Z
+]; do \
2319 if
test -d
$$file && test "$$file" != RCS
; then \
2320 mkdir ..
/tmp
/config
/$$file; \
2322 for subfile in
*[0-9a-zA-Z
+]; do \
2323 ln
$$subfile ..
/..
/tmp
/config
/$$file >/dev
/null
2>&1 \
2324 || cp
$$subfile ..
/..
/tmp
/config
/$$file; \
2328 ln
$$file ..
/tmp
/config
>/dev
/null
2>&1 \
2329 || cp
$$file ..
/tmp
/config
; \
2333 for file in
*[0-9a-zA-Z
+]; do \
2334 ln
$$file ..
/tmp
/ginclude
>/dev
/null
2>&1 \
2335 || cp
$$file ..
/tmp
/ginclude
; \
2338 for file in
*[0-9a-zA-Z
+]; do \
2339 ln
$$file ..
/tmp
/objc
>/dev
/null
2>&1 || cp
$$file ..
/tmp
/objc
; \
2343 # Finish making `distdir', after the languages have done their thing.
2345 mv tmp gcc-
$(version
)
2346 # Get rid of everything we don't want in the distribution. We'd want
2347 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2349 cd gcc-
$(version
); make extraclean
2351 distdir
: distdir-start lang.distdir distdir-finish
2353 # make diff oldversion=M.N
2354 # creates a diff file between an older distribution and this one.
2355 # The -P option assumes this is GNU diff.
2357 diff
-rc2P
-x c-parse.y
-x c-parse.c
-x c-parse.h
-x c-gperf.h \
2358 -x cexp.c
-x bi-parser.c
-x objc-parse.y
-x objc-parse.c \
2360 -x
"gcc.??" -x
"gcc.??s" -x gcc.aux
-x
"gcc.info*" \
2361 -x
"cpp.??" -x
"cpp.??s" -x
cpp.aux
-x
"cpp.info*" \
2362 $(LANG_DIFF_EXCLUDES
) \
2363 gcc-
$(oldversion
) gcc-
$(version
) > diffs
2366 # Only build the C compiler for stage1, because that is the only one that
2367 # we can guarantee will build with the native compiler, and also it is the
2368 # only thing useful for building stage2.
2369 $(MAKE
) CC
="$(CC)" libdir=$(libdir) LANGUAGES
=c
2371 # This used to define ALLOCA as empty, but that would lead to bad results
2372 # for a subsequent `make install' since that would not have ALLOCA empty.
2373 # To prevent `make install' from compiling alloca.o and then relinking cc1
2374 # because alloca.o is newer, we permit these recursive makes to compile
2375 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2376 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2378 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2381 $(MAKE
) CC
="stage1/xgcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage1
/ LANGUAGES
="$(LANGUAGES)"
2383 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2386 $(MAKE
) CC
="stage2/xgcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" LDFLAGS
="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX
=stage2
/ LANGUAGES
="$(LANGUAGES)"
2388 # Compare the object files in the current directory with those in the
2391 # ./ avoids bug in some versions of tail.
2393 for file in
*$(objext
); do \
2394 tail
+16c .
/$$file > tmp-foo1
; \
2395 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2396 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2398 for
dir in tmp-foo
$(SUBDIRS
); do \
2399 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2400 for file in
$$dir/*$(objext
); do \
2401 tail
+16c .
/$$file > tmp-foo1
; \
2402 tail
+16c stage2
/$$file > tmp-foo2
2>/dev
/null \
2403 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2409 # Similar, but compare with stage3 directory
2411 for file in
*$(objext
); do \
2412 tail
+16c .
/$$file > tmp-foo1
; \
2413 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2414 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2416 for
dir in tmp-foo
$(SUBDIRS
); do \
2417 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2418 for file in
$$dir/*$(objext
); do \
2419 tail
+16c .
/$$file > tmp-foo1
; \
2420 tail
+16c stage3
/$$file > tmp-foo2
2>/dev
/null \
2421 && (cmp tmp-foo1 tmp-foo2 || echo
$$file differs
) || true
; \
2427 # Compare the object files in the current directory with those in the
2428 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2429 # running tail and the overhead of twice copying each object file.
2432 for file in
*$(objext
); do \
2433 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2435 for
dir in tmp-foo
$(SUBDIRS
); do \
2436 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2437 for file in
$$dir/*$(objext
); do \
2438 cmp
--ignore-initial
=16 $$file stage2
/$$file || true
; \
2443 # Similar, but compare with stage3 directory
2445 for file in
*$(objext
); do \
2446 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2448 for
dir in tmp-foo
$(SUBDIRS
); do \
2449 if
[ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2450 for file in
$$dir/*$(objext
); do \
2451 cmp
--ignore-initial
=16 $$file stage3
/$$file || true
; \
2456 # Copy the object files from a particular stage into a subdirectory.
2458 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
2459 -for
dir in .
$(SUBDIRS
) ; \
2461 if
[ -d stage1
/$$dir ] ; then true
; else mkdir stage1
/$$dir ; fi
; \
2463 -mv
$(STAGESTUFF
) stage1
2464 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2465 # dir will work properly.
2466 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage1 || cp
as$(exeext
) stage1
; else true
; fi
2467 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage1 || cp
ld$(exeext
) stage1
; else true
; fi
2468 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage1 || cp collect-ld
$(exeext
) stage1
; else true
; fi
2469 -rm -f stage1
/libgcc.a
2471 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
2472 stage1
: force stage1-start lang.stage1
2475 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
2476 -for
dir in .
$(SUBDIRS
) ; \
2478 if
[ -d stage2
/$$dir ] ; then true
; else mkdir stage2
/$$dir ; fi
; \
2480 -mv
$(STAGESTUFF
) stage2
2481 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2482 # dir will work properly.
2483 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage2 || cp
as$(exeext
) stage2
; else true
; fi
2484 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage2 || cp
ld$(exeext
) stage2
; else true
; fi
2485 -if
[ -f collect-ld
] ; then ln
-s ..
/collect-ld
$(exeext
) stage2 || cp collect-ld
$(exeext
) stage2
; else true
; fi
2486 -rm -f stage2
/libgcc.a
2488 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
2489 stage2
: force stage2-start lang.stage2
2492 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
2493 -for
dir in .
$(SUBDIRS
) ; \
2495 if
[ -d stage3
/$$dir ] ; then true
; else mkdir stage3
/$$dir ; fi
; \
2497 -mv
$(STAGESTUFF
) stage3
2498 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2499 # dir will work properly.
2500 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage3 || cp
as$(exeext
) stage3
; else true
; fi
2501 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage3 || cp
ld$(exeext
) stage3
; else true
; fi
2502 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage3 || cp collect-ld
$(exeext
) stage3
; else true
; fi
2503 -rm -f stage3
/libgcc.a
2505 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
2506 stage3
: force stage3-start lang.stage3
2509 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
2510 -for
dir in .
$(SUBDIRS
) ; \
2512 if
[ -d stage4
/$$dir ] ; then true
; else mkdir stage4
/$$dir ; fi
; \
2514 -mv
$(STAGESTUFF
) stage4
2515 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2516 # dir will work properly.
2517 -if
[ -f
as$(exeext
) ] ; then ln
-s ..
/as$(exeext
) stage4 || cp
as$(exeext
) stage4
; else true
; fi
2518 -if
[ -f
ld$(exeext
) ] ; then ln
-s ..
/ld$(exeext
) stage4 || cp
ld$(exeext
) stage4
; else true
; fi
2519 -if
[ -f collect-ld
$(exeext
) ] ; then ln
-s ..
/collect-ld
$(exeext
) stage4 || cp collect-ld
$(exeext
) stage4
; else true
; fi
2520 -rm -f stage4
/libgcc.a
2522 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
2523 stage4
: force stage4-start lang.stage4
2525 # Copy just the executable files from a particular stage into a subdirectory,
2526 # and delete the object files. Use this if you're just verifying a version
2527 # that is pretty sure to work, and you are short of disk space.
2528 risky-stage1
: stage1
2531 risky-stage2
: stage2
2534 risky-stage3
: stage3
2537 risky-stage4
: stage4
2540 #In GNU Make, ignore whether `stage*' exists.
2541 .PHONY
: stage1 stage2 stage3 stage4
clean maintainer-clean TAGS bootstrap
2542 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4