1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 1988, 1990, 1991 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
6 #GNU CC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
11 #GNU CC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 # The targets for external use include:
21 # all, doc, proto, install, install-cross, install-cross-rest,
22 # uninstall, TAGS, mostlyclean, clean, distclean, realclean,
23 # stage1, stage2, stage3, stage4.
25 # Suppress smart makes who think they know how to automake Yacc files
28 .NOEXPORT
: # This tells GNU Make version 3
29 # not to put all the variables in the environment.
31 # Variables that exist for you to override.
32 # See below for how to change them for certain systems.
34 # Selection of languages to be made.
35 LANGUAGES
= c c
++ objective-c proto
38 ALLOCA_FLAGS
= -S
-Demacs
39 ALLOCA_FINISH
= as -o alloca.o alloca.s
41 # Various ways of specifying flags for compilations:
42 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
43 # BOOT_CFLAGS is the value of CFLAGS to pass
44 # to the stage2 and stage3 compilations
45 # XCFLAGS is used for most compilations but not when using the GCC just built.
48 BOOT_CFLAGS
= -O
$(CFLAGS
)
49 # These exists to be overridden by the x-* and t-* files, respectively.
63 # on sysV, define this as cp.
65 # These permit overriding just for certain files.
66 INSTALL_PROGRAM
= $(INSTALL
)
67 INSTALL_DATA
= $(INSTALL
)
70 # Define this as & to perform parallel make on a Sequent.
71 # Note that this has some bugs, and it seems currently necessary
72 # to compile all the gen* files first by hand to avoid erroneous results.
75 # How to invoke ranlib.
77 # Test to use to see whether ranlib exists on the system.
78 RANLIB_TEST
= [ -f
/usr
/bin
/ranlib
-o
-f
/bin
/ranlib
]
80 # Compiler to use for compiling libgcc1.a.
81 # OLDCC should not be the GNU C compiler,
82 # since that would compile typical libgcc1.a functions such as mulsi3
83 # into infinite recursions.
86 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
87 # NOTE: -O does not work on some Unix systems!
90 # Version of ar to use when compiling libgcc1.a.
93 # The GCC to use for compiling libgcc2.a. Usually the one we just built.
94 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
95 GCC_FOR_TARGET
= .
/gcc
97 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
98 # It omits XCFLAGS, and specifies -B./.
99 GCC_CFLAGS
=$(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) -B.
/
101 # Special flags for compiling enquire.
102 # We disable optimization to make floating point more reliable.
103 ENQUIRE_CFLAGS
= -DNO_SC
-DNO_MEM
-DNO_STDDEF
-O0
104 ENQUIRE_LDFLAGS
= $(LDFLAGS
)
106 # Tools to use when building a cross-compiler.
107 # These are used because `configure' appends `cross-make'
108 # to the makefile when making a cross-compiler.
110 TARGET_TOOLPREFIX
= $(tooldir
)/bin
/
111 AR_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ar
112 AR_FOR_TARGET_FLAGS
= rc
113 RANLIB_FOR_TARGET
= $(TARGET_TOOLPREFIX
)ranlib
114 RANLIB_TEST_FOR_TARGET
= [ -f
$(TARGET_TOOLPREFIX
)ranlib
]
117 target
= ...
`configure' substitutes actual target name here.
118 xmake_file= ... `configure
' substitutes actual x- file name here.
119 tmake_file= ... `configure' substitutes actual t- file name here.
120 version
=`awk '{printf "%s", substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c`
122 # Directory where sources are, from where we are.
124 # Common prefix for installation directories.
125 # NOTE: This directory must exist when you start installation.
127 # Directory in which to put host dependent programs and libraries
128 exec_prefix = $(prefix)
129 # Directory in which to put the executable for the command `gcc'
130 bindir = $(exec_prefix)/bin
131 # Directory in which to put the directories used by the compiler.
132 libdir = $(exec_prefix)/lib
133 # Directory in which the compiler finds executables, libraries, etc.
134 libsubdir
= $(libdir)/gcc-lib
/$(target
)/$(version
)
135 # Extension (if any) to put in installed man-page filename.
137 # Directory in which to put man pages.
138 mandir = $(prefix)/man
/man1
139 # Directory in which to find other cross-compilation tools and headers.
140 # Used in install-cross.
141 tooldir
= $(prefix)/$(target
)
143 # Additional system libraries to link with.
146 # Change this to a null string if obstacks are installed in the
150 # Specify the rule for actually making libgcc1.a.
151 # The value may be empty; that means to do absolutely nothing
152 # with or for libgcc1.a.
155 # Specify the rule for actually making libgcc2.a.
158 # Options to use when compiling libgcc2.a.
159 # -g1 causes output of debug info only for file-scope entities.
160 # we use this here because that should be enough, and also
161 # so that -g1 will be tested.
162 LIBGCC2_CFLAGS
= -O2
$(GCC_CFLAGS
) -g1
164 # List of extra executables that should be compiled for this target machine
165 # that are used for compiling from source code to object code.
166 # The rules for compiling them should be in the t-* file for the machine.
169 # Like EXTRA_PASSES, but these are used when linking.
172 # List of extra object files that should be compiled for this target machine.
173 # The rules for compiling them should be in the t-* file for the machine.
176 # List of extra object files that should be compiled and linked with
177 # compiler proper (cc1, cc1obj, cc1plus).
180 # Set this to `ld' to enable use of collect2.
182 # It is convenient for configure to add the assignment at the beginning,
183 # so don't override it here.
185 # List of extra C and assembler files to add to libgcc1.a.
186 # Assembler files should have names ending in `.asm'.
189 # List of extra C and assembler files to add to libgcc2.a.
190 # Assembler files should have names ending in `.asm'.
193 # Program to convert libraries.
196 # Control whether header files are installed.
197 # We will change this to install-fixincludes eventually.
198 # It would be useful for people to try this now.
199 INSTALL_HEADERS
=install-headers
201 # Select which version of fixincludes to use (I.E. regular versus SVR4)
202 FIXINCLUDES
=fixincludes
204 # List of things which should already be built whenever we try to use gcc
205 # to compile anything (without linking).
206 GCC_PASSES
=gcc cc1
cpp $(EXTRA_PASSES
)
208 # List of things which should already be built whenever we try to use gcc
210 GCC_PARTS
=$(GCC_PASSES
) libgcc.a
$(EXTRA_PROGRAMS
) $(USE_COLLECT2
) $(EXTRA_PARTS
)
212 # Change this to empty to prevent installing limits.h.
213 # Actually, this currently has no effect,
214 # and if that causes no problems, it can be deleted.
215 # Otherwise, it must be replaced so as to control
216 # the actions of install-limits-h.
219 # Directory to link to, when using the target `maketest'.
222 # Flags to use when cross-building GCC.
223 # Prefix to apply to names of object files when using them
224 # to run on the machine we are compiling on.
226 # Prefix to apply to names of object files when compiling them
227 # to run on the machine we are compiling on.
228 # The default for this variable is chosen to keep these rules
229 # out of the way of the other rules for compiling the same source files.
232 HOST_CFLAGS
=$(ALL_CFLAGS
)
234 HOST_LDFLAGS
=$(LDFLAGS
)
235 HOST_CPPFLAGS
=$(ALL_CPPFLAGS
)
236 HOST_ALLOCA
=$(ALLOCA
)
237 HOST_MALLOC
=$(MALLOC
)
238 HOST_OBSTACK
=$(OBSTACK
)
240 # Choose the real default target.
243 # Choose the real install target.
244 INSTALL_TARGET
=install-native
246 # End of variables for you to override.
248 # Definition of `all' is here so that new rules inserted by sed
249 # do not specify the default target.
250 # The real definition is under `all.internal' (for native compilers)
251 # or `all.cross' (for cross compilers).
254 # sed inserts variable overrides after the following line.
257 # Now figure out from those variables how to compile and link.
261 INTERNAL_CFLAGS
= $(CROSS
)
263 # This is the variable actually used when we compile.
264 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(X_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
) $(XCFLAGS
)
267 ALL_CPPFLAGS
= $(CPPFLAGS
) $(X_CPPFLAGS
) $(T_CPPFLAGS
)
269 # Even if ALLOCA is set, don't use it if compiling with GCC.
270 USE_ALLOCA
= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac `
271 USE_HOST_ALLOCA
= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
272 USE_HOST_MALLOC
= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
273 USE_HOST_OBSTACK
= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
275 # Dependency on obstack, alloca, malloc or whatever library facilities
276 # are not installed in the system libraries.
277 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
278 LIBDEPS
= $(OBSTACK
) $(ALLOCA
) $(MALLOC
)
280 # Likewise, for use in the tools that must run on this machine
281 # even if we are cross-building GCC.
282 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
283 HOST_LIBDEPS
= $(HOST_PREFIX
)$(HOST_OBSTACK
) $(HOST_PREFIX
)$(HOST_ALLOCA
) $(HOST_PREFIX
)$(HOST_MALLOC
)
285 # How to link with both our special library facilities
286 # and the system's installed libraries.
287 LIBS
= $(OBSTACK
) $(USE_ALLOCA
) $(MALLOC
) $(CLIB
)
289 # Likewise, for use in the tools that must run on this machine
290 # even if we are cross-building GCC.
291 HOST_LIBS
= $(USE_HOST_OBSTACK
) $(USE_HOST_ALLOCA
) $(USE_HOST_MALLOC
) \
294 HOST_RTL
= $(HOST_PREFIX
)rtl.o
295 HOST_RTLANAL
= $(HOST_PREFIX
)rtlanal.o
296 HOST_PRINT
= $(HOST_PREFIX
)print-rtl.o
298 # Specify the directories to be searched for header files.
299 # Both . and srcdir are used, in that order,
300 # so that tm.h and config.h will be found in the compilation
301 # subdirectory rather than in the source directory.
302 INCLUDES
= -I.
-I
$(srcdir) -I
$(srcdir)/config
303 SUBDIR_INCLUDES
= -I..
-I..
/$(srcdir) -I..
/$(srcdir)/config
305 # Always use -I$(srcdir)/config when compiling.
307 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $<
309 # This tells GNU make version 3 not to export all the variables
310 # defined in this file into the environment.
313 # Lists of files for various purposes.
315 # A list of all the language-specific executables.
316 COMPILERS
= cc1 cc1plus cc1obj
318 # Language-specific object files for C.
319 C_OBJS
= c-parse.o c-lang.o \
320 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
322 # Language-specific object files for Objectionable C.
323 OBJC_OBJS
= objc-parse.o objc-actions.o \
324 c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
326 # Language-specific object files for C++.
327 CPLUS_OBJS
= cp-parse.o cp-decl.o cp-decl2.o \
328 cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
329 cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
330 cp-class.o cp-init.o cp-method.o cp-except.o \
331 cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
332 $(CPLUS_INPUT
) cp-spew.o c-common.o
334 # Language-independent object files.
335 OBJS
= toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
336 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
337 rtl.o print-rtl.o rtlanal.o emit-rtl.o \
338 dbxout.o sdbout.o dwarfout.o xcoffout.o \
339 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
340 regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
341 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
342 insn-recog.o insn-extract.o insn-output.o insn-emit.o \
343 insn-attrtab.o aux-output.o getpwd.o
$(EXTRA_OBJS
)
345 # GEN files are listed separately, so they can be built before doing parallel
346 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
347 # them before rtl.o is compiled.
348 GEN
= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
350 # Files to be copied away after each stage in building.
351 STAGESTUFF
= *.o insn-flags.h insn-config.h insn-codes.h \
352 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
353 insn-attr.h insn-attrtab.c \
354 stamp-flags stamp-config stamp-codes \
355 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
356 stamp-attr stamp-attrtab \
357 genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
359 $(GCC_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) gcc-cross cccp \
360 cc1plus cc1obj enquire protoize unprotoize specs collect2
$(USE_COLLECT2
)
362 # Members of libgcc1.a.
363 LIB1FUNCS
= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
364 _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
365 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
366 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
367 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
368 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
369 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
371 # Library members defined in libgcc2.c.
372 LIB2FUNCS
= _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
373 _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 \
374 _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
375 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
376 _varargs _eprintf _builtin_new _builtin_New _builtin_del \
377 _bb _shtab _clear_cache _trampoline __main _exit
379 # Header files that are made available under the same name
380 # to programs compiled with gcc.
381 USER_H
= assert.h va-hp800.h va-i860.h va-mips.h va-pyr.h va-sparc.h \
382 va-spur.h va-m88k.h va-i960.h proto.h
384 # All the header files that are installed for users from GCC itself.
385 INSTALLED_H
= float.h stddef.h stdarg.h varargs.h
$(USER_H
) limits.h
387 # The files that "belong" in CONFIG_H are deliberately omitted
388 # because having them there would not be useful in actual practice.
389 # All they would do is cause complete recompilation every time
390 # one of the machine description files is edited.
391 # That may or may not be what one wants to do.
392 # If it is, rm *.o is an easy way to do it.
393 # CONFIG_H = config.h tm.h
395 RTL_H
= rtl.h rtl.def machmode.h machmode.def
396 TREE_H
= tree.h real.h tree.def machmode.h machmode.def
397 CPLUS_TREE_H
= $(TREE_H
) cp-tree.h cp-tree.def
399 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
402 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure
$(srcdir)/version.c \
403 $(srcdir)/config
/$(xmake_file
) $(srcdir)/config
/$(tmake_file
)
406 all.internal
: start.encap rest.encap
407 # This is what to compile if making a cross-compiler.
408 all.cross
: native gcc-cross
409 # This is what must be made before installing GCC and converting libraries.
410 start.encap
: native gcc
$(LIBGCC1_TARGET
)
411 # Use this to make a GCC that will be used only to recompile GCC.
412 for-bootstrap
: start.encap libgcc.a
413 # These can't be made, with COFF encapsulation, until after GCC can run.
414 rest.encap
: libgcc.a float.h
$(EXTRA_PARTS
)
415 # This is what is made with the host's compiler
416 # whether making a cross compiler or not.
417 native
: config.status
cpp $(LANGUAGES
) $(EXTRA_PASSES
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
)
419 # Define the names for selecting languages in LANGUAGES.
423 OBJECTIVE-C objective-c
: cc1obj
426 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
427 # a target to build even if it is up-to-date. So we must verify that
428 # config.status does not exist before failing.
430 @if
[ ! -f config.status
] ; then \
431 echo You must configure gcc. Look at the INSTALL file for details.
; \
437 compilations
: ${OBJS}
439 gcc
: gcc.o version.o
$(LIBDEPS
)
440 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o gccnew gcc.o version.o
$(LIBS
)
441 # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
443 # Dump a specs file to make -B./ read these specs over installed ones
444 .
/gcc
-dumpspecs
> specs
446 # We do want to create an executable named `gcc', so we can use it to
448 # Also create gcc-cross, so that install-common will install properly.
452 cc1
:$(P
) $(C_OBJS
) $(OBJS
) $(LIBDEPS
)
453 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cc1
$(C_OBJS
) $(OBJS
) $(LIBS
)
455 cc1plus
:$(P
) $(CPLUS_OBJS
) $(OBJS
) $(LIBDEPS
)
456 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cc1plus
$(CPLUS_OBJS
) $(OBJS
) $(LIBS
)
458 cc1obj
:$(P
) $(OBJC_OBJS
) $(OBJS
) $(LIBDEPS
)
459 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cc1obj
$(OBJC_OBJS
) $(OBJS
) $(LIBS
)
462 -.
/enquire
-f
> tmp-float.h
463 mv tmp-float.h float.h
465 # Used to compile enquire with standard cc, but have forgotten why.
466 # Let's try with GCC.
467 enquire
: enquire.o
$(GCC_PARTS
)
468 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ENQUIRE_LDFLAGS
) enquire.o
-o
$@
469 enquire.o
: $(srcdir)/enquire.c
$(GCC_PASSES
)
470 -if
[ "$(srcdir)" != "." ]; then
rm -f enquire.c
; else true
; fi
471 -cp
$(srcdir)/enquire.c .
> /dev
/null
2>&1
472 # Breaking this line caused a problem with one version of GNU make.
473 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(ENQUIRE_CFLAGS
) -I.
-c enquire.c
476 # This is done in two parts because some functions, in libgcc1.c,
477 # must be compiled with something other than gcc,
478 # while the rest, in libgcc2.c, must be compiled with gcc.
479 # That means we can't do libgcc2.c until after gcc, cc1, etc.
481 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
482 # LIBCONVERT should put its output in libgcc1.conv.
483 libgcc1.conv
: libgcc1.a
484 $(LIBCONVERT
) libgcc1.a libgcc1.conv
486 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
487 # Make an empty file instead.
488 libgcc1.null
: $(CROSS_TOOLS
) $(GCC_PASSES
)
489 echo
"__foo () {}" > dummy.c
490 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) -c dummy.c
491 $(OLDAR
) $(OLDAR_FLAGS
) libgcc1.null dummy.o
492 rm -f dummy.o dummy.c
494 # Compile the library of arithmetic subroutines with the native compiler.
495 # Don't compile it with gcc!
496 # (That would cause most arithmetic functions to call themselves.)
497 libgcc1.a
: libgcc1.c
$(CONFIG_H
) $(LIB1FUNCS_EXTRA
) config.status
499 # Actually build it in tmplibgcc1.a, then rename at end,
500 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
501 # -e causes any failing command to make this rule fail.
502 # -e doesn't work in certain shells, so we test $$? as well.
504 for name in
$(LIB1FUNCS
); \
508 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
-DL
$${name} $(srcdir)/libgcc1.c
; \
509 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
510 mv libgcc1.o
$${name}.o
; \
511 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}.o
; \
514 # Some shells crash when a loop has no items.
515 # So make sure there is always at least one--`..'.
517 # We don't use -e here because there are if statements
518 # that should not make the command give up when the if condition is false.
519 # Instead, we test for failure after each command where it matters.
520 -for file in ..
$(LIB1FUNCS_EXTRA
); \
522 if
[ x
$${file} != x..
]; then \
523 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
525 if
[ $${name}.asm
= $${file} ]; then \
526 cp
$${file} $${name}.s
; file
=$${name}.s
; \
527 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
529 $(OLDCC
) $(CCLIBFLAGS
) $(INCLUDES
) -c
$${file}; \
530 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
531 $(OLDAR
) $(OLDAR_FLAGS
) tmplibgcc1.a
$${name}.o
; \
532 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
533 rm -f
$${name}.
[so
]; \
537 mv tmplibgcc1.a libgcc1.a
539 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
540 # But recompiling cc1 should not force recompilation of libgcc2.a.
541 # If you want to force recompilation, delete libgcc2.a.
542 # Depend on install-cross-tools to make sure we set up properly
543 # to run the assembler before we try compiling anything.
544 # install-cross-tools does nothing if not cross compiling.
545 libgcc2.ready
: $(GCC_PASSES
) $(CROSS_TOOLS
)
546 -if
[ -f libgcc2.ready
] ; then \
549 touch libgcc2.ready
; \
552 libgcc2.a
: libgcc2.c libgcc2.ready
$(CONFIG_H
) $(LIB2FUNCS_EXTRA
) \
553 longlong.h gbl-ctors.h config.status
554 # Actually build it in tmplibgcc2.a, then rename at end,
555 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
557 # -e causes any failing command to make this rule fail.
558 # -e doesn't work in certain shells, so we test $$? as well.
560 for name in
$(LIB2FUNCS
); \
563 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
-DL
$${name} \
564 $(srcdir)/libgcc2.c
-o
$${name}.o
; \
565 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
566 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}.o
; \
569 # Some shells crash when a loop has no items.
570 # So make sure there is always at least one--`..'.
572 # We don't use -e here because there are if statements
573 # that should not make the command give up when the if condition is false.
574 # Instead, we test for failure after each command where it matters.
575 -for file in ..
$(LIB2FUNCS_EXTRA
); \
577 if
[ x
$${file} != x..
]; then \
578 name
=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
580 if
[ $${name}.asm
= $${file} ]; then \
581 cp
$${file} $${name}.s
; file
=$${name}.s
; \
582 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
584 $(GCC_FOR_TARGET
) $(LIBGCC2_CFLAGS
) $(INCLUDES
) -c
$${file}; \
585 if
[ $$?
-eq
0 ] ; then true
; else exit
1; fi
; \
586 $(AR
) $(AR_FLAGS
) tmplibgcc2.a
$${name}.o
; \
587 rm -f
$${name}.
[so
]; \
591 mv tmplibgcc2.a libgcc2.a
592 # These lines were deleted from above the mv command
593 # because ranlibing libgcc.a itself should suffice.
594 # -if [ x${HPUX_GAS} = x ] ; then \
595 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
598 # Combine the various libraries into a single library, libgcc.a.
599 libgcc.a
: $(LIBGCC1
) $(LIBGCC2
)
600 -rm -rf tmplibgcc.a libgcc.a tmpcopy
602 -if
[ x
$(LIBGCC1
) != x
]; \
603 then
(cd tmpcopy
; $(AR
) x ..
/$(LIBGCC1
)); \
606 (cd tmpcopy
; $(AR
) x ..
/$(LIBGCC2
))
607 (cd tmpcopy
; $(AR
) $(AR_FLAGS
) ..
/tmplibgcc.a
*.o
)
609 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) tmplibgcc.a
; else true
; fi
610 # Actually build it in tmplibgcc.a, then rename at end,
611 # so that libgcc.a itself remains nonexistent if compilation is aborted.
612 mv tmplibgcc.a libgcc.a
615 # Compile two additional files that are linked with every program
616 # linked using GCC on system V, for the sake of C++ constructors.
617 crtbegin.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
618 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) -DCRT_BEGIN \
619 -finhibit-size-directive
-g0
-c
$(srcdir)/crtstuff.c
-o crtbegin.o
621 crtend.o
: crtstuff.c
$(GCC_PASSES
) $(CONFIG_H
) gbl-ctors.h
622 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(INCLUDES
) -DCRT_END \
623 -finhibit-size-directive
-g0
-c
$(srcdir)/crtstuff.c
-o crtend.o
625 # Compiling object files from source files.
627 # Note that dependencies on obstack.h are not written
628 # because that file is not part of GCC.
629 # Dependencies on gvarargs.h are not written
630 # because all that file does, when not compiling with GCC,
631 # is include the system varargs.h.
633 # C language specific files.
635 c-parse.o
: $(srcdir)/c-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h input.h flags.h
636 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/c-parse.c
637 $(srcdir)/c-parse.c
$(srcdir)/c-parse.h
: $(srcdir)/c-parse.y
638 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d c-parse.y
-o c-parse.c
640 c-decl.o
: c-decl.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
641 c-typeck.o
: c-typeck.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
642 c-lang.o
: c-lang.c
$(CONFIG_H
) $(TREE_H
)
643 c-lex.o
: c-lex.c
$(CONFIG_H
) $(TREE_H
) c-lex.h c-tree.h c-parse.h \
645 c-aux-info.o
: c-aux-info.c
$(CONFIG_H
) $(TREE_H
) c-tree.h flags.h
646 c-convert.o
: c-convert.c
$(CONFIG_H
) $(TREE_H
) flags.h
648 # C++ language specific files.
650 cp-parse.o
: $(srcdir)/cp-parse.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
651 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
652 `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
654 $(srcdir)/cp-parse.c
$(srcdir)/cp-parse.h
: $(srcdir)/cp-parse.y
655 @echo expect
30 shift
/reduce conflicts and
15 reduce
/reduce conflicts
656 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) -d
-o cp-parse.c cp-parse.y
658 cp-spew.o
: cp-spew.c
$(CONFIG_H
) $(CPLUS_TREE_H
) \
659 $(srcdir)/cp-parse.h flags.h
660 cp-lex.o
: cp-lex.c
$(CONFIG_H
) $(CPLUS_TREE_H
) \
661 $(srcdir)/cp-parse.h
$(srcdir)/cp-input.c flags.h
662 cp-decl.o
: cp-decl.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h \
663 cp-lex.h cp-decl.h stack.h
664 cp-decl2.o
: cp-decl2.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h \
666 cp-type2.o
: cp-type2.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
667 cp-typeck.o
: cp-typeck.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
668 cp-class.o
: cp-class.c
$(CONFIG_H
) $(CPLUS_TREE_H
) stack.h \
670 cp-call.o
: cp-call.c
$(CONFIG_H
) $(CPLUS_TREE_H
) stack.h cp-class.h \
672 cp-init.o
: cp-init.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
673 cp-method.o
: cp-method.c
$(CONFIG_H
) $(CPLUS_TREE_H
)
674 cp-cvt.o
: cp-cvt.c
$(CONFIG_H
) $(CPLUS_TREE_H
)
675 cp-search.o
: cp-search.c
$(CONFIG_H
) $(CPLUS_TREE_H
) stack.h flags.h
676 cp-tree.o
: cp-tree.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
677 cp-ptree.o
: cp-ptree.c
$(CONFIG_H
) $(CPLUS_TREE_H
)
678 cp-gc.o
: cp-gc.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
679 cp-except.o
: cp-except.c
$(CONFIG_H
) $(CPLUS_TREE_H
) flags.h
680 cp-expr.o
: cp-expr.c
$(CONFIG_H
) $(CPLUS_TREE_H
) $(RTL_H
) flags.h \
682 cp-edsel.o
: cp-edsel.c
$(CONFIG_H
) $(CPLUS_TREE_H
) stack.h flags.h
683 cp-xref.o
: cp-xref.c
$(CONFIG_H
) $(CPLUS_TREE_H
)
684 cp-pt.o
: cp-pt.c
$(CONFIG_H
) $(CPLUS_TREE_H
) cp-decl.h cp-parse.h
686 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
691 collect2
: collect2.o version.o
$(LIBDEPS
)
692 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o collect2 collect2.o version.o
$(LIBS
)
694 collect2.o
: collect2.c
$(CONFIG_H
) gstab.h
695 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
696 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
697 -DSTANDARD_BIN_PREFIX
=\"$(bindir)/\" \
698 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
699 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
700 -c
`echo $(srcdir)/collect2.c | sed 's,^\./,,'`
702 # Objectionable C language specific files.
704 objc-parse.o
: $(srcdir)/objc-parse.c
$(CONFIG_H
) $(TREE_H
) c-lex.h \
705 c-tree.h input.h flags.h objc-actions.h
706 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/objc-parse.c
707 $(srcdir)/objc-parse.c
: $(srcdir)/objc-parse.y
708 cd
$(srcdir); $(BISON
) $(BISONFLAGS
) objc-parse.y
-o objc-parse.c
710 objc-actions.o
: objc-actions.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h \
711 flags.h objc-actions.h
713 # A file used by all variants of C.
715 c-common.o
: c-common.c
$(CONFIG_H
) $(TREE_H
) c-tree.h c-lex.h flags.h
717 # Language-independent files.
719 gcc.o
: gcc.c
$(CONFIG_H
) gvarargs.h obstack.h
720 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
721 -DSTANDARD_STARTFILE_PREFIX
=\"$(libdir)/\" \
722 -DSTANDARD_EXEC_PREFIX
=\"$(libdir)/gcc-lib
/\" \
723 -DDEFAULT_TARGET_MACHINE
=\"$(target
)\" \
724 -c
`echo $(srcdir)/gcc.c | sed 's,^\./,,'`
731 tree.o
: tree.c
$(CONFIG_H
) $(TREE_H
) gvarargs.h flags.h function.h
732 print-tree.o
: print-tree.c
$(CONFIG_H
) $(TREE_H
)
733 stor-layout.o
: stor-layout.c
$(CONFIG_H
) $(TREE_H
) function.h
734 fold-const.o
: fold-const.c
$(CONFIG_H
) $(TREE_H
) flags.h
735 toplev.o
: toplev.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h input.h \
736 insn-attr.h xcoffout.h
737 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
738 $(MAYBE_USE_COLLECT2
) -c
`echo $(srcdir)/toplev.c | sed 's,^\./,,'`
740 rtl.o
: rtl.c
$(CONFIG_H
) $(RTL_H
)
742 print-rtl.o
: print-rtl.c
$(CONFIG_H
) $(RTL_H
)
743 rtlanal.o
: rtlanal.c
$(CONFIG_H
) $(RTL_H
)
745 varasm.o
: varasm.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h defaults.h \
746 insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h
747 function.o
: function.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
748 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
750 stmt.o
: stmt.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h function.h \
751 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
752 expr.o
: expr.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) gvarargs.h flags.h function.h \
753 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
754 calls.o
: calls.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h expr.h insn-codes.h \
756 expmed.o
: expmed.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
757 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
758 explow.o
: explow.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h hard-reg-set.h \
759 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
760 optabs.o
: optabs.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h \
761 insn-flags.h insn-config.h insn-codes.h expr.h recog.h
762 dbxout.o
: dbxout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) flags.h regs.h \
763 insn-config.h reload.h gstab.h xcoffout.h
764 sdbout.o
: sdbout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) gsyms.h flags.h \
765 insn-config.h reload.h
766 dwarfout.o
: dwarfout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) dwarf.h flags.h \
767 insn-config.h reload.h output.h
768 xcoffout.o
: xcoffout.c
$(CONFIG_H
) $(TREE_H
) $(RTL_H
) xcoffout.h flags.h
769 emit-rtl.o
: emit-rtl.c
$(CONFIG_H
) $(RTL_H
) flags.h gvarargs.h function.h \
770 regs.h insn-config.h insn-codes.h real.h expr.h
771 getpwd.o
: getpwd.c
$(CONFIG_H
)
773 integrate.o
: integrate.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) flags.h integrate.h \
774 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h
776 jump.o
: jump.c
$(CONFIG_H
) $(RTL_H
) flags.h hard-reg-set.h regs.h \
777 insn-config.h insn-flags.h insn-codes.h expr.h real.h
778 stupid.o
: stupid.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h
780 cse.o
: cse.c
$(CONFIG_H
) $(RTL_H
) regs.h hard-reg-set.h flags.h real.h \
781 insn-config.h recog.h
782 loop.o
: loop.c
$(CONFIG_H
) $(RTL_H
) flags.h loop.h insn-config.h \
783 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
784 unroll.o
: unroll.c
$(CONFIG_H
) $(RTL_H
) insn-config.h insn-codes.h \
785 integrate.h regs.h flags.h expr.h loop.h
786 flow.o
: flow.c
$(CONFIG_H
) $(RTL_H
) flags.h insn-config.h \
787 basic-block.h regs.h hard-reg-set.h output.h
788 combine.o
: combine.c
$(CONFIG_H
) $(RTL_H
) gvarargs.h flags.h \
789 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
790 basic-block.h recog.h real.h
791 regclass.o
: regclass.c
$(CONFIG_H
) $(RTL_H
) hard-reg-set.h flags.h \
792 basic-block.h regs.h insn-config.h recog.h
793 local-alloc.o
: local-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h basic-block.h \
794 regs.h hard-reg-set.h insn-config.h recog.h output.h
795 global-alloc.o
: global-alloc.c
$(CONFIG_H
) $(RTL_H
) flags.h \
796 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
798 reload.o
: reload.c
$(CONFIG_H
) $(RTL_H
) flags.h \
799 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
800 reload1.o
: reload1.c
$(CONFIG_H
) $(RTL_H
) flags.h expr.h \
801 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
802 basic-block.h recog.h output.h
803 caller-save.o
: caller-save.c
$(CONFIG_H
) $(RTL_H
) flags.h \
804 regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
805 reorg.o
: reorg.c
$(CONFIG_H
) $(RTL_H
) conditions.h hard-reg-set.h \
806 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
808 sched.o
: sched.c
$(CONFIG_H
) $(RTL_H
) basic-block.h regs.h hard-reg-set.h \
809 flags.h insn-config.h insn-attr.h
810 final.o
: final.c
$(CONFIG_H
) $(RTL_H
) gvarargs.h flags.h regs.h \
811 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
812 hard-reg-set.h insn-codes.h gstab.h xcoffout.h
813 recog.o
: recog.c
$(CONFIG_H
) $(RTL_H
) \
814 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
815 insn-flags.h insn-codes.h real.h
816 reg-stack.o
: reg-stack.c
$(CONFIG_H
) $(RTL_H
) $(TREE_H
) \
817 regs.h hard-reg-set.h flags.h insn-config.h
819 aux-output.o
: aux-output.c
$(CONFIG_H
) \
820 $(RTL_H
) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
821 insn-flags.h output.h insn-attr.h insn-codes.h
823 # Normally this target is not used; but it is used if you
824 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
825 # from the GNU Emacs distribution.
826 # Note some machines won't allow $(CC) without -S on this source file.
828 # sed is used to strip the comments from the assembler output.
829 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(ALLOCA_FLAGS
) \
830 `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
834 # Generate header and source files from the machine description,
837 .PRECIOUS
: insn-config.h insn-flags.h insn-codes.h \
838 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
839 insn-attr.h insn-attrtab.c
841 # The following pair of rules has this effect:
842 # genconfig is run only if the md has changed since genconfig was last run;
843 # but the file insn-config.h is touched only when its contents actually change.
845 # Each of the other insn-* files is handled by a similar pair of rules.
847 # Each of the insn-*.[ch] rules has a semicolon at the end,
848 # for otherwise the system Make on SunOS 4.1 never tries
849 # to recompile insn-*.o.
851 insn-config.h
: stamp-config
;
852 stamp-config
: md genconfig
$(srcdir)/move-if-change
853 .
/genconfig md
> tmp-config.h
854 $(srcdir)/move-if-change tmp-config.h insn-config.h
857 insn-flags.h
: stamp-flags
;
858 stamp-flags
: md genflags
$(srcdir)/move-if-change
859 .
/genflags md
> tmp-flags.h
860 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
863 insn-codes.h
: stamp-codes
;
864 stamp-codes
: md gencodes
$(srcdir)/move-if-change
865 .
/gencodes md
> tmp-codes.h
866 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
869 insn-emit.o
: insn-emit.c
$(CONFIG_H
) $(RTL_H
) expr.h real.h output.h \
870 insn-config.h insn-flags.h insn-codes.h
871 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-emit.c
873 insn-emit.c
: stamp-emit
;
874 stamp-emit
: md genemit
$(srcdir)/move-if-change
875 .
/genemit md
> tmp-emit.c
876 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
879 insn-recog.o
: insn-recog.c
$(CONFIG_H
) $(RTL_H
) insn-config.h recog.h \
880 real.h output.h flags.h
881 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-recog.c
883 insn-recog.c
: stamp-recog
;
884 stamp-recog
: md genrecog
$(srcdir)/move-if-change
885 .
/genrecog md
> tmp-recog.c
886 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
889 insn-extract.o
: insn-extract.c
$(CONFIG_H
) $(RTL_H
)
890 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-extract.c
892 insn-extract.c
: stamp-extract
;
893 stamp-extract
: md genextract
$(srcdir)/move-if-change
894 .
/genextract md
> tmp-extract.c
895 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
898 insn-peep.o
: insn-peep.c
$(CONFIG_H
) $(RTL_H
) regs.h output.h real.h
899 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-peep.c
901 insn-peep.c
: stamp-peep
;
902 stamp-peep
: md genpeep
$(srcdir)/move-if-change
903 .
/genpeep md
> tmp-peep.c
904 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
907 insn-attrtab.o
: insn-attrtab.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h output.h \
908 insn-attr.h insn-config.h
909 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-attrtab.c
911 insn-attr.h
: stamp-attr
;
912 stamp-attr
: md genattr
$(srcdir)/move-if-change
913 .
/genattr md
> tmp-attr.h
914 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
917 insn-attrtab.c
: stamp-attrtab
;
918 stamp-attrtab
: md genattrtab
$(srcdir)/move-if-change
919 .
/genattrtab md
> tmp-attrtab.c
920 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
923 insn-output.o
: insn-output.c
$(CONFIG_H
) $(RTL_H
) regs.h real.h conditions.h \
924 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
926 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c insn-output.c
928 insn-output.c
: stamp-output
;
929 stamp-output
: md genoutput
$(srcdir)/move-if-change
930 .
/genoutput md
> tmp-output.c
931 $(srcdir)/move-if-change tmp-output.c insn-output.c
934 # Compile the programs that generate insn-* from the machine description.
935 # They are compiled with $(HOST_CC), and associated libraries,
936 # since they need to run on this machine
937 # even if GCC is being compiled to run on some other machine.
939 # $(CONFIG_H) is omitted from the deps of the gen*.o
940 # because these programs don't really depend on anything
941 # about the target machine. They do depend on config.h itself,
942 # since that describes the host machine.
944 genconfig
: genconfig.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
945 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genconfig \
946 genconfig.o
$(HOST_RTL
) $(HOST_LIBS
)
948 genconfig.o
: genconfig.c
$(RTL_H
) config.h
949 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genconfig.c
951 genflags
: genflags.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
952 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genflags \
953 genflags.o
$(HOST_RTL
) $(HOST_LIBS
)
955 genflags.o
: genflags.c
$(RTL_H
) config.h
956 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genflags.c
958 gencodes
: gencodes.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
959 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o gencodes \
960 gencodes.o
$(HOST_RTL
) $(HOST_LIBS
)
962 gencodes.o
: gencodes.c
$(RTL_H
) config.h
963 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/gencodes.c
965 genemit
: genemit.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
966 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genemit \
967 genemit.o
$(HOST_RTL
) $(HOST_LIBS
)
969 genemit.o
: genemit.c
$(RTL_H
) config.h
970 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genemit.c
972 genrecog
: genrecog.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
973 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genrecog \
974 genrecog.o
$(HOST_RTL
) $(HOST_LIBS
)
976 genrecog.o
: genrecog.c
$(RTL_H
) config.h
977 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genrecog.c
979 genextract
: genextract.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
980 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genextract \
981 genextract.o
$(HOST_RTL
) $(HOST_LIBS
)
983 genextract.o
: genextract.c
$(RTL_H
) config.h insn-config.h
984 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genextract.c
986 genpeep
: genpeep.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
987 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genpeep \
988 genpeep.o
$(HOST_RTL
) $(HOST_LIBS
)
990 genpeep.o
: genpeep.c
$(RTL_H
) config.h
991 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genpeep.c
993 genattr
: genattr.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
994 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genattr \
995 genattr.o
$(HOST_RTL
) $(HOST_LIBS
)
997 genattr.o
: genattr.c
$(RTL_H
) config.h
998 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattr.c
1000 genattrtab
: genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBDEPS
)
1001 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genattrtab \
1002 genattrtab.o
$(HOST_RTL
) $(HOST_PRINT
) $(HOST_RTLANAL
) $(HOST_LIBS
)
1004 genattrtab.o
: genattrtab.c
$(RTL_H
) config.h insn-config.h
1005 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genattrtab.c
1007 genoutput
: genoutput.o
$(HOST_RTL
) $(HOST_LIBDEPS
)
1008 $(HOST_CC
) $(HOST_CFLAGS
) $(HOST_LDFLAGS
) -o genoutput \
1009 genoutput.o
$(HOST_RTL
) $(HOST_LIBS
)
1011 genoutput.o
: genoutput.c
$(RTL_H
) config.h
1012 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(srcdir)/genoutput.c
1014 # Compile the libraries to be used by gen*.
1015 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1016 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1017 # with the rules for rtl.o, alloca.o, etc.
1018 $(HOST_PREFIX_1
)rtl.o
: $(srcdir)/rtl.c
$(CONFIG_H
) $(RTL_H
)
1019 rm -f
$(HOST_PREFIX
)rtl.c
1020 cp
$(srcdir)/rtl.c
$(HOST_PREFIX
)rtl.c
1021 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtl.c
1023 $(HOST_PREFIX_1
)print-rtl.o
: $(srcdir)/print-rtl.c
$(CONFIG_H
) $(RTL_H
)
1024 rm -f
$(HOST_PREFIX
)print-rtl.c
1025 cp
$(srcdir)/print-rtl.c
$(HOST_PREFIX
)print-rtl.c
1026 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)print-rtl.c
1028 $(HOST_PREFIX_1
)rtlanal.o
: $(srcdir)/rtlanal.c
$(CONFIG_H
) $(RTL_H
)
1029 rm -f
$(HOST_PREFIX
)rtlanal.c
1030 cp
$(srcdir)/rtlanal.c
$(HOST_PREFIX
)rtlanal.c
1031 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)rtlanal.c
1033 $(HOST_PREFIX_1
)alloca.o
: alloca.c
1034 rm -f
$(HOST_PREFIX
)alloca.c
1035 cp
$(srcdir)/alloca.c
$(HOST_PREFIX
)alloca.c
1036 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)alloca.c
1038 $(HOST_PREFIX_1
)obstack.o
: obstack.c
1039 rm -f
$(HOST_PREFIX
)obstack.c
1040 cp
$(srcdir)/obstack.c
$(HOST_PREFIX
)obstack.c
1041 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)obstack.c
1043 $(HOST_PREFIX_1
)malloc.o
: malloc.c
1044 rm -f
$(HOST_PREFIX
)malloc.c
1045 cp
$(srcdir)/malloc.c
$(HOST_PREFIX
)malloc.c
1046 $(HOST_CC
) -c
$(HOST_CFLAGS
) $(HOST_CPPFLAGS
) $(INCLUDES
) $(HOST_PREFIX
)malloc.c
1048 # This satisfies the dependency that we get if you cross-compile a compiler
1049 # that does not need to compile alloca, malloc or whatever.
1051 touch
$(HOST_PREFIX_1
)
1053 # Remake cpp and protoize.
1055 # Making the preprocessor
1059 cccp
: cccp.o cexp.o version.o
$(LIBDEPS
)
1060 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) -o cccp cccp.o cexp.o version.o
$(LIBS
)
1061 cexp.o
: $(srcdir)/cexp.c
$(CONFIG_H
)
1062 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) -c
$(srcdir)/cexp.c
1063 $(srcdir)/cexp.c
: $(srcdir)/cexp.y
1064 cd
$(srcdir); $(BISON
) -o cexp.c cexp.y
1065 cccp.o
: cccp.c
$(CONFIG_H
) pcp.h version.c
1066 # The reason we use $(libdir)/g++-include rather than using libsubdir
1067 # is for compatibility with the current version of libg++.
1068 $(CC
) $(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1069 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1070 -DGPLUSPLUS_INCLUDE_DIR
=\"$(libdir)/g
++-include\" \
1071 -DLOCAL_INCLUDE_DIR
=\"$(prefix)/include\" \
1072 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1073 -c
`echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1075 proto
: config.status protoize unprotoize SYSCALLS.c.X protoize
.1 unprotoize
.1
1077 protoize
: protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1078 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) \
1079 protoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
) -o
$@
1080 protoize.o
: $(srcdir)/protoize.c getopt.h
$(CONFIG_H
)
1081 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1082 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1083 -DGPLUSPLUS_INCLUDE_DIR
=\"$(libdir)/g
++-include\" \
1084 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1085 -DLOCAL_INCLUDE_DIR
=\"$(prefix)/include\" \
1086 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1087 $(srcdir)/protoize.c
1089 unprotoize
: unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBDEPS
)
1090 $(CC
) $(ALL_CFLAGS
) $(LDFLAGS
) \
1091 unprotoize.o getopt.o getopt1.o getpwd.o version.o
$(LIBS
) -o
$@
1092 unprotoize.o
: $(srcdir)/protoize.c getopt.h
$(CONFIG_H
)
1094 cp
$(srcdir)/protoize.c unprotoize.c
1095 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1096 -DGCC_INCLUDE_DIR
=\"$(libsubdir
)/include\" \
1097 -DGPLUSPLUS_INCLUDE_DIR
=\"$(libdir)/g
++-include\" \
1098 -DCROSS_INCLUDE_DIR
=\"$(libsubdir
)/sys-include
\" \
1099 -DLOCAL_INCLUDE_DIR
=\"$(prefix)/include\" \
1100 -DSTD_PROTO_DIR
=\"$(libsubdir
)\" \
1101 -DUNPROTOIZE unprotoize.c
1103 getopt.o
: $(srcdir)/getopt.c getopt.h
1104 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt.c
1105 getopt1.o
: $(srcdir)/getopt1.c getopt.h
1106 $(CC
) -c
$(ALL_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $(srcdir)/getopt1.c
1108 protoize
.1: $(srcdir)/proto-man .
/cpp
1109 .
/cpp -traditional
$(srcdir)/proto-man \
1111 | awk
'NF > 0 {print}' > tmp-proto
.1
1112 mv tmp-proto
.1 protoize
.1
1114 unprotoize
.1: $(srcdir)/proto-man .
/cpp
1115 .
/cpp -traditional
-DUNPRO
$(srcdir)/proto-man \
1117 | awk
'NF > 0 {print}' > tmp-unproto
.1
1118 mv tmp-unproto
.1 unprotoize
.1
1120 # This info describes the target machine, so compile with GCC just built.
1121 SYSCALLS.c.X
: $(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
$(GCC_PASSES
)
1123 cat
$(srcdir)/sys-types.h
$(srcdir)/sys-protos.h
> SYSCALLS.c
1124 $(GCC_FOR_TARGET
) $(GCC_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) \
1125 -aux-info
$@
-S
-o
/dev
/null SYSCALLS.c
1128 test-protoize-simple
: .
/protoize .
/unprotoize
$(GCC_PASSES
)
1130 cp
$(srcdir)/protoize.c tmp-proto.c
1131 chmod u
+w tmp-proto.c
1132 .
/protoize
-N
-B .
/ -c
"-B./ -Wall -Wwrite-strings $(CFLAGS) \
1134 -DGCC_INCLUDE_DIR=0 \
1135 -DGPLUSPLUS_INCLUDE_DIR=0 \
1136 -DCROSS_INCLUDE_DIR=0 \
1137 -DSTD_PROTO_DIR=0" tmp-proto.c
1138 @echo Expect
324 lines of differences.
1139 diff
$(srcdir)/protoize.c tmp-proto.c | wc
-l
1140 .
/unprotoize
-N
-c
"-B./ -Wall -Wwrite-strings $(CFLAGS) \
1142 -DGCC_INCLUDE_DIR=0 \
1143 -DGPLUSPLUS_INCLUDE_DIR=0 \
1144 -DCROSS_INCLUDE_DIR=0 \
1145 -DSTD_PROTO_DIR=0" tmp-proto.c
1146 @echo Expect zero differences.
1147 diff
$(srcdir)/protoize.c tmp-proto.c | cat
1150 # Remake the info files.
1152 doc
: $(srcdir)/cpp.
info $(srcdir)/gcc.
info
1154 $(srcdir)/cpp.
info: $(srcdir)/cpp.texi
1155 makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
1157 #$(srcdir)/gplus.info: $(srcdir)/gplus.texi
1158 # makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
1160 $(srcdir)/gcc.
info: $(srcdir)/gcc.texi
1161 makeinfo `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
1163 # Deletion of files made during compilation.
1164 # There are four levels of this:
1165 # `mostlyclean', `clean', `distclean' and `realclean'.
1166 # `mostlyclean' is useful while working on a particular type of machine.
1167 # It deletes most, but not all, of the files made by compilation.
1168 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1169 # `clean' deletes everything made by running `make all'.
1170 # `distclean' also deletes the files made by config.
1171 # `realclean' also deletes everything that could be regenerated automatically.
1175 -rm -f
$(STAGESTUFF
)
1176 # Delete the temporary source copies for cross compilation.
1177 -rm -f
$(HOST_PREFIX_1
)rtl.c
$(HOST_PREFIX_1
)rtlanal.c
1178 -rm -f
$(HOST_PREFIX_1
)alloca.c
$(HOST_PREFIX_1
)malloc.c
1179 -rm -f
$(HOST_PREFIX_1
)obstack.c
1180 # Delete the temp files made in the course of building libgcc.a.
1181 -rm -f tmplibgcc
* tmpcopy
1182 for name in
$(LIB1FUNCS
); do
rm -f
$${name}.c
; done
1183 # Delete other temporary files.
1184 -rm -f tmp-float.h tmp-
*proto
.1 tmp-gcc.xtar.Z tmp-limits.h gccnew
1185 -rm -f tmp-foo1 tmp-foo2 tmp-proto.c
1186 # Delete the stamp files.
1187 -rm -f stamp-
* tmp-
*
1188 # Delete debugging dump files.
1189 -rm -f
*.greg
*.lreg
*.combine
*.flow
*.cse
*.jump
*.rtl
*.tree
*.loop
1190 -rm -f
*.dbr
*.jump2
*.sched
*.cse2
*.sched2
*.stack
1191 # Delete some files made during installation.
1192 -rm -f specs float.h enquire SYSCALLS.c SYSCALLS.c.X
1193 -rm -f collect collect2
ld mips-tfile mips-tdump alloca.s
1194 # Delete unwanted output files from TeX.
1195 -rm -f
*.toc
*.log
*.vr
*.fn
*.cp
*.tp
*.ky
*.pg
1196 # Delete sorted indices we don't actually use.
1197 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1198 # Delete core dumps.
1201 # Delete all files made by compilation
1202 # that don't exist in the distribution.
1204 -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready
1206 # Delete all files that users would normally create
1207 # while building and installing GCC.
1209 -rm -f tm.h aux-output.c config.h md config.status tconfig.h
1210 -rm -f Makefile
*.
dvi *.oaux
1211 -rm -fr stage1 stage2 stage3 stage4
1213 # Delete anything likely to be found in the source directory
1214 # that shouldn't be in the distribution.
1215 extraclean
: distclean
1216 -rm -rf
=* #* *~* config/=* config/#* config/*~*
1217 -rm -f
*.
dvi *.oaux patch
* config
/patch
* *.orig
*.rej
*.d
*.Z
*.
tar
1218 -rm -f
*.s
*.s
[0-9] *.i
1220 # Get rid of every file that's generated from some other file.
1221 # Most of these files ARE PRESENT in the GCC distribution.
1222 realclean: distclean
1223 -rm -f cp-parse.c cp-parse.h cp-parse.output
1224 -rm -f objc-parse.c objc-parse.output
1225 -rm -f protoize
.1 unprotoize
.1
1226 -rm -f c-parse.c c-parse.h c-parse.output
1227 -rm -f cexp.c cexp.output TAGS
1228 -rm -f
cpp.
info* cpp.??s
cpp.
*aux
1229 -rm -f gcc.
info* gcc.??s gcc.
*aux
1230 -rm -f gplus.
info* gplus.??s gplus.
*aux
1232 # Entry points `install' and `uninstall'.
1233 # Also temporarily `install-fixincludes' could replace `install-headers'.
1234 # Also use `install-collect2' to install collect2 when the config files don't.
1236 install: $(INSTALL_TARGET
)
1238 # Copy the files of native compiler into directories where they will be run.
1239 install-native
: install-common install-libgcc
$(INSTALL_HEADERS
) \
1242 # Copy the files of cross compiler into directories where they will be run.
1243 install-cross
: install-common install-common-headers \
1244 install-man install-cross-tools install-libgcc
1246 # Install the tools, libraries and header files for the target machine
1247 # where cross-compilation will look for them.
1248 # Use tooldir to find them.
1249 install-cross-tools
: install-dir
1250 # The first if makes this a no-op except for a cross compiler.
1251 # The /. after the dirname causes test to follow symlinks.
1252 # Before making a link or an indirection script,
1253 # we verify the desired file does not already exist.
1254 # If a symlink does exist, then making a symlink would certainly fail,
1255 # leading us to overwrite the real file through the symlink.
1256 -if
[ -f gcc-cross
] ; \
1258 if
[ -d
$(tooldir
)/.
] ; \
1260 for file in
as ld ar ranlib
; do \
1261 if
[ -f
$(libsubdir
)/$$file ] ; \
1264 $(SYMLINK
) $(tooldir
)/bin
/$$file $(libsubdir
)/$$file \
1265 ||
(echo
"#!/bin/sh"; echo
$(tooldir
)/bin
/$$file "$$@") > $(libsubdir
)/$$file; \
1268 for file in
$(tooldir
)/lib
/*; do \
1269 if
[ -f
$$file ] ; \
1271 if
[ -f
$(libsubdir
)/`basename $$file` ] ; \
1274 $(SYMLINK
) $$file $(libsubdir
)/`basename $$file` \
1275 ||
$(INSTALL_DATA
) $$file $(libsubdir
)/`basename $$file`; \
1280 if
[ -d
$(tooldir
)/include/.
] ; then \
1281 $(SYMLINK
) $(tooldir
)/include $(libsubdir
)/sys-include \
1282 ||
(if
[ -d
$(libsubdir
)/sys-include
] ; then true
; else mkdir
$(libsubdir
)/sys-include
; fi
; \
1283 cd
$(tooldir
)/include; tar cf
- . |
(cd
$(libsubdir
)/sys-include
; tar xpf
-)); \
1290 # Run this on the target machine
1291 # to finish installation of cross compiler.
1292 install-cross-rest
: install-float-h-cross
1294 # Install float.h for cross compiler.
1295 # Run this on the target machine!
1296 install-float-h-cross
:
1297 if
[ -f enquire
] ; then true
; else false
; done
1298 -.
/enquire
-f
> float.h
1299 -rm -f
$(libsubdir
)/include/float.h
1300 $(INSTALL_DATA
) float.h
$(libsubdir
)/include/float.h
1301 chmod a-x
$(libsubdir
)/include/float.h
1303 # Create the installation directory.
1305 -if
[ -d
$(libdir) ] ; then true
; else mkdir
$(libdir) ; fi
1306 -if
[ -d
$(libdir)/gcc-lib
] ; then true
; else mkdir
$(libdir)/gcc-lib
; fi
1307 -if
[ -d
$(libdir)/gcc-lib
/include ] ; then true
; else mkdir
$(libdir)/gcc-lib
/include ; fi
1308 -if
[ -d
$(libdir)/gcc-lib
/$(target
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
) ; fi
1309 -if
[ -d
$(libdir)/gcc-lib
/$(target
)/$(version
) ] ; then true
; else mkdir
$(libdir)/gcc-lib
/$(target
)/$(version
) ; fi
1310 -if
[ -d
$(bindir) ] ; then true
; else mkdir
$(bindir) ; fi
1311 # We don't use mkdir -p to create the parents of mandir,
1312 # because some systems don't support it.
1313 # Instead, we use this technique to create the immediate parent of mandir.
1314 -parent
=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
1315 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
1316 -if
[ -d
$(mandir) ] ; then true
; else mkdir
$(mandir) ; fi
1318 # Install the compiler executables built during cross compilation.
1319 install-common
: native install-dir
1320 for file in
$(COMPILERS
); do \
1321 if
[ -f
$$file ] ; then \
1322 rm -f
$(libsubdir
)/$$file; \
1323 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
1327 for file in
$(EXTRA_PASSES
) $(EXTRA_PARTS
) $(EXTRA_PROGRAMS
) $(USE_COLLECT2
) ..
; do \
1328 if
[ x
"$$file" != x..
]; then \
1329 rm -f
$(libsubdir
)/$$file; \
1330 $(INSTALL_PROGRAM
) $$file $(libsubdir
)/$$file; \
1333 -rm -f
$(libsubdir
)/specs
1334 $(INSTALL_DATA
) specs
$(libsubdir
)/specs
1335 # Install the driver program as gcc-$(target)
1336 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
1337 -if
[ -f gcc-cross
] ; then \
1338 $(INSTALL_PROGRAM
) gcc-cross
$(bindir)/gcc-
$(target
); \
1339 if
[ -d
$(tooldir
)/bin
/.
] ; then \
1340 rm -f
$(tooldir
)/bin
/gcc
; \
1341 $(INSTALL_PROGRAM
) gcc-cross
$(tooldir
)/bin
/gcc
; \
1344 rm -f
$(bindir)/gcc
; \
1345 $(INSTALL_PROGRAM
) gcc
$(bindir)/gcc
; \
1346 rm -f
$(bindir)/gcc-
$(target
)-1; \
1347 ln
$(bindir)/gcc
$(bindir)/gcc-
$(target
)-1; \
1348 mv
$(bindir)/gcc-
$(target
)-1 $(bindir)/gcc-
$(target
); \
1350 $(INSTALL_PROGRAM
) $(srcdir)/c
++ $(bindir)/c
++
1351 $(INSTALL_PROGRAM
) $(srcdir)/g
++ $(bindir)/g
++
1352 -rm -f
$(libsubdir
)/cpp
1353 $(INSTALL_PROGRAM
) cpp $(libsubdir
)/cpp
1356 install-proto
: proto install-dir
1357 -rm -f
$(bindir)/protoize
1358 $(INSTALL_PROGRAM
) protoize
$(bindir)/protoize
1359 -rm -f
$(bindir)/unprotoize
1360 $(INSTALL_PROGRAM
) unprotoize
$(bindir)/unprotoize
1361 -rm -f
$(libsubdir
)/SYSCALLS.c.X
1362 $(INSTALL_DATA
) SYSCALLS.c.X
$(libsubdir
)/SYSCALLS.c.X
1363 chmod a-x
$(libsubdir
)/SYSCALLS.c.X
1365 # Install the man pages.
1366 install-man
: install-dir
$(srcdir)/gcc
.1 $(srcdir)/cccp
.1 \
1367 protoize
.1 unprotoize
.1 $(srcdir)/g
++.1
1368 -rm -f
$(mandir)/gcc
$(manext)
1369 $(INSTALL_DATA
) $(srcdir)/gcc
.1 $(mandir)/gcc
$(manext)
1370 chmod a-x
$(mandir)/gcc
$(manext)
1371 -rm -f
$(mandir)/cccp
$(manext)
1372 $(INSTALL_DATA
) $(srcdir)/cccp
.1 $(mandir)/cccp
$(manext)
1373 chmod a-x
$(mandir)/cccp
$(manext)
1374 -rm -f
$(mandir)/protoize
$(manext)
1375 $(INSTALL_DATA
) protoize
.1 $(mandir)/protoize
$(manext)
1376 chmod a-x
$(mandir)/protoize
$(manext)
1377 -rm -f
$(mandir)/unprotoize
$(manext)
1378 $(INSTALL_DATA
) unprotoize
.1 $(mandir)/unprotoize
$(manext)
1379 chmod a-x
$(mandir)/unprotoize
$(manext)
1380 -rm -f
$(mandir)/g
++$(manext)
1381 $(INSTALL_DATA
) $(srcdir)/g
++.1 $(mandir)/g
++$(manext)
1382 chmod a-x
$(mandir)/g
++$(manext)
1384 # Install the library.
1385 install-libgcc
: libgcc.a
1386 -if
[ -f libgcc.a
] ; then \
1387 rm -f
$(libsubdir
)/libgcc.a
; \
1388 $(INSTALL_DATA
) libgcc.a
$(libsubdir
)/libgcc.a
; \
1389 if
$(RANLIB_TEST
) ; then \
1390 (cd
$(libsubdir
); $(RANLIB
) libgcc.a
); else true
; fi
; \
1391 chmod a-x
$(libsubdir
)/libgcc.a
; \
1394 # Install all the header files for native compiler.
1395 install-headers
: install-common-headers install-float-h install-limits-h
1397 # Install float.h for native compiler.
1398 install-float-h
: float.h
1399 -rm -f
$(libsubdir
)/include/float.h
1400 $(INSTALL_DATA
) float.h
$(libsubdir
)/include/float.h
1401 chmod a-x
$(libsubdir
)/include/float.h
1403 # Install limits.h, optionally inheriting from the standard system version.
1404 install-limits-h
: limits.h limitx.h
1405 -rm -f
$(libsubdir
)/include/limits.h tmp-limits.h
1406 if
[ -f
/usr
/include/limits.h
] ; then \
1407 cat
$(srcdir)/limitx.h
$(srcdir)/limits.h
> tmp-limits.h
; \
1409 cat
$(srcdir)/limits.h
> tmp-limits.h
; \
1411 $(INSTALL_DATA
) tmp-limits.h
$(libsubdir
)/include/limits.h
1412 chmod a-x
$(libsubdir
)/include/limits.h
1415 # Install the fixed headers that are the same for all machines.
1416 install-common-headers
: install-dir
$(USER_H
) gvarargs.h gstdarg.h gstddef.h
1417 -if
[ -d
$(libsubdir
)/include ] ; then true
; else mkdir
$(libsubdir
)/include ; fi
1418 -chmod ugo
+rx
$(libsubdir
)/include
1419 # Must compute $(libsubdir) before the cd; the awk script won't work after.
1420 shelllibsubdir
=$(libsubdir
); \
1422 for file in
$(USER_H
); do \
1423 rm -f
$$shelllibsubdir/include/`basename $$file`; \
1424 $(INSTALL_DATA
) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \
1425 chmod a-x
$$shelllibsubdir/include/`basename $$file`; \
1427 -rm -f
$(libsubdir
)/include/varargs.h
1428 $(INSTALL_DATA
) $(srcdir)/gvarargs.h
$(libsubdir
)/include/varargs.h
1429 chmod a-x
$(libsubdir
)/include/varargs.h
1430 -rm -f
$(libsubdir
)/include/stdarg.h
1431 $(INSTALL_DATA
) $(srcdir)/gstdarg.h
$(libsubdir
)/include/stdarg.h
1432 chmod a-x
$(libsubdir
)/include/stdarg.h
1433 -rm -f
$(libsubdir
)/include/stddef.h
1434 $(INSTALL_DATA
) $(srcdir)/gstddef.h
$(libsubdir
)/include/stddef.h
1435 chmod a-x
$(libsubdir
)/include/stddef.h
1436 # Copy byteorder.h into the object file directory
1437 # so that fixinc.svr4 can get at it if necessary.
1438 # If the dirs are the same, this won't do anything.
1439 # Delete file first in case it is read-only
1440 -if
[ "$(srcdir)" != "." ]; then
rm -f byteorder.h
; else true
; fi
1441 -cp
$(srcdir)/byteorder.h .
> /dev
/null
2>&1
1443 # $(libsubdir)/include:
1444 # -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
1445 # -chmod ugo+rx $(libsubdir)/include
1447 # This appears not to work. It isn't clear how to fix it.
1448 # $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
1449 # LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
1450 # $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
1453 # Run fixincludes in the proper directory.
1454 install-fixincludes
: install-headers
1455 rm -rf
$(libsubdir
)/tmp
1456 mkdir
$(libsubdir
)/tmp
1457 # Move aside the headers that come from GCC; delete all else.
1458 # The sed command gets just the last file name component;
1459 # this is necessary because VPATH could add a dirname.
1460 # Using basename would be simpler, but some systems don't have it.
1461 cd
$(libsubdir
)/include; \
1462 for file in
$(INSTALLED_H
); do \
1463 realfile
=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1464 mv
$$realfile ..
/tmp
; \
1467 # Install fixed copies of system files.
1468 $(srcdir)/$(FIXINCLUDES
) $(libsubdir
)/include
1469 # Bring back gcc's header files.
1470 cd
$(libsubdir
)/include; mv ..
/tmp
/* .
; rmdir ..
/tmp
1471 # Install the README
1472 $(INSTALL_DATA
) $(srcdir)/README-fixinc
$(libsubdir
)/include/README
1473 chmod a-x
$(libsubdir
)/include/README
1475 # Use this target to install the program `collect2' under the name `ld'.
1476 install-collect2
: collect2
1477 $(INSTALL_PROGRAM
) collect2
$(libsubdir
)/ld
1478 # Install the driver program as $(libsubdir)/gcc for collect2.
1479 -if
[ -f gcc-cross
] ; then \
1480 $(INSTALL_PROGRAM
) gcc-cross
$(libsubdir
)/gcc
; \
1482 $(INSTALL_PROGRAM
) gcc
$(libsubdir
)/gcc
; \
1485 # Cancel installation by deleting the installed files.
1487 -rm -rf
$(libsubdir
)
1488 -rm -rf
$(bindir)/gcc
1489 -rm -rf
$(bindir)/protoize
1490 -rm -rf
$(bindir)/unprotoize
1491 -rm -rf
$(mandir)/gcc
$(manext)
1492 -rm -rf
$(mandir)/cccp
$(manext)
1493 -rm -rf
$(mandir)/protoize
$(manext)
1494 -rm -rf
$(mandir)/unprotoize
$(manext)
1496 # These exist for maintenance purposes.
1498 # Update the tags table.
1502 mv
-f c-parse.c c-parse.h cp-parse.c cp-parse.h objc-parse.c cexp.c temp
; \
1503 etags
*.y
*.h
*.c
; \
1507 # Create the distribution tar file.
1508 #dist: gcc-$(version).tar.Z
1511 gcc.xtar.Z
: gcc.xtar
1512 compress
< gcc.xtar
> tmp-gcc.xtar.Z
1513 mv tmp-gcc.xtar.Z gcc.xtar.Z
1515 #gcc-$(version).tar.Z: gcc-$(version).tar
1516 # compress < gcc-$(version).tar > gcc-$(version).tar.Z
1518 #gcc-$(version).tar:
1520 -rm -rf gcc-
$(version
) tmp
1521 # Put all the files in a temporary subdirectory
1522 # which has the name that we want to have in the tar file.
1525 for file in
*[0-9a-zA-Z
+]; do \
1526 ln
$$file tmp || cp
$$file tmp
; \
1529 for file in
*[0-9a-zA-Z
+]; do \
1530 ln
$$file ..
/tmp
/config || cp
$$file ..
/tmp
/config
; \
1533 mv tmp gcc-
$(version
)
1534 # Get rid of everything we don't want in the distribution.
1535 cd gcc-
$(version
); make
-f Makefile.in extraclean
1536 # Make the distribution.
1537 tar chf gcc.xtar gcc-
$(version
)
1538 # Get rid of the temporary directory.
1539 rm -rf gcc-
$(version
)
1540 # Update the version number in README
1541 awk
'$$1 " " $$2 " " $$3 == "This directory contains" \
1542 { $$6 = version; print $$0 } \
1543 $$1 " " $$2 " " $$3 != "This directory contains"' \
1544 version
=$(version
) README
> tmp.README
1545 mv tmp.README README
1547 # do make -f ../gcc/Makefile maketest DIR=../gcc
1548 # in the intended test directory to make it a suitable test directory.
1549 # THIS IS OBSOLETE; use the -srcdir operand in configure instead.
1551 ln
-s
$(DIR
)/*.
[chy
] .
1552 ln
-s
$(DIR
)/configure .
1553 ln
-s
$(DIR
)/*.def .
1555 ln
-s
$(DIR
)/.gdbinit .
1556 ln
-s
$(DIR
)/$(FIXINCLUDES
) .
1557 -ln
-s
$(DIR
)/bison.simple .
1558 ln
-s
$(DIR
)/config .
1559 ln
-s
$(DIR
)/move-if-change .
1560 # The then and else were swapped to avoid a problem on Ultrix.
1561 if
[ ! -f Makefile
] ; then ln
-s
$(DIR
)/Makefile .
; else false
; fi
1562 -rm tm.h aux-output.c config.h md
1564 # You must then run config to set up for compilation.
1566 # Only build the C compiler for stage1, because that is the only one that
1567 # we can guarantee will build with the native compiler, and also it is the
1568 # only thing useful for building stage2.
1571 # This used to define ALLOCA as empty, but that would lead to bad results
1572 # for a subsequent `make install' since that would not have ALLOCA empty.
1573 # To prevent `make install' from compiling alloca.o and then relinking cc1
1574 # because alloca.o is newer, we permit these recursive makes to compile
1575 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
1576 $(MAKE
) CC
="stage1/gcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES
="$(LANGUAGES)"
1578 $(MAKE
) CC
="stage2/gcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES
="$(LANGUAGES)"
1581 $(MAKE
) CC
="stage1/gcc -Bstage1/" CFLAGS
="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES
="$(LANGUAGES)"
1583 $(MAKE
) CC
="stage2/gcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES
="$(LANGUAGES)"
1586 $(MAKE
) CC
="stage2/gcc -Bstage2/" CFLAGS
="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES
="$(LANGUAGES)"
1588 # Compare the object files in the current directory with those in the
1592 for file in
*.o
; do \
1593 tail
+10c
$$file > tmp-foo1
; \
1594 tail
+10c stage2
/$$file > tmp-foo2
; \
1595 cmp tmp-foo1 tmp-foo2 || echo
$$file differs
; \
1599 # Similar, but compare with stage3 directory
1601 for file in
*.o
; do \
1602 tail
+10c
$$file > tmp-foo1
; \
1603 tail
+10c stage3
/$$file > tmp-foo2
; \
1604 cmp tmp-foo1 tmp-foo2 || echo
$$file differs
; \
1608 # Copy the object files from a particular stage into a subdirectory.
1610 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
1611 -mv
$(STAGESTUFF
) stage1
1612 -rm -f stage1
/libgcc.a
1614 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage1
/libgcc.a
; else true
; fi
1617 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
1618 -mv
$(STAGESTUFF
) stage2
1619 -rm -f stage2
/libgcc.a
1621 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage2
/libgcc.a
; else true
; fi
1624 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
1625 -mv
$(STAGESTUFF
) stage3
1626 -rm -f stage3
/libgcc.a
1628 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage3
/libgcc.a
; else true
; fi
1631 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
1632 -mv
$(STAGESTUFF
) stage4
1633 -rm -f stage4
/libgcc.a
1635 -if
$(RANLIB_TEST
) ; then
$(RANLIB
) stage4
/libgcc.a
; else true
; fi
1637 # Copy just the executable files from a particular stage into a subdirectory,
1638 # and delete the object files. Use this if you're just verifying a version
1639 # that is pretty sure to work, and you are short of disk space.
1641 -if
[ -d stage1
] ; then true
; else mkdir stage1
; fi
1642 -mv cc1
cpp cccp gcc stage1
1643 -rm -f stage1
/libgcc.a
1644 -cp libgcc.a stage1
&& $(RANLIB
) stage1
/libgcc.a
1648 -if
[ -d stage2
] ; then true
; else mkdir stage2
; fi
1649 -mv cc1
cpp cccp gcc stage2
1650 -rm -f stage2
/libgcc.a
1651 -cp libgcc.a stage2
&& $(RANLIB
) stage2
/libgcc.a
1655 -if
[ -d stage3
] ; then true
; else mkdir stage3
; fi
1656 -mv cc1
cpp cccp gcc stage3
1657 -rm -f stage3
/libgcc.a
1658 -cp libgcc.a stage3
&& $(RANLIB
) stage3
/libgcc.a
1662 -if
[ -d stage4
] ; then true
; else mkdir stage4
; fi
1663 -mv cc1
cpp cccp gcc stage4
1664 -rm -f stage4
/libgcc.a
1665 -cp libgcc.a stage4
&& $(RANLIB
) stage4
/libgcc.a
1668 #In GNU Make, ignore whether `stage*' exists.
1669 .PHONY
: stage1 stage2 stage3 stage4
clean realclean TAGS bootstrap
1670 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4