(gnucompare, stmp-multilib-sub): Remove extra . in front of $(objext).
[gcc.git] / gcc / Makefile.in
1 # Makefile for GNU C compiler.
2 # Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc.
3
4 #This file is part of GNU CC.
5
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)
9 #any later version.
10
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.
15
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.
20
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.
25
26 # Suppress smart makes who think they know how to automake Yacc files
27 .y.c:
28
29 # Variables that exist for you to override.
30 # See below for how to change them for certain systems.
31
32 # List of language subdirectories.
33 # This is overridden by configure.
34 SUBDIRS =
35
36 # Selection of languages to be made.
37 # This is overridden by configure.
38 LANGUAGES = c objective-c proto
39
40 ALLOCA =
41 ALLOCA_FLAGS =
42 ALLOCA_FINISH = true
43
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.
49 XCFLAGS =
50 CFLAGS = -g
51 BOOT_CFLAGS = -O $(CFLAGS)
52 # These exists to be overridden by the x-* and t-* files, respectively.
53 X_CFLAGS =
54 T_CFLAGS =
55
56 X_CPPFLAGS =
57 T_CPPFLAGS =
58
59 CC = cc
60 BISON = bison
61 BISONFLAGS =
62 LEX = flex
63 LEXFLAGS =
64 AR = ar
65 OLDAR_FLAGS = qc
66 AR_FLAGS = rc
67 SHELL = /bin/sh
68 # on sysV, define this as cp.
69 INSTALL = install -c
70 # These permit overriding just for certain files.
71 INSTALL_PROGRAM = $(INSTALL)
72 INSTALL_DATA = $(INSTALL)
73 MAKEINFO = makeinfo
74 TEXI2DVI = texi2dvi
75 # For GNUmake: let us decide what gets passed to recursive makes.
76 MAKEOVERRIDES =
77
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.
81 P =
82
83 # How to invoke ranlib.
84 RANLIB = ranlib
85 # Test to use to see whether ranlib exists on the system.
86 RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
87
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.
92 OLDCC = cc
93
94 # CFLAGS for use with OLDCC, for compiling libgcc1.a.
95 # NOTE: -O does not work on some Unix systems!
96 CCLIBFLAGS = -O
97
98 # Version of ar to use when compiling libgcc1.a.
99 OLDAR = ar
100
101 # Target to use when installing include directory. Either
102 # install-headers-tar or install-headers-cpio.
103 INSTALL_HEADERS_DIR = install-headers-tar
104
105 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
106 # Usually the one we just built.
107 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
108 GCC_FOR_TARGET = ./xgcc -B./
109
110 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
111 # It omits XCFLAGS, and specifies -B./.
112 # It also specifies -I./include to find, e.g., stddef.h.
113 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include
114
115 # Special flags for compiling enquire.
116 # We disable optimization to make floating point more reliable.
117 ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
118 ENQUIRE_LDFLAGS = $(LDFLAGS)
119
120 # Sed command to transform gcc to installed name. Overwritten by configure.
121 program_transform_name = -e s,x,x,
122 program_transform_cross_name = -e s,^,$(target)-,
123
124 # Tools to use when building a cross-compiler.
125 # These are used because `configure' appends `cross-make'
126 # to the makefile when making a cross-compiler.
127
128 TARGET_TOOLPREFIX = $(tooldir)/bin/
129 AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
130 AR_FOR_TARGET_FLAGS = rc
131 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
132 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
133
134 # Dir to search for system headers. Overridden by cross-make.
135 SYSTEM_HEADER_DIR = /usr/include
136
137 # Control whether to run fixproto.
138 STMP_FIXPROTO = stmp-fixproto
139
140 # Test to see whether <limits.h> exists in the system header files.
141 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
142
143 # There may be a premade insn-attrtab.c for this machine.
144 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
145 # PREMADE_ATTRTAB is the file name of the file to use.
146 # PREMADE_ATTRTAB_MD is the md file it corresponds to.
147 PREMADE_ATTRTAB_MD = Makefile # Guaranteed not to cmp equal to md.
148 PREMADE_ATTRTAB =
149
150 target= ... `configure' substitutes actual target name here.
151 xmake_file= ... `configure' substitutes actual x- file name here.
152 tmake_file= ... `configure' substitutes actual t- file name here.
153 out_file= ... `configure' substitutes actual out file name here.
154 out_object_file= ... `configure' substitutes actual out object file name here.
155 md_file= ... `configure' substitutes actual md file name here.
156 tm_file= ... `configure' substitutes actual tm file name here.
157 build_xm_file= ... `configure' substitutes actual build xm- file name here.
158 host_xm_file= ... `configure' substitutes actual host xm- file name here.
159 lang_specs_files= ... `configure' substitutes actual lang spec file names here.
160 lang_options_files= ... `configure' puts actual lang options file names here.
161 version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
162 mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
163
164 # Directory where sources are, from where we are.
165 srcdir = .
166 # Common prefix for installation directories.
167 # NOTE: This directory must exist when you start installation.
168 prefix = /usr/local
169 # Directory in which to put localized header files. On the systems with
170 # gcc as the native cc, `local_prefix' may not be `prefix' which is
171 # `/usr'.
172 # NOTE: local_prefix *should not* default from prefix.
173 local_prefix = /usr/local
174 # Directory in which to put host dependent programs and libraries
175 exec_prefix = $(prefix)
176 # Directory in which to put the executable for the command `gcc'
177 bindir = $(exec_prefix)/bin
178 # Directory in which to put the directories used by the compiler.
179 libdir = $(exec_prefix)/lib
180 # Directory in which the compiler finds executables, libraries, etc.
181 libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
182 # Directory in which the compiler finds g++ includes.
183 gxx_include_dir= $(libdir)/g++-include
184 # Directory to search for site-specific includes.
185 includedir = $(local_prefix)/include
186 # assertdir is overridden in cross-make.
187 # (But this currently agrees with what is in cross-make.)
188 assertdir = $(tooldir)/include
189 # where the info files go
190 infodir = $(prefix)/info
191 # Extension (if any) to put in installed man-page filename.
192 manext = .1
193 objext = .o
194 exeext =
195
196 # Directory in which to put man pages.
197 mandir = $(prefix)/man/man1
198 # Directory in which to find other cross-compilation tools and headers.
199 # Used in install-cross.
200 tooldir = $(exec_prefix)/$(target)
201 # Dir for temp files.
202 tmpdir = /tmp
203
204 # Additional system libraries to link with.
205 CLIB=
206
207 # Change this to a null string if obstacks are installed in the
208 # system library.
209 OBSTACK=obstack.o
210
211 # Specify the rule for actually making libgcc.a,
212 LIBGCC = libgcc.a
213 # and the rule for installing it.
214 INSTALL_LIBGCC = install-libgcc
215
216 # Specify the rule for actually making libgcc1.a.
217 # The value may be empty; that means to do absolutely nothing
218 # with or for libgcc1.a.
219 LIBGCC1 = libgcc1.a
220
221 # Specify the rule for making libgcc1.a for a cross-compiler.
222 # The default rule assumes that libgcc1.a is supplied by the user.
223 CROSS_LIBGCC1 = libgcc1.cross
224
225 # Specify the rule for actually making libgcc2.a.
226 LIBGCC2 = libgcc2.a
227
228 # Options to use when compiling libgcc2.a.
229 # -g1 causes output of debug info only for file-scope entities.
230 # we use this here because that should be enough, and also
231 # so that -g1 will be tested.
232 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1
233
234 # Additional options to use when compiling libgcc2.a.
235 # Some targets override this to -Iinclude
236 LIBGCC2_INCLUDES =
237
238 # Additional target-dependent options for compiling libgcc2.a.
239 TARGET_LIBGCC2_CFLAGS =
240
241 # Things which must be built before building libgcc2.a.
242 # Some targets override this to stmp-int-hdrs
243 LIBGCC2_DEPS =
244
245 # Enquire target (This is a variable so that a target can choose not to
246 # build it.)
247 ENQUIRE = enquire
248
249 # libgcc1-test target (must also be overridable for a target)
250 LIBGCC1_TEST = libgcc1-test
251
252 # List of extra executables that should be compiled for this target machine
253 # that are used for compiling from source code to object code.
254 # The rules for compiling them should be in the t-* file for the machine.
255 EXTRA_PASSES =
256
257 # Like EXTRA_PASSES, but these are used when linking.
258 EXTRA_PROGRAMS =
259
260 # List of extra object files that should be compiled for this target machine.
261 # The rules for compiling them should be in the t-* file for the machine.
262 EXTRA_PARTS =
263
264 # List of extra object files that should be compiled and linked with
265 # compiler proper (cc1, cc1obj, cc1plus).
266 EXTRA_OBJS =
267
268 # List of extra object files that should be compiled and linked with
269 # the gcc driver.
270 EXTRA_GCC_OBJS =
271
272 # List of additional header files to install.
273 # Often this is edited directly by `configure'.
274 EXTRA_HEADERS =
275
276 # Set this to `ld' to enable use of collect2.
277 # USE_COLLECT2 =
278 # It is convenient for configure to add the assignment at the beginning,
279 # so don't override it here.
280
281 # List of extra C and assembler files to add to libgcc1.a.
282 # Assembler files should have names ending in `.asm'.
283 LIB1FUNCS_EXTRA =
284
285 # List of extra C and assembler files to add to libgcc2.a.
286 # Assembler files should have names ending in `.asm'.
287 LIB2FUNCS_EXTRA =
288
289 # Default float.h source to use for cross-compiler.
290 CROSS_FLOAT_H=float.h-cross
291
292 # Program to convert libraries.
293 LIBCONVERT =
294
295 # Control whether header files are installed.
296 INSTALL_HEADERS=install-headers
297
298 # Options for tar when copying trees. So HPUX can override it.
299 TAROUTOPTS = xpBf
300
301 # Select which version of fixincludes to use (I.E. regular versus SVR4)
302 # This value is overridden directly by configure.
303 FIXINCLUDES=fixincludes
304
305 # Additional directories of header files to run fixincludes on.
306 # These should be directories searched automatically by default
307 # just as /usr/include is.
308 # *Do not* use this for directories that happen to contain
309 # header files, but are not searched automatically by default.
310 # On most systems, this is empty.
311 OTHER_FIXINCLUDES_DIRS=
312
313 # List of things which should already be built whenever we try to use xgcc
314 # to compile anything (without linking).
315 GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
316
317 # List of things which should already be built whenever we try to use xgcc
318 # to link anything.
319 GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
320
321 # Directory to link to, when using the target `maketest'.
322 DIR = ../gcc
323
324 # Guaranteed to not exist when not passing md through cpp.
325 # This value is overridden directly by configure.
326 MD_FILE = md-cpp-not-used
327
328 # Flags to use when cross-building GCC.
329 # Prefix to apply to names of object files when using them
330 # to run on the machine we are compiling on.
331 HOST_PREFIX=
332 # Prefix to apply to names of object files when compiling them
333 # to run on the machine we are compiling on.
334 # The default for this variable is chosen to keep these rules
335 # out of the way of the other rules for compiling the same source files.
336 HOST_PREFIX_1=loser-
337 HOST_CC=$(CC)
338 HOST_CFLAGS=$(ALL_CFLAGS)
339 HOST_CLIB=$(CLIB)
340 HOST_LDFLAGS=$(LDFLAGS)
341 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
342 HOST_ALLOCA=$(ALLOCA)
343 HOST_MALLOC=$(MALLOC)
344 HOST_OBSTACK=$(OBSTACK)
345
346 # Actual name to use when installing a native compiler.
347 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
348
349 # Actual name to use when installing a cross-compiler.
350 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
351
352 # Choose the real default target.
353 ALL=all.internal
354
355 # Choose the real install target.
356 INSTALL_TARGET=install-normal
357
358 # Source for float.h. Overridden by cross-make.
359 FLOAT_H=float.h-nat
360
361 # Extra symbols for fixproto to define when parsing headers.
362 FIXPROTO_DEFINES =
363
364 # Extra flags to use when compiling crt{begin,end}.o.
365 CRTSTUFF_T_CFLAGS =
366
367 # End of variables for you to override.
368
369 # Definition of `all' is here so that new rules inserted by sed
370 # do not specify the default target.
371 # The real definition is under `all.internal' (for native compilers)
372 # or `all.cross' (for cross compilers).
373 all: all.indirect
374
375 # This tells GNU Make version 3 not to put all variables in the environment.
376 .NOEXPORT:
377
378 # sed inserts variable overrides after the following line.
379 ####target overrides
380 ####host overrides
381 ####cross overrides
382 ####build overrides
383 \f
384 # Now figure out from those variables how to compile and link.
385
386 all.indirect: $(ALL)
387
388 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
389 # ??? IN_GCC should be obsolete now.
390 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
391
392 # This is the variable actually used when we compile.
393 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
394
395 # Likewise.
396 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
397
398 # Even if ALLOCA is set, don't use it if compiling with GCC.
399 USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
400 USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
401 USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
402 USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
403
404 # Dependency on obstack, alloca, malloc or whatever library facilities
405 # are not installed in the system libraries.
406 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
407 LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
408
409 # Likewise, for use in the tools that must run on this machine
410 # even if we are cross-building GCC.
411 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
412 HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
413
414 # How to link with both our special library facilities
415 # and the system's installed libraries.
416 LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB)
417
418 # Likewise, for use in the tools that must run on this machine
419 # even if we are cross-building GCC.
420 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
421 $(HOST_CLIB)
422
423 HOST_RTL = $(HOST_PREFIX)rtl.o
424 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
425 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
426
427 # Specify the directories to be searched for header files.
428 # Both . and srcdir are used, in that order,
429 # so that tm.h and config.h will be found in the compilation
430 # subdirectory rather than in the source directory.
431 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
432
433 # Always use -I$(srcdir)/config when compiling.
434 .c.o:
435 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
436
437 # This tells GNU make version 3 not to export all the variables
438 # defined in this file into the environment.
439 .NOEXPORT:
440 \f
441 # Support for additional languages (other than c and objc).
442 # ??? objc can be supported this way too (leave for later).
443
444 # These next lines are overridden by configure.
445 LANG_MAKEFILES =
446 LANG_STAGESTUFF =
447 LANG_DIFF_EXCLUDES =
448
449 # Flags to pass to recursive makes.
450 # CC is set by configure. Hosts without symlinks need special handling
451 # because we need CC="stage1/xgcc -Bstage1/" to work in the language
452 # subdirectories.
453 # ??? The choices here will need some experimenting with.
454 FLAGS_TO_PASS = \
455 "AR_FLAGS=$(AR_FLAGS)" \
456 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
457 "BISON=$(BISON)" \
458 "BISONFLAGS=$(BISONFLAGS)" \
459 "CC=set-by-configure" \
460 "CFLAGS=$(CFLAGS)" \
461 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
462 "LDFLAGS=$(LDFLAGS)" \
463 "LEX=$(LEX)" \
464 "LEXFLAGS=$(LEXFLAGS)" \
465 "MAKEINFO=$(MAKEINFO)" \
466 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
467 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
468 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
469 "SHELL=$(SHELL)" \
470 "exeext=$(exeext)" \
471 "objext=$(objext)" \
472 "exec_prefix=$(exec_prefix)" \
473 "prefix=$(prefix)" \
474 "tooldir=$(tooldir)" \
475 "bindir=$(bindir)" \
476 "libsubdir=$(libsubdir)"
477 \f
478 # Lists of files for various purposes.
479
480 # A list of all the language-specific executables.
481 # This is overridden by configure.
482 COMPILERS = cc1$(exeext) cc1obj$(exeext)
483
484 # Language-specific object files for C.
485 C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
486 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
487
488 # Language-specific object files for Objective C.
489 OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
490 c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
491
492 # Files specific to the C interpreter bytecode compiler(s).
493 BC_OBJS = bc-emit.o bc-optab.o
494
495 # Bytecode header files constructed at build time; vmsconfig.com wants this.
496 BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
497
498 # Language-independent object files.
499 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
500 function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
501 rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
502 dbxout.o sdbout.o dwarfout.o xcoffout.o \
503 integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
504 regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
505 insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
506 insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
507 insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
508
509 # GEN files are listed separately, so they can be built before doing parallel
510 # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load
511 # them before rtl.o is compiled.
512 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
513
514 CCCP=cccp
515 # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
516 #CCCP=cppmain
517
518 # Files to be copied away after each stage in building.
519 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
520 insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
521 insn-attr.h insn-attrtab.c insn-opinit.c \
522 stamp-flags stamp-config stamp-codes \
523 stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
524 stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS \
525 genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
526 genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
527 genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
528 $(BC_ALL) \
529 stamp-bcarity stamp-bcopcode stamp-bcopname \
530 bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
531 $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
532 $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
533 protoize$(exeext) unprotoize$(exeext) \
534 specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
535 *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
536 *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
537 *.[si] \
538 $(LANG_STAGESTUFF)
539
540 # Members of libgcc1.a.
541 LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
542 _lshrsi3 _ashrsi3 _ashlsi3 \
543 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
544 _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
545 _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
546 _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
547 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
548
549 # Library members defined in libgcc2.c.
550 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
551 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
552 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
553 _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
554 _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
555 _fixtfdi _fixunstfdi _floatditf \
556 __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
557 _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
558 _pure
559
560 # Header files that are made available under the same name
561 # to programs compiled with GCC.
562 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
563 $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
564 $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
565 $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
566 $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
567 $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
568 $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
569 $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
570 $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS)
571
572 # The files that "belong" in CONFIG_H are deliberately omitted
573 # because having them there would not be useful in actual practice.
574 # All they would do is cause complete recompilation every time
575 # one of the machine description files is edited.
576 # That may or may not be what one wants to do.
577 # If it is, rm *.o is an easy way to do it.
578 # CONFIG_H = $(host_xm_file) $(tm_file)
579 CONFIG_H =
580 RTL_H = rtl.h rtl.def machmode.h machmode.def
581 TREE_H = tree.h real.h tree.def machmode.h machmode.def
582 BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
583 \f
584 # Language makefile fragments.
585
586 # The following targets define the interface between us and the languages.
587 #
588 # all.build, all.cross, start.encap, rest.encap,
589 # info, dvi,
590 # install-normal, install-common, install-info, install-man,
591 # uninstall, distdir,
592 # mostlyclean, clean, distclean, extraclean, maintainer-clean,
593 # stage1, stage2, stage3, stage4
594 #
595 # Each language is linked in with a series of hooks (since we can't use `::'
596 # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info).
597 # Configure computes and adds these here.
598
599 ####language hooks
600
601 # sed inserts language fragments after the following line.
602 ####language fragments
603
604 # End of language makefile fragments.
605 \f
606 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
607 .SUFFIXES: .in .def
608
609 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
610 $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \
611 $(LANG_MAKEFILES)
612 cp config.status config.run
613 $(SHELL) config.run
614 rm -f config.run
615
616 all.internal: start.encap rest.encap
617 # This is what to compile if making a cross-compiler.
618 # Note that we can compile enquire using the cross-compiler just built,
619 # although we can't run it on this machine.
620 all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
621 $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
622 # This is what to compile if making gcc with a cross-compiler.
623 all.build: native xgcc $(EXTRA_PARTS) lang.all.build
624 # This is what must be made before installing GCC and converting libraries.
625 start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap
626 # These can't be made until after GCC can run.
627 rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
628 # This is what is made with the host's compiler
629 # whether making a cross compiler or not.
630 native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
631
632 # Define the names for selecting languages in LANGUAGES.
633 C c: cc1
634 OBJC objc: cc1obj objc-runtime
635 OBJECTIVE-C objective-c: cc1obj objc-runtime
636 PROTO: proto
637
638 # Tell GNU make these are phony targets.
639 .PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
640
641 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
642 # a target to build even if it is up-to-date. So we must verify that
643 # config.status does not exist before failing.
644 config.status:
645 @if [ ! -f config.status ] ; then \
646 echo You must configure gcc. Look at the INSTALL file for details.; \
647 false; \
648 else \
649 true; \
650 fi
651
652 # On the target machine, finish building a cross compiler.
653 # This does the things that can't be done on the host machine.
654 rest.cross: $(LIBGCC) gfloat.h specs
655
656 # Verify that it works to compile and link libgcc1-test.
657 # If it does, then there are sufficient replacements for libgcc1.a.
658 libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
659 @echo "Testing libgcc1. Ignore linker warning messages."
660 $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
661 -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
662 libgcc1-test.o: libgcc1-test.c native xgcc
663 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
664
665 # Recompile all the language-independent object files.
666 # This is used only if the user explicitly asks for it.
667 compilations: ${OBJS}
668
669 # Create a list of the language-independent object files so the language
670 # subdirectories needn't mention their names explicitly.
671 stamp-objlist: Makefile $(OBJS) $(BC_OBJS)
672 echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z]\), ../\1,g' >stamp-objlist
673
674 # We call this executable `xgcc' rather than `gcc'
675 # to avoid confusion if the current directory is in the path
676 # and CC is `gcc'. It is renamed to `gcc' when it is installed.
677 xgcc: gcc.o version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
678 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
679
680 # Dump a specs file to make -B./ read these specs over installed ones.
681 specs: xgcc
682 $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
683 mv tmp-specs specs
684
685 # We do want to create an executable named `xgcc', so we can use it to
686 # compile libgcc2.a.
687 # Also create gcc-cross, so that install-common will install properly.
688 gcc-cross: xgcc
689 cp xgcc$(exeext) gcc-cross$(exeext)
690
691 cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
692 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
693
694 cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
695 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
696
697 # Copy float.h from its source.
698 gfloat.h: $(FLOAT_H)
699 -rm -f gfloat.h
700 cp $(FLOAT_H) gfloat.h
701
702 # Create float.h source for the native machine.
703 float.h-nat: enquire
704 -./enquire -f > tmp-float.h
705 mv tmp-float.h float.h-nat
706
707 # Create a dummy float.h source for a cross-compiler.
708 float.h-cross:
709 echo "#error float.h values not known for cross-compiler" > t-float.h-cross
710 mv t-float.h-cross float.h-cross
711
712 # Used to compile enquire with standard cc, but have forgotten why.
713 # Let's try with GCC.
714 enquire: enquire.o $(GCC_PARTS)
715 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
716 enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
717 # Breaking this line caused a problem with one version of GNU make.
718 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
719
720 # Build the version of limits.h that we will install.
721 xlimits.h: glimits.h limitx.h limity.h
722 if $(LIMITS_H_TEST) ; then \
723 cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
724 else \
725 cat $(srcdir)/glimits.h > tmp-xlimits.h; \
726 fi
727 mv tmp-xlimits.h xlimits.h
728 \f
729 # Build libgcc.a.
730 # This is done in two parts because some functions, in libgcc1.c,
731 # must be compiled with something other than GCC,
732 # while the rest, in libgcc2.c, must be compiled with xgcc.
733 # That means we can't do libgcc2.c until after xgcc, cc1, etc.
734
735 # Use this as value of LIBGCC1 to cause conversion to GNU library format.
736 # LIBCONVERT should put its output in libgcc1.conv.
737 libgcc1.conv: libgcc1.a
738 $(LIBCONVERT) libgcc1.a libgcc1.conv
739
740 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
741 # Make an empty file instead.
742 libgcc1.null: $(GCC_PASSES)
743 echo "__foo () {}" > dummy.c
744 $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
745 $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
746 rm -f dummy$(objext) dummy.c
747
748 # This is $(LIBGCC1) for a cross-compiler.
749 # We have no automatic way of building libgcc1.a,
750 # so it's up to the installer to find a way to do that.
751 # This rule deliberately does not depend on libgcc1.a
752 # so that it will fail if the installer hasn't provided it.
753 libgcc1.cross:
754 mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
755
756 # Compile the library of arithmetic subroutines with the native compiler.
757 # Don't compile it with GCC!
758 # (That would cause most arithmetic functions to call themselves.)
759 libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
760 -rm -f tmplibgcc1.a
761 # Actually build it in tmplibgcc1.a, then rename at end,
762 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
763 # -e causes any failing command to make this rule fail.
764 # -e doesn't work in certain shells, so we test $$? as well.
765 # lynx has a broken ar, it always complains when the initial library is
766 # empty, thus this command works only if we don't do -e
767 # There is a trailing backslash (\) deleted from the following line.
768 # set -e;
769 for name in $(LIB1FUNCS); \
770 do \
771 echo $${name}; \
772 rm -f $${name}$(objext); \
773 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
774 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
775 mv libgcc1$(objext) $${name}$(objext); \
776 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
777 rm -f $${name}$(objext); \
778 done
779 # Some shells crash when a loop has no items.
780 # So make sure there is always at least one--`..'.
781 # Then ignore it.
782 # We don't use -e here because there are if statements
783 # that should not make the command give up when the if condition is false.
784 # Instead, we test for failure after each command where it matters.
785 for file in .. $(LIB1FUNCS_EXTRA); \
786 do \
787 if [ x$${file} != x.. ]; then \
788 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
789 echo $${name}; \
790 if [ $${name}.asm = $${file} ]; then \
791 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
792 else true; fi; \
793 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
794 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
795 $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
796 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
797 rm -f $${name}.s $${name}$(objext); \
798 else true; \
799 fi; \
800 done
801 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
802 mv tmplibgcc1.a libgcc1.a
803
804 # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of
805 # functions. LIB1ASMSRC is the name of the source file in the config
806 # subdirectory.
807 libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
808 -rm -f tmplibgcc1.a libgcc1.S
809 cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
810 # Actually build it in tmplibgcc1.a, then rename at end,
811 # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
812 # -e causes any failing command to make this rule fail.
813 # -e doesn't work in certain shells, so we test $$? as well.
814 # lynx has a broken ar, it always complains when the initial library is
815 # empty, thus this command works only if we don't do -e
816 # There is a trailing backslash (\) deleted from the following line.
817 # set -e;
818 for name in $(LIB1ASMFUNCS); \
819 do \
820 echo $${name}; \
821 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
822 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
823 mv libgcc1$(objext) $${name}$(objext); \
824 $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
825 rm -f $${name}$(objext); \
826 done
827 -rm -f libgcc1.S
828 mv tmplibgcc1.a libgcc1-asm.a
829
830 # Generate assembly versions of the functions required for libgcc1.
831 # You'll still need to massage the code by hand (possibly hacking
832 # underscores and local labels) but this will get you started.
833 libgcc1.S: libgcc1.c $(CONFIG_H) config.status
834 -rm -f libgcc1.S
835 touch libgcc1.S
836 for name in $(LIB1FUNCS); \
837 do \
838 echo $${name}; \
839 $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
840 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
841 echo '#ifdef ' L$${name} >> libgcc1.S; \
842 cat libgcc1.s >> libgcc1.S; \
843 echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
844 echo "" >> libgcc1.S; \
845 done
846
847 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
848 # But recompiling cc1 should not force recompilation of libgcc2.a.
849 # If you want to force recompilation, delete libgcc2.a.
850 libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
851 -if [ -f libgcc2.ready ] ; then \
852 true; \
853 else \
854 touch libgcc2.ready; \
855 fi
856
857 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
858 machmode.h longlong.h gbl-ctors.h config.status
859 # Actually build it in tmplibgcc2.a, then rename at end,
860 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
861 -rm -f tmplibgcc2.a
862 # -e causes any failing command to make this rule fail.
863 # -e doesn't work in certain shells, so we test $$? as well.
864 # lynx has a broken ar, it always complains when the initial library is
865 # empty, thus this command works only if we don't do -e
866 # There is a trailing backslash (\) deleted from the following line.
867 # set -e;
868 for name in $(LIB2FUNCS); \
869 do \
870 echo $${name}; \
871 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
872 $(srcdir)/libgcc2.c -o $${name}$(objext); \
873 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
874 $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
875 rm -f $${name}$(objext); \
876 done
877 # Some shells crash when a loop has no items.
878 # So make sure there is always at least one--`..'.
879 # Then ignore it.
880 # We don't use -e here because there are if statements
881 # that should not make the command give up when the if condition is false.
882 # Instead, we test for failure after each command where it matters.
883 for file in .. $(LIB2FUNCS_EXTRA); \
884 do \
885 if [ x$${file} != x.. ]; then \
886 name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
887 oname=` echo $${name} | sed -e 's,.*/,,'`; \
888 echo $${name}; \
889 if [ $${name}.asm = $${file} ]; then \
890 cp $${file} $${name}.s || exit 1; file=$${name}.s; \
891 else true; fi; \
892 $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
893 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
894 $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
895 rm -f $${name}.s $${oname}$(objext); \
896 else true; \
897 fi; \
898 done
899 mv tmplibgcc2.a libgcc2.a
900 # These lines were deleted from above the mv command
901 # because ranlibing libgcc.a itself should suffice.
902 # -if [ x${HPUX_GAS} = x ] ; then \
903 # if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
904 # else true; fi
905
906 # Combine the various libraries into a single library, libgcc.a.
907 libgcc.a: $(LIBGCC1) $(LIBGCC2)
908 -rm -rf tmplibgcc.a libgcc.a tmpcopy
909 mkdir tmpcopy
910 -if [ x$(LIBGCC1) != x ]; \
911 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
912 else true; \
913 fi
914 # Some versions of ar (specifically the one in RISC/os 5.x), create an
915 # unwritable table of contents file, and then print an error message when
916 # the second ar command tries to overwrite this file. To avoid the error
917 # message from ar, we make sure all files are writable.
918 -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
919 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
920 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
921 rm -rf tmpcopy
922 -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
923 # Actually build it in tmplibgcc.a, then rename at end,
924 # so that libgcc.a itself remains nonexistent if compilation is aborted.
925 mv tmplibgcc.a libgcc.a
926
927 # Use the genmultilib shell script to generate the information the gcc
928 # driver program needs to select the library directory based on the
929 # switches.
930 multilib.h: $(srcdir)/genmultilib Makefile
931 $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \
932 "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
933
934 # Build multiple copies of libgcc.a, one for each target switch.
935 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
936 $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
937 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
938 dir=`echo $$i | sed -e 's/;.*$$//'`; \
939 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
940 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
941 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
942 RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
943 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
944 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
945 LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
946 dir="$${dir}" stmp-multilib-sub; \
947 if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
948 done
949 touch stmp-multilib
950
951 # Subroutine of stmp-multilib so make -n works.
952 stmp-multilib-sub:
953 rm -f $(dir)/libgcc.a $(LIBGCC2)
954 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
955 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
956 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
957 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
958 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
959 then true; \
960 else rm -f $(LIBGCC1); \
961 fi
962 if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
963 then true; \
964 else \
965 $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
966 AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
967 HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
968 LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
969 fi
970 rm -rf tmplibgcc.a tmpcopy
971 mkdir tmpcopy
972 if [ x$(LIBGCC1) != x ]; \
973 then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
974 else true; \
975 fi
976 (cd tmpcopy; $(AR) x ../$(LIBGCC2))
977 (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
978 rm -rf libgcc2.a tmpcopy
979 if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
980 if [ -d $(dir) ]; then true; else mkdir $(dir); fi
981 mv tmplibgcc.a $(dir)/libgcc.a
982
983 objc-runtime: libobjc.a
984
985 # Build the Objective C runtime library.
986 libobjc.a: cc1obj stmp-int-hdrs libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
987 if [ -d objc ]; then true; else mkdir objc; fi
988 thisdir1=`pwd`; \
989 srcdir1=`cd $(srcdir); pwd`; \
990 cd objc; \
991 $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
992 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
993 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
994 GCC_CFLAGS="$(GCC_CFLAGS)"
995 -rm -f libobjc.a
996 ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
997 -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
998
999 # This is used by objc/Makefile if the user runs that directly.
1000 sublibobjc.a: cc1obj stmp-int-hdrs libgcc2.ready
1001 thisdir1=`pwd`; \
1002 srcdir1=`cd $(srcdir); pwd`; \
1003 cd objc; \
1004 $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
1005 srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1006 GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
1007 GCC_CFLAGS="$(GCC_CFLAGS)"
1008
1009 # Compile two additional files that are linked with every program
1010 # linked using GCC on systems using COFF or ELF, for the sake of C++
1011 # constructors.
1012 crtbegin.o: stamp-crt ; @true
1013 crtend.o: stamp-crt; @true
1014
1015 stamp-crt: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1016 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
1017 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1018 -g0 -c $(srcdir)/crtstuff.c
1019 mv crtstuff$(objext) crtbegin$(objext)
1020 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
1021 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1022 -g0 -c $(srcdir)/crtstuff.c
1023 mv crtstuff$(objext) crtend$(objext)
1024 touch stamp-crt
1025
1026 # On some systems we also want to install versions of these files
1027 # compiled using PIC for use in shared libraries.
1028 crtbeginS.o crtendS.o: stamp-crtS ; @true
1029
1030 stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
1031 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
1032 -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
1033 -g0 -c $(srcdir)/crtstuff.c -fPIC
1034 mv crtstuff$(objext) crtbeginS$(objext)
1035 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
1036 -DCRT_END -finhibit-size-directive -fno-inline-functions \
1037 -g0 -c $(srcdir)/crtstuff.c -fPIC
1038 mv crtstuff$(objext) crtendS$(objext)
1039 touch stamp-crtS
1040 \f
1041 # Compiling object files from source files.
1042
1043 # Note that dependencies on obstack.h are not written
1044 # because that file is not part of GCC.
1045
1046 # C language specific files.
1047
1048 c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1049 $(srcdir)/c-parse.h c-tree.h input.h flags.h
1050 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
1051 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
1052 $(srcdir)/c-parse.c: $(srcdir)/c-parse.y
1053 cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
1054 $(srcdir)/c-parse.y: c-parse.in
1055 sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
1056 -e "/^ifc$$/d" -e "/^end ifc$$/d" \
1057 $(srcdir)/c-parse.in >tmp-c-parse.y
1058 $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
1059
1060 $(srcdir)/c-gperf.h: c-parse.gperf
1061 gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \
1062 $(srcdir)/c-parse.gperf >tmp-gperf.h
1063 $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
1064
1065 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
1066 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
1067 c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
1068 c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h $(srcdir)/c-parse.h \
1069 input.h flags.h $(srcdir)/c-gperf.h c-pragma.h
1070 c-aux-info.o : c-aux-info.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
1071 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
1072 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-pragma.h
1073 c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
1074
1075 # To make a configuration always use collect2, set USE_COLLECT2 to ld.
1076 ld: collect2
1077 rm -f ld$(exeext)
1078 ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
1079 || cp collect2$(exeext) ld$(exeext)
1080
1081 collect2 : collect2.o cplus-dem.o underscore.o version.o $(LIBDEPS)
1082 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
1083 -rm -f collect2$(exeext)
1084 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \
1085 cplus-dem.o underscore.o version.o $(LIBS)
1086
1087 collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
1088 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1089 -DTARGET_MACHINE=\"$(target)\" $(MAYBE_USE_COLLECT2) \
1090 -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
1091
1092 cplus-dem.o: cplus-dem.c demangle.h
1093
1094 underscore.c: stamp-under ; @true
1095
1096 stamp-under: $(GCC_PASSES)
1097 echo "int xxy_us_dummy;" >tmp-dum.c
1098 $(GCC_FOR_TARGET) -S tmp-dum.c
1099 echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
1100 if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \
1101 echo "int prepends_underscore = 1;" >>tmp-under.c; \
1102 else \
1103 echo "int prepends_underscore = 0;" >>tmp-under.c; \
1104 fi
1105 $(srcdir)/move-if-change tmp-under.c underscore.c
1106 -rm -f tmp-dum.c tmp-dum.s
1107 touch stamp-under
1108
1109 # Objective C language specific files.
1110
1111 objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
1112 c-tree.h input.h flags.h objc-act.h
1113 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
1114 $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
1115 cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
1116 $(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
1117 sed -e "/^ifc$$/,/^end ifc$$/d" \
1118 -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
1119 $(srcdir)/c-parse.in >tmp-objc-prs.y
1120 $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc-parse.y
1121
1122 objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
1123 flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
1124
1125 # A file used by all variants of C.
1126
1127 c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
1128
1129 # Language-independent files.
1130
1131 gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
1132 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1133 -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
1134 -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
1135 -DDEFAULT_TARGET_VERSION=\"$(version)\" \
1136 -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
1137 -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
1138 $(MAYBE_TARGET_DEFAULT) \
1139 -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
1140
1141 dumpvers: dumpvers.c
1142
1143 version.o: version.c
1144 obstack.o: obstack.c
1145
1146 convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
1147
1148 tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
1149 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
1150 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
1151 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
1152 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
1153 flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
1154 $(lang_options_files)
1155 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1156 $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
1157 -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
1158
1159 rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
1160
1161 print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
1162 rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
1163
1164 varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
1165 defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
1166 output.h bytecode.h c-pragma.h
1167 function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1168 insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
1169 recog.h output.h bytecode.h
1170 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \
1171 insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
1172 recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
1173 bc-emit.h
1174 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
1175 insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
1176 typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
1177 bc-emit.h modemap.def
1178 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
1179 insn-flags.h
1180 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1181 insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
1182 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
1183 insn-config.h expr.h recog.h insn-flags.h insn-codes.h
1184 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1185 insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
1186 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
1187 insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
1188 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
1189 insn-config.h reload.h
1190 dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
1191 insn-config.h reload.h output.h defaults.h
1192 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
1193 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
1194 function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
1195 bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
1196 real.o : real.c $(CONFIG_H) $(TREE_H)
1197 getpwd.o : getpwd.c $(CONFIG_H)
1198
1199 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
1200 insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
1201 bytecode.h
1202
1203 jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
1204 insn-config.h insn-flags.h insn-codes.h expr.h real.h
1205 stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
1206
1207 cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
1208 insn-config.h recog.h
1209 loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
1210 insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
1211 unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
1212 integrate.h regs.h flags.h expr.h loop.h
1213 flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
1214 basic-block.h regs.h hard-reg-set.h output.h
1215 combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h \
1216 insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
1217 basic-block.h recog.h real.h hard-reg-set.h
1218 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
1219 basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
1220 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
1221 regs.h hard-reg-set.h insn-config.h recog.h output.h
1222 global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
1223 basic-block.h regs.h hard-reg-set.h insn-config.h output.h
1224
1225 reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
1226 reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
1227 reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
1228 reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
1229 basic-block.h recog.h output.h
1230 caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
1231 regs.h hard-reg-set.h insn-codes.h insn-config.h basic-block.h recog.h \
1232 reload.h expr.h
1233 reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
1234 basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
1235 flags.h output.h
1236 sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
1237 flags.h insn-config.h insn-attr.h
1238 final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
1239 recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
1240 hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
1241 recog.o : recog.c $(CONFIG_H) $(RTL_H) \
1242 regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
1243 insn-flags.h insn-codes.h real.h
1244 reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
1245 regs.h hard-reg-set.h flags.h insn-config.h
1246
1247 $(out_object_file): $(out_file) $(CONFIG_H) \
1248 $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
1249 insn-flags.h output.h insn-attr.h insn-codes.h
1250 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
1251
1252 # Build auxiliary files that support ecoff format.
1253 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
1254 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
1255
1256 mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
1257
1258 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
1259 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
1260
1261 mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
1262
1263 # Build file to support OSF/rose half-pic format.
1264 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
1265
1266 # Normally this target is not used; but it is used if you
1267 # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c
1268 # from the GNU Emacs distribution.
1269 alloca.o: alloca.c
1270 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
1271 -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
1272 $(ALLOCA_FINISH)
1273 \f
1274 # Generate header and source files from the machine description,
1275 # and compile them.
1276
1277 .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
1278 insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
1279 insn-attr.h insn-attrtab.c
1280
1281 # The following pair of rules has this effect:
1282 # genconfig is run only if the md has changed since genconfig was last run;
1283 # but the file insn-config.h is touched only when its contents actually change.
1284
1285 # Each of the other insn-* files is handled by a similar pair of rules.
1286
1287 # This causes an anomaly in the results of make -n
1288 # because insn-* is older than stamp-*
1289 # and thus make -n thinks that insn-* will be updated
1290 # and force recompilation of things that depend on it.
1291 # We use move-if-change precisely to avoid such recompilation.
1292 # But there is no way to teach make -n that it will be avoided.
1293
1294 # Each of the insn-*.[ch] rules has a semicolon at the end,
1295 # for otherwise the system Make on SunOS 4.1 never tries
1296 # to recompile insn-*.o. To avoid problems and extra noise from
1297 # versions of make which don't like empty commands (nothing after the
1298 # trailing `;'), we call true for each.
1299
1300 insn-config.h: stamp-config ; @true
1301 stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
1302 ./genconfig $(md_file) > tmp-config.h
1303 $(srcdir)/move-if-change tmp-config.h insn-config.h
1304 touch stamp-config
1305
1306 insn-flags.h: stamp-flags ; @true
1307 stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
1308 ./genflags $(md_file) > tmp-flags.h
1309 $(srcdir)/move-if-change tmp-flags.h insn-flags.h
1310 touch stamp-flags
1311
1312 insn-codes.h: stamp-codes ; @true
1313 stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
1314 ./gencodes $(md_file) > tmp-codes.h
1315 $(srcdir)/move-if-change tmp-codes.h insn-codes.h
1316 touch stamp-codes
1317
1318 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
1319 insn-config.h insn-flags.h insn-codes.h
1320 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
1321
1322 insn-emit.c: stamp-emit ; @true
1323 stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
1324 ./genemit $(md_file) > tmp-emit.c
1325 $(srcdir)/move-if-change tmp-emit.c insn-emit.c
1326 touch stamp-emit
1327
1328 insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
1329 real.h output.h flags.h
1330 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
1331
1332 insn-recog.c: stamp-recog ; @true
1333 stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
1334 ./genrecog $(md_file) > tmp-recog.c
1335 $(srcdir)/move-if-change tmp-recog.c insn-recog.c
1336 touch stamp-recog
1337
1338 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
1339 insn-config.h flags.h rtl.h recog.h expr.h reload.h
1340 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
1341
1342 insn-opinit.c: stamp-opinit ; @true
1343 stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
1344 ./genopinit $(md_file) > tmp-opinit.c
1345 $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
1346 touch stamp-opinit
1347
1348 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
1349 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
1350
1351 insn-extract.c: stamp-extract ; @true
1352 stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
1353 ./genextract $(md_file) > tmp-extract.c
1354 $(srcdir)/move-if-change tmp-extract.c insn-extract.c
1355 touch stamp-extract
1356
1357 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
1358 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
1359
1360 insn-peep.c: stamp-peep ; @true
1361 stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
1362 ./genpeep $(md_file) > tmp-peep.c
1363 $(srcdir)/move-if-change tmp-peep.c insn-peep.c
1364 touch stamp-peep
1365
1366 insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
1367 insn-attr.h insn-config.h
1368 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
1369
1370 insn-attr.h: stamp-attr ; @true
1371 stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
1372 ./genattr $(md_file) > tmp-attr.h
1373 $(srcdir)/move-if-change tmp-attr.h insn-attr.h
1374 touch stamp-attr
1375
1376 insn-attrtab.c: stamp-attrtab ; @true
1377 stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
1378 if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
1379 then \
1380 echo Using $(PREMADE_ATTRTAB); \
1381 cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \
1382 else \
1383 ./genattrtab $(md_file) > tmp-attrtab.c; \
1384 fi
1385 $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
1386 touch stamp-attrtab
1387
1388 insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
1389 hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
1390 insn-codes.h
1391 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
1392
1393 insn-output.c: stamp-output ; @true
1394 stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
1395 ./genoutput $(md_file) > tmp-output.c
1396 $(srcdir)/move-if-change tmp-output.c insn-output.c
1397 touch stamp-output
1398 \f
1399 # Compile the programs that generate insn-* from the machine description.
1400 # They are compiled with $(HOST_CC), and associated libraries,
1401 # since they need to run on this machine
1402 # even if GCC is being compiled to run on some other machine.
1403
1404 # $(CONFIG_H) is omitted from the deps of the gen*.o
1405 # because these programs don't really depend on anything
1406 # about the target machine. They do depend on config.h itself,
1407 # since that describes the host machine.
1408
1409 # Pass the md file through cpp if the target requests it.
1410 $(MD_FILE): $(MD_DEPS)
1411 rm -f $@
1412 $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
1413 mv tmp-$@ $@
1414
1415 genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
1416 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1417 genconfig.o $(HOST_RTL) $(HOST_LIBS)
1418
1419 genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
1420 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
1421
1422 genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
1423 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1424 genflags.o $(HOST_RTL) $(HOST_LIBS)
1425
1426 genflags.o : genflags.c $(RTL_H) $(build_xm_file)
1427 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
1428
1429 gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
1430 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1431 gencodes.o $(HOST_RTL) $(HOST_LIBS)
1432
1433 gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
1434 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
1435
1436 genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
1437 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1438 genemit.o $(HOST_RTL) $(HOST_LIBS)
1439
1440 genemit.o : genemit.c $(RTL_H) $(build_xm_file)
1441 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
1442
1443 genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
1444 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1445 genopinit.o $(HOST_RTL) $(HOST_LIBS)
1446
1447 genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
1448 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
1449
1450 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
1451 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1452 genrecog.o $(HOST_RTL) $(HOST_LIBS)
1453
1454 genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
1455 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
1456
1457 genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
1458 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1459 genextract.o $(HOST_RTL) $(HOST_LIBS)
1460
1461 genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
1462 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
1463
1464 genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
1465 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1466 genpeep.o $(HOST_RTL) $(HOST_LIBS)
1467
1468 genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
1469 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
1470
1471 genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
1472 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1473 genattr.o $(HOST_RTL) $(HOST_LIBS)
1474
1475 genattr.o : genattr.c $(RTL_H) $(build_xm_file)
1476 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
1477
1478 genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
1479 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1480 genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
1481
1482 genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h
1483 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
1484
1485 genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
1486 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1487 genoutput.o $(HOST_RTL) $(HOST_LIBS)
1488
1489 genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
1490 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
1491 \f
1492 # Compile the libraries to be used by gen*.
1493 # If we are not cross-building, gen* use the same .o's that cc1 will use,
1494 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
1495 # with the rules for rtl.o, alloca.o, etc.
1496 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
1497 rm -f $(HOST_PREFIX)rtl.c
1498 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
1499 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
1500
1501 $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
1502 rm -f $(HOST_PREFIX)print-rtl.c
1503 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
1504 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
1505
1506 $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
1507 rm -f $(HOST_PREFIX)rtlanal.c
1508 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
1509 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
1510
1511 $(HOST_PREFIX_1)alloca.o: alloca.c
1512 rm -f $(HOST_PREFIX)alloca.c
1513 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
1514 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
1515
1516 $(HOST_PREFIX_1)obstack.o: obstack.c
1517 rm -f $(HOST_PREFIX)obstack.c
1518 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
1519 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
1520
1521 $(HOST_PREFIX_1)malloc.o: malloc.c
1522 rm -f $(HOST_PREFIX)malloc.c
1523 sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
1524 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
1525
1526 # This satisfies the dependency that we get if you cross-compile a compiler
1527 # that does not need to compile alloca, malloc or whatever.
1528 $(HOST_PREFIX_1):
1529 touch $(HOST_PREFIX_1)
1530 \f
1531 # Remake bytecode files.
1532 BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
1533
1534 bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
1535 bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
1536 bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
1537 bc-opcode.h bc-typecd.h bc-typecd.def
1538
1539 bi-arity: bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
1540 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1541 bi-arity.o $(BI_OBJ) $(HOST_LIBS)
1542 bi-opcode: bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
1543 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1544 bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
1545 bi-opname: bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
1546 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1547 bi-opname.o $(BI_OBJ) $(HOST_LIBS)
1548
1549 $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
1550 $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
1551 cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
1552
1553 bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
1554 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1555 $(srcdir)/bi-parser.c
1556 bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
1557 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1558 $(srcdir)/bi-lexer.c
1559 bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
1560 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1561 $(srcdir)/bi-arity.c
1562 bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
1563 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1564 $(srcdir)/bi-opcode.c
1565 bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
1566 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1567 $(srcdir)/bi-opname.c
1568 bi-reverse.o: bi-reverse.c bi-defs.h
1569 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
1570 $(srcdir)/bi-reverse.c
1571
1572 bc-arity.h: stamp-bcarity ; @true
1573 stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
1574 ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
1575 $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
1576 touch stamp-bcarity
1577
1578 bc-opcode.h: stamp-bcopcode ; @true
1579 stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
1580 ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
1581 $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
1582 touch stamp-bcopcode
1583
1584 bc-opname.h: stamp-bcopname ; @true
1585 stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
1586 ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
1587 $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
1588 touch stamp-bcopname
1589
1590 bytecode.mostlyclean:
1591 -rm -f bc-arity.h bc-opcode.h bc-opname.h
1592
1593 bytecode.distclean bytecode.clean: bytecode.mostlyclean
1594 -rm -f bi-arity bi-opcode bi-opname bi-lexer
1595
1596 bytecode.maintainer-clean: bytecode.clean
1597 -rm -f bi-parser.c bi-parser.h
1598
1599 \f
1600 # Remake cpp and protoize.
1601
1602 # Making the preprocessor
1603 cpp: $(CCCP)
1604 -rm -f cpp$(exeext)
1605 ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
1606 || cp $(CCCP)$(exeext) cpp$(exeext)
1607 cccp: cccp.o cexp.o version.o $(LIBDEPS)
1608 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
1609 version.o $(LIBS)
1610 cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
1611 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
1612 $(srcdir)/cexp.c: $(srcdir)/cexp.y
1613 cd $(srcdir); $(BISON) -o cexp.c cexp.y
1614
1615 cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
1616 # The reason we use $(libdir)/g++-include rather than using libsubdir
1617 # is for compatibility with the current version of libg++.
1618 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1619 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1620 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1621 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1622 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1623 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1624 -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
1625
1626 cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
1627 version.o $(LIBDEPS)
1628 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
1629 cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
1630
1631 cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
1632 $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1633 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1634 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1635 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1636 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1637 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1638 -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
1639
1640 cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
1641
1642 cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
1643
1644 cpphash.o: cpphash.c cpplib.h cpphash.h
1645
1646 # Note for the stamp targets, we run the program `true' instead of
1647 # having an empty command (nothing following the semicolon).
1648
1649 proto: config.status protoize unprotoize SYSCALLS.c.X
1650
1651 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
1652 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1653 protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
1654 protoize.o: stamp-proto ; @true
1655
1656 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
1657 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
1658 unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
1659 unprotoize.o: stamp-proto ; @true
1660
1661 stamp-proto: protoize.c getopt.h $(CONFIG_H)
1662 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1663 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1664 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1665 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1666 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1667 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1668 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1669 -DUNPROTOIZE $(srcdir)/protoize.c
1670 mv protoize$(objext) unprotoize$(objext)
1671 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1672 -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
1673 -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
1674 -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
1675 -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
1676 -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
1677 -DSTD_PROTO_DIR=\"$(libsubdir)\" \
1678 $(srcdir)/protoize.c
1679 touch stamp-proto
1680
1681 getopt.o: getopt.c getopt.h
1682 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
1683 getopt1.o: getopt1.c getopt.h
1684 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
1685
1686 # This info describes the target machine, so compile with GCC just built.
1687 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
1688 stmp-int-hdrs
1689 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1690 cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
1691 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
1692 -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
1693 -rm -f SYSCALLS.c tmp-SYSCALLS.s
1694
1695
1696 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
1697 -rm -f tmp-proto.[cso]
1698 cp $(srcdir)/protoize.c tmp-proto.c
1699 chmod u+w tmp-proto.c
1700 ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1701 $(CFLAGS) $(INCLUDES) \
1702 -DGCC_INCLUDE_DIR=0 \
1703 -DGPLUSPLUS_INCLUDE_DIR=0 \
1704 -DCROSS_INCLUDE_DIR=0 \
1705 -DTOOL_INCLUDE_DIR=0 \
1706 -DSTD_PROTO_DIR=0" tmp-proto.c
1707 @echo '**********' Expect 400 lines of differences.
1708 -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
1709 -wc -l tmp-proto.diff
1710 ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
1711 $(CFLAGS) $(INCLUDES) \
1712 -DGCC_INCLUDE_DIR=0 \
1713 -DGPLUSPLUS_INCLUDE_DIR=0 \
1714 -DCROSS_INCLUDE_DIR=0 \
1715 -DTOOL_INCLUDE_DIR=0 \
1716 -DSTD_PROTO_DIR=0" tmp-proto.c
1717 @echo Expect zero differences.
1718 diff $(srcdir)/protoize.c tmp-proto.c | cat
1719 -rm -f tmp-proto.[cs] tmp-proto$(objext)
1720 \f
1721 # Build the include directory. The stamp files are stmp-* rather than
1722 # stamp-* so that mostlyclean does not force the include directory to
1723 # be rebuilt.
1724
1725 # Build the include directory except for float.h (which depends upon
1726 # enquire).
1727 stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h objc-headers
1728 # Copy in the headers provided with gcc.
1729 # The sed command gets just the last file name component;
1730 # this is necessary because VPATH could add a dirname.
1731 # Using basename would be simpler, but some systems don't have it.
1732 objdir=`pwd`; \
1733 cd $(srcdir); \
1734 for file in $(USER_H); do \
1735 realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
1736 rm -f $$objdir/include/$$realfile; \
1737 cp ginclude/$$realfile $$objdir/include; \
1738 chmod a+r $$objdir/include/$$realfile; \
1739 done
1740 rm -f include/limits.h
1741 cp xlimits.h include/limits.h
1742 chmod a+r include/limits.h
1743 # Install the README
1744 rm -f include/README
1745 cp $(srcdir)/README-fixinc include/README
1746 chmod a+r include/README
1747 touch stmp-int-hdrs
1748
1749 # Build the complete include directory.
1750 stmp-headers: stmp-int-hdrs gfloat.h
1751 rm -f include/float.h
1752 cp gfloat.h include/float.h
1753 chmod a+r include/float.h
1754 touch stmp-headers
1755
1756 # Build fixed copies of system files.
1757 stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
1758 rm -rf include
1759 mkdir include
1760 if [ x$(FIXINCLUDES) != xMakefile.in ]; \
1761 then \
1762 for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
1763 if [ -d $$dir ]; \
1764 then \
1765 $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
1766 else true; fi; \
1767 done; \
1768 else true; \
1769 fi
1770 rm -f include/syslimits.h
1771 if [ -f include/limits.h ]; then \
1772 mv include/limits.h include/syslimits.h; \
1773 else \
1774 cp $(srcdir)/gsyslimits.h include/syslimits.h; \
1775 fi
1776 chmod a+r include/syslimits.h
1777 touch stmp-fixinc
1778
1779 # copy objc header files into build directory
1780 objc-headers: stmp-fixinc
1781 if [ -d include ]; then true; else mkdir include; fi
1782 if [ -d objc ]; then true; else mkdir objc; fi
1783 thisdir1=`pwd`; \
1784 srcdir1=`cd $(srcdir); pwd`; \
1785 cd objc; \
1786 $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
1787 srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
1788 GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
1789 GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
1790 touch objc-headers
1791
1792 # Files related to the fixproto script.
1793
1794 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
1795 CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
1796 export CC; \
1797 $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
1798 mv tmp-deduced.h deduced.h
1799
1800 gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
1801 ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
1802 gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
1803
1804 gen-protos.o: gen-protos.c scan.h $(build_xm_file)
1805 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
1806
1807 scan.o: scan.c scan.h $(build_xm_file)
1808 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
1809
1810 xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
1811 cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
1812 mv tmp-fixtmp.c fixtmp.c
1813 $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
1814 | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
1815 | ./gen-protos >xsys-protos.hT
1816 mv xsys-protos.hT xsys-protos.h
1817 rm -rf fixtmp.c
1818
1819 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
1820 cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
1821 $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
1822 scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
1823 cppexp.o $(HOST_LIBS)
1824
1825 fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
1826 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
1827
1828 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
1829 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
1830
1831 # stmp-fixproto depends on this, not on fix-header directly.
1832 # The idea is to make sure fix-header gets built,
1833 # but not rerun fixproto after each stage
1834 # just because fix-header's mtime has changed.
1835 fixhdr.ready: fix-header
1836 -if [ -f fixhdr.ready ] ; then \
1837 true; \
1838 else \
1839 touch fixhdr.ready; \
1840 fi
1841
1842 # stmp-headers is to make sure fixincludes has already finished.
1843 # The if statement is so that we don't run fixproto a second time
1844 # if it has already been run on the files in `include'.
1845 stmp-fixproto: fixhdr.ready fixproto stmp-headers
1846 @echo "Various warnings and error messages from fixproto are normal"
1847 -if [ -d include ] ; then true; else mkdir include; fi
1848 -if [ -f include/fixed ] ; then true; \
1849 else \
1850 : This line works around a 'make' bug in BSDI 1.1.; \
1851 FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
1852 $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
1853 touch include/fixed; \
1854 fi
1855 touch stmp-fixproto
1856 \f
1857 # Remake the info files.
1858
1859 doc: info
1860 info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
1861
1862 $(srcdir)/cpp.info: cpp.texi
1863 cd $(srcdir); $(MAKEINFO) cpp.texi
1864
1865 $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
1866 md.texi rtl.texi tm.texi
1867 cd $(srcdir); $(MAKEINFO) gcc.texi
1868
1869 dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
1870
1871 # This works with GNU Make's default rule.
1872 $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
1873 md.texi rtl.texi tm.texi
1874 $(TEXI2DVI) $<
1875
1876 # This works with GNU Make's default rule.
1877 $(srcdir)/cpp.dvi: cpp.texi
1878 $(TEXI2DVI) $<
1879
1880 $(srcdir)/INSTALL: install1.texi install.texi
1881 $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
1882 `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
1883 \f
1884 # Deletion of files made during compilation.
1885 # There are four levels of this:
1886 # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
1887 # `mostlyclean' is useful while working on a particular type of machine.
1888 # It deletes most, but not all, of the files made by compilation.
1889 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
1890 # `clean' deletes everything made by running `make all'.
1891 # `distclean' also deletes the files made by config.
1892 # `maintainer-clean' also deletes everything that could be regenerated
1893 # automatically. We remove as much from the language subdirectories as we can
1894 # (less duplicated code).
1895
1896
1897 mostlyclean: bytecode.mostlyclean lang.mostlyclean
1898 -rm -f $(STAGESTUFF)
1899 # Clean the objc subdir if we created one.
1900 if [ -d objc ]; then \
1901 srcdir1=`cd $(srcdir); pwd`; \
1902 cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
1903 else true; fi
1904 -rm -f libobjc.a
1905 # Delete the temporary source copies for cross compilation.
1906 -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
1907 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
1908 -rm -f $(HOST_PREFIX_1)obstack.c
1909 # Delete the temp files made in the course of building libgcc.a.
1910 -rm -f tmplibgcc* tmpcopy xlimits.h
1911 for name in $(LIB1FUNCS); do rm -f $${name}.c; done
1912 # Delete other temporary files.
1913 -rm -f tmp-float.h tmp-gcc.xtar.gz
1914 -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
1915 -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
1916 -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
1917 -rm -f tmp-fixtmp.c xsys-protos.hT
1918 # Delete the stamp files.
1919 -rm -f stamp-* tmp-*
1920 -rm -f */stamp-* */tmp-*
1921 # Delete debugging dump files.
1922 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
1923 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
1924 -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
1925 -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
1926 -rm -f */*.sched2 */*.stack
1927 # Delete some files made during installation.
1928 -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
1929 -rm -f collect collect2 mips-tfile mips-tdump alloca.s
1930 # Delete files generated for fixproto
1931 -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
1932 gen-protos fixproto.list fixtmp.* fixhdr.ready
1933 # Delete unwanted output files from TeX.
1934 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
1935 -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
1936 # Delete sorted indices we don't actually use.
1937 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
1938 # Delete core dumps.
1939 -rm -f core */core
1940
1941 # Delete all files made by compilation
1942 # that don't exist in the distribution.
1943 clean: mostlyclean bytecode.clean lang.clean
1944 # It may not be quite desirable to delete unprotoize.c here,
1945 # but the spec for `make clean' requires it.
1946 # Using unprotoize.c is not quite right in the first place,
1947 # but what better way is there?
1948 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
1949 -rm -f libgcc1.null
1950 -rm -f *.dvi
1951 -rm -f */*.dvi
1952 -if [ -f md.pre-cpp ]; then \
1953 rm -f md ; \
1954 fi
1955 # Delete the include directory.
1956 -rm -rf stmp-* include objc-headers
1957 -rm -f */stmp-*
1958 # Delete files used by the "multilib" facility (including libgcc subdirs).
1959 -rm -f multilib.h tmpmultilib*
1960 -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
1961 rm -rf $(MULTILIB_DIRNAMES); \
1962 else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
1963 rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
1964 fi ; fi
1965
1966 # Delete all files that users would normally create
1967 # while building and installing GCC.
1968 distclean: clean bytecode.distclean lang.distclean
1969 -rm -f tm.h config.h tconfig.h hconfig.h md
1970 -rm -f config.status config.run
1971 -rm -f Makefile specs.h options.h *.oaux
1972 -rm -fr stage1 stage2 stage3 stage4
1973 -rm -f */stage1 */stage2 */stage3 */stage4 */include
1974 -rm -f objc-parse.output
1975 -rm -f c-parse.output
1976 -rm -f *.asm
1977
1978 # Delete anything likely to be found in the source directory
1979 # that shouldn't be in the distribution.
1980 extraclean: distclean lang.extraclean
1981 -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
1982 -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
1983 -rm -f config/*/=* config/*/"#"* config/*/*~*
1984 -rm -f config/*/*.orig config/*/*.rej
1985 -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
1986 -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
1987 -rm -f *lose config/*lose config/*/*lose
1988 -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
1989 -rm -f */=* */"#"* */*~*
1990 -rm -f */patch* */*.orig */*.rej
1991 -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
1992 -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
1993 -rm -f */*lose */*.s */*.s[0-9] */*.i
1994
1995 # Get rid of every file that's generated from some other file.
1996 # Most of these files ARE PRESENT in the GCC distribution.
1997 maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean
1998 -rm -f c-parse.y c-gperf.h objc-parse.y
1999 -rm -f objc-parse.c objc-parse.output
2000 -rm -f c-parse.c c-parse.h c-parse.output
2001 -rm -f cexp.c cexp.output TAGS
2002 -rm -f cpp.info* cpp.??s cpp.*aux
2003 -rm -f gcc.info* gcc.??s gcc.*aux
2004 \f
2005 # Entry points `install' and `uninstall'.
2006 # Also use `install-collect2' to install collect2 when the config files don't.
2007
2008 # The semicolon is to prevent the install.sh -> install default rule
2009 # from doing anything. Having it run true helps avoid problems and
2010 # noise from versions of make which don't like to have null commands.
2011 install: $(INSTALL_TARGET) ; @true
2012
2013 # Copy the compiler files into directories where they will be run.
2014 # Install the driver last so that the window when things are
2015 # broken is small.
2016 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
2017 install-libobjc install-man install-info lang.install-normal install-driver
2018
2019 # Do nothing while making gcc with a cross-compiler. The person who
2020 # makes gcc for the target machine has to know how to put a complete
2021 # gcc together by hand.
2022 install-build: force
2023 @echo You have to install gcc on your target machine by hand.
2024
2025 # Run this on the target machine
2026 # to finish installation of cross compiler.
2027 install-cross-rest: install-float-h-cross
2028
2029 # Install float.h for cross compiler.
2030 # Run this on the target machine!
2031 install-float-h-cross: install-dir
2032 # if [ -f enquire ] ; then true; else false; fi
2033 # Note: don't use -. We should fail right away if enquire was not made.
2034 ./enquire -f > $(tmpdir)/float.h
2035 -rm -f $(libsubdir)/include/float.h
2036 $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
2037 -rm -f $(tmpdir)/float.h
2038 chmod a-x $(libsubdir)/include/float.h
2039
2040 # Create the installation directory.
2041 install-dir:
2042 -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
2043 -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
2044 # This dir isn't currently searched by cpp.
2045 # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
2046 -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
2047 -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
2048 -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
2049 -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
2050 -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
2051 -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
2052 -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
2053 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
2054 # We don't use mkdir -p to create the parents of mandir,
2055 # because some systems don't support it.
2056 # Instead, we use this technique to create the immediate parent of mandir.
2057 -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
2058 if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
2059 -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
2060
2061 # Install the compiler executables built during cross compilation.
2062 install-common: native install-dir $(EXTRA_PARTS) lang.install-common
2063 for file in $(COMPILERS); do \
2064 if [ -f $$file ] ; then \
2065 rm -f $(libsubdir)/$$file; \
2066 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2067 else true; \
2068 fi; \
2069 done
2070 for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
2071 if [ x"$$file" != x.. ]; then \
2072 rm -f $(libsubdir)/$$file; \
2073 $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
2074 else true; fi; \
2075 done
2076 for file in $(EXTRA_PARTS) ..; do \
2077 if [ x"$$file" != x.. ]; then \
2078 rm -f $(libsubdir)/$$file; \
2079 $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
2080 else true; fi; \
2081 done
2082 # Don't mess with specs if it doesn't exist yet.
2083 -if [ -f specs ] ; then \
2084 rm -f $(libsubdir)/specs; \
2085 $(INSTALL_DATA) specs $(libsubdir)/specs; \
2086 fi
2087 # Install protoize if it was compiled.
2088 -if [ -f protoize$(exeext) ]; \
2089 then \
2090 rm -f $(bindir)/protoize$(exeext); \
2091 $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
2092 rm -f $(bindir)/unprotoize$(exeext); \
2093 $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
2094 rm -f $(libsubdir)/SYSCALLS.c.X; \
2095 $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
2096 chmod a-x $(libsubdir)/SYSCALLS.c.X; \
2097 fi
2098 -rm -f $(libsubdir)/cpp$(exeext)
2099 $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
2100
2101 # Install the driver program as $(target)-gcc
2102 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
2103 install-driver: xgcc
2104 -if [ -f gcc-cross$(exeext) ] ; then \
2105 rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2106 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
2107 if [ -d $(tooldir)/bin/. ] ; then \
2108 rm -f $(tooldir)/bin/gcc$(exeext); \
2109 $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
2110 else true; fi; \
2111 else \
2112 rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2113 $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
2114 rm -f $(bindir)/$(target)-gcc-1$(exeext); \
2115 ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
2116 > /dev/null 2>&1 \
2117 || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
2118 mv $(bindir)/$(target)-gcc-1$(exeext) $(bindir)/$(target)-gcc$(exeext); \
2119 fi
2120
2121 # Install the info files.
2122 install-info: doc install-dir lang.install-info
2123 -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
2124 cd $(srcdir); for f in cpp.info* gcc.info*; \
2125 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
2126 -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
2127
2128 # Install the man pages.
2129 install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
2130 -if [ -f gcc-cross ] ; then \
2131 rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2132 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2133 chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
2134 else \
2135 rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2136 $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2137 chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
2138 fi
2139 -rm -f $(mandir)/cccp$(manext)
2140 -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
2141 -chmod a-x $(mandir)/cccp$(manext)
2142
2143 # Install the library.
2144 install-libgcc: libgcc.a install-dir
2145 -if [ -f libgcc.a ] ; then \
2146 rm -f $(libsubdir)/libgcc.a; \
2147 $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
2148 if $(RANLIB_TEST) ; then \
2149 (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
2150 chmod a-x $(libsubdir)/libgcc.a; \
2151 else true; fi
2152
2153 # Install multiple versions of libgcc.a.
2154 install-multilib: stmp-multilib install-dir
2155 for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
2156 dir=`echo $$i | sed -e 's/;.*$$//'`; \
2157 if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
2158 rm -f $(libsubdir)/$${dir}/libgcc.a; \
2159 $(INSTALL_DATA) $${dir}/libgcc.a $(libsubdir)/$${dir}/libgcc.a; \
2160 if $(RANLIB_TEST); then \
2161 (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
2162 chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
2163 done
2164
2165 # Install the objc run time library.
2166 install-libobjc: install-dir
2167 -if [ -f libobjc.a ] ; then \
2168 rm -f $(libsubdir)/libobjc.a; \
2169 $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
2170 if $(RANLIB_TEST) ; then \
2171 (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
2172 chmod a-x $(libsubdir)/libobjc.a; \
2173 else true; fi
2174
2175 # Install all the header files built in the include subdirectory.
2176 install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
2177 # Fix symlinks to absolute paths in the installed include directory to
2178 # point to the installed directory, not the build directory.
2179 -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
2180 if [ $$? -eq 0 ]; then \
2181 dir=`cd include; pwd`; \
2182 for i in $$files; do \
2183 dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
2184 if expr "$$dest" : "$$dir.*" > /dev/null; then \
2185 rm -f $(libsubdir)/include/$$i; \
2186 ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
2187 fi; \
2188 done; \
2189 fi
2190
2191 # Create or recreate the gcc private include file directory.
2192 install-include-dir: install-dir
2193 -rm -rf $(libsubdir)/include
2194 mkdir $(libsubdir)/include
2195 -chmod a+rx $(libsubdir)/include
2196
2197 # Install the include directory using tar.
2198 install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
2199 (cd include; \
2200 tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
2201 # /bin/sh on some systems returns the status of the first tar,
2202 # and that can lose with GNU tar which always writes a full block.
2203 # So use `exit 0' to ignore its exit status.
2204
2205 # Install the include directory using cpio.
2206 install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
2207 (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
2208
2209 # Put assert.h where it won't override GNU libc's assert.h.
2210 # It goes in a dir that is searched after GNU libc's headers;
2211 # thus, the following conditionals are no longer needed.
2212 # But it's not worth deleting them now.
2213 ## Don't replace the assert.h already there if it is not from GCC.
2214 ## This code would be simpler if it tested for -f ... && ! grep ...
2215 ## but supposedly the ! operator is missing in sh on some systems.
2216 install-assert-h: assert.h install-dir
2217 if [ -f $(assertdir)/assert.h ]; \
2218 then \
2219 if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
2220 then \
2221 rm -f $(assertdir)/assert.h; \
2222 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2223 chmod a-x $(assertdir)/assert.h; \
2224 else true; \
2225 fi; \
2226 else \
2227 rm -f $(assertdir)/assert.h; \
2228 $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
2229 chmod a-x $(assertdir)/assert.h; \
2230 fi
2231
2232 # Use this target to install the program `collect2' under the name `ld'.
2233 install-collect2: collect2 install-dir
2234 $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
2235 # Install the driver program as $(libsubdir)/gcc for collect2.
2236 $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
2237
2238 # Cancel installation by deleting the installed files.
2239 uninstall: lang.uninstall
2240 -rm -rf $(libsubdir)
2241 -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
2242 -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
2243 -rm -rf $(bindir)/protoize$(exeext)
2244 -rm -rf $(bindir)/unprotoize$(exeext)
2245 -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
2246 -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
2247 -rm -rf $(mandir)/cccp$(manext)
2248 -rm -rf $(mandir)/protoize$(manext)
2249 -rm -rf $(mandir)/unprotoize$(manext)
2250 \f
2251 # These exist for maintenance purposes.
2252
2253 # Update the tags table.
2254 TAGS: force
2255 cd $(srcdir); \
2256 mkdir temp; \
2257 mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
2258 etags *.y *.h *.c; \
2259 mv temp/* .; \
2260 rmdir temp
2261
2262 # Create the distribution tar file.
2263 #dist: gcc-$(version).tar.gz
2264 dist: gcc.xtar.gz
2265
2266 gcc.xtar.gz: gcc.xtar
2267 gzip --best < gcc.xtar > tmp-gcc.xtar.gz
2268 mv tmp-gcc.xtar.gz gcc.xtar.gz
2269
2270 #gcc-$(version).tar.gz: gcc-$(version).tar
2271 # gzip < gcc-$(version).tar > gcc-$(version).tar.gz
2272
2273 #gcc-$(version).tar:
2274 gcc.xtar: distdir
2275 # Make the distribution.
2276 tar -chf gcc.xtar gcc-$(version)
2277
2278 # This target exists to do the initial work before the language specific
2279 # stuff gets done.
2280 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
2281 $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
2282 $(srcdir)/cexp.c
2283 @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
2284 then true; \
2285 else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
2286 fi
2287 # Update the version number in README
2288 awk '$$1 " " $$2 " " $$3 == "This directory contains" \
2289 { $$6 = version; print $$0 } \
2290 $$1 " " $$2 " " $$3 != "This directory contains"' \
2291 version=$(version) README > tmp.README
2292 mv tmp.README README
2293 -rm -rf gcc-$(version) tmp
2294 # Put all the files in a temporary subdirectory
2295 # which has the name that we want to have in the tar file.
2296 mkdir tmp
2297 mkdir tmp/config
2298 mkdir tmp/ginclude
2299 mkdir tmp/objc
2300 for file in *[0-9a-zA-Z+]; do \
2301 ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
2302 done
2303 cd config; \
2304 for file in *[0-9a-zA-Z+]; do \
2305 if test -d $$file && test "$$file" != RCS; then \
2306 mkdir ../tmp/config/$$file; \
2307 cd $$file; \
2308 for subfile in *[0-9a-zA-Z+]; do \
2309 ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
2310 || cp $$subfile ../../tmp/config/$$file; \
2311 done; \
2312 cd ..; \
2313 else \
2314 ln $$file ../tmp/config >/dev/null 2>&1 \
2315 || cp $$file ../tmp/config; \
2316 fi; \
2317 done
2318 cd ginclude; \
2319 for file in *[0-9a-zA-Z+]; do \
2320 ln $$file ../tmp/ginclude >/dev/null 2>&1 \
2321 || cp $$file ../tmp/ginclude; \
2322 done
2323 cd objc; \
2324 for file in *[0-9a-zA-Z+]; do \
2325 ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
2326 done
2327 ln .gdbinit tmp
2328
2329 # Finish making `distdir', after the languages have done their thing.
2330 distdir-finish:
2331 mv tmp gcc-$(version)
2332 # Get rid of everything we don't want in the distribution. We'd want
2333 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
2334 # expanded.
2335 cd gcc-$(version); make extraclean
2336
2337 distdir: distdir-start lang.distdir distdir-finish
2338
2339 # make diff oldversion=M.N
2340 # creates a diff file between an older distribution and this one.
2341 # The -P option assumes this is GNU diff.
2342 diff:
2343 diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
2344 -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
2345 -x TAGS \
2346 -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
2347 -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
2348 $(LANG_DIFF_EXCLUDES) \
2349 gcc-$(oldversion) gcc-$(version) > diffs
2350
2351 bootstrap: force
2352 # Only build the C compiler for stage1, because that is the only one that
2353 # we can guarantee will build with the native compiler, and also it is the
2354 # only thing useful for building stage2.
2355 $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES=c
2356 $(MAKE) stage1
2357 # This used to define ALLOCA as empty, but that would lead to bad results
2358 # for a subsequent `make install' since that would not have ALLOCA empty.
2359 # To prevent `make install' from compiling alloca.o and then relinking cc1
2360 # because alloca.o is newer, we permit these recursive makes to compile
2361 # alloca.o. Then cc1 is newer, so it won't have to be relinked.
2362 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2363 $(MAKE) stage2
2364 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2365
2366 bootstrap2: force
2367 $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
2368 $(MAKE) stage2
2369 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2370
2371 bootstrap3: force
2372 $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
2373
2374 # Compare the object files in the current directory with those in the
2375 # stage2 directory.
2376
2377 # ./ avoids bug in some versions of tail.
2378 compare: force
2379 for file in *$(objext); do \
2380 tail +16c ./$$file > tmp-foo1; \
2381 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
2382 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
2383 done
2384 for dir in tmp-foo $(SUBDIRS); do \
2385 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2386 for file in $$dir/*$(objext); do \
2387 tail +16c ./$$file > tmp-foo1; \
2388 tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
2389 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
2390 done; \
2391 fi; \
2392 done
2393 -rm -f tmp-foo*
2394
2395 # Similar, but compare with stage3 directory
2396 compare3: force
2397 for file in *$(objext); do \
2398 tail +16c ./$$file > tmp-foo1; \
2399 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2400 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
2401 done
2402 for dir in tmp-foo $(SUBDIRS); do \
2403 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2404 for file in $$dir/*$(objext); do \
2405 tail +16c ./$$file > tmp-foo1; \
2406 tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
2407 && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
2408 done; \
2409 fi; \
2410 done
2411 -rm -f tmp-foo*
2412
2413 # Compare the object files in the current directory with those in the
2414 # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid
2415 # running tail and the overhead of twice copying each object file.
2416
2417 gnucompare: force
2418 for file in *$(objext); do \
2419 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2420 done
2421 for dir in tmp-foo $(SUBDIRS); do \
2422 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2423 for file in $$dir/*$(objext); do \
2424 cmp --ignore-initial=16 $$file stage2/$$file || true ; \
2425 done; \
2426 fi; \
2427 done
2428
2429 # Similar, but compare with stage3 directory
2430 gnucompare3: force
2431 for file in *$(objext); do \
2432 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2433 done
2434 for dir in tmp-foo $(SUBDIRS); do \
2435 if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
2436 for file in $$dir/*$(objext); do \
2437 cmp --ignore-initial=16 $$file stage3/$$file || true ; \
2438 done; \
2439 fi; \
2440 done
2441
2442 # Copy the object files from a particular stage into a subdirectory.
2443 stage1-start:
2444 -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
2445 -for dir in . $(SUBDIRS) ; \
2446 do \
2447 if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
2448 done
2449 -mv $(STAGESTUFF) stage1
2450 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2451 # dir will work properly.
2452 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
2453 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
2454 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
2455 -rm -f stage1/libgcc.a
2456 -cp libgcc.a stage1
2457 -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
2458 stage1: force stage1-start lang.stage1
2459
2460 stage2-start:
2461 -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
2462 -for dir in . $(SUBDIRS) ; \
2463 do \
2464 if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
2465 done
2466 -mv $(STAGESTUFF) stage2
2467 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2468 # dir will work properly.
2469 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
2470 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
2471 -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
2472 -rm -f stage2/libgcc.a
2473 -cp libgcc.a stage2
2474 -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
2475 stage2: force stage2-start lang.stage2
2476
2477 stage3-start:
2478 -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
2479 -for dir in . $(SUBDIRS) ; \
2480 do \
2481 if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
2482 done
2483 -mv $(STAGESTUFF) stage3
2484 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2485 # dir will work properly.
2486 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
2487 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
2488 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
2489 -rm -f stage3/libgcc.a
2490 -cp libgcc.a stage3
2491 -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
2492 stage3: force stage3-start lang.stage3
2493
2494 stage4-start:
2495 -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
2496 -for dir in . $(SUBDIRS) ; \
2497 do \
2498 if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
2499 done
2500 -mv $(STAGESTUFF) stage4
2501 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
2502 # dir will work properly.
2503 -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
2504 -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
2505 -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
2506 -rm -f stage4/libgcc.a
2507 -cp libgcc.a stage4
2508 -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
2509 stage4: force stage4-start lang.stage4
2510
2511 # Copy just the executable files from a particular stage into a subdirectory,
2512 # and delete the object files. Use this if you're just verifying a version
2513 # that is pretty sure to work, and you are short of disk space.
2514 risky-stage1: stage1
2515 - make clean
2516
2517 risky-stage2: stage2
2518 -make clean
2519
2520 risky-stage3: stage3
2521 -make clean
2522
2523 risky-stage4: stage4
2524 -make clean
2525
2526 #In GNU Make, ignore whether `stage*' exists.
2527 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
2528 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2529
2530 force: