]>
Commit | Line | Data |
---|---|---|
32e6d418 | 1 | # Makefile for GNU C compiler. |
0b387d23 | 2 | # Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995 |
3 | # 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. | |
32e6d418 | 4 | |
5 | #This file is part of GNU CC. | |
6 | ||
7 | #GNU CC is free software; you can redistribute it and/or modify | |
8 | #it under the terms of the GNU General Public License as published by | |
9 | #the Free Software Foundation; either version 2, or (at your option) | |
10 | #any later version. | |
11 | ||
12 | #GNU CC is distributed in the hope that it will be useful, | |
13 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | #GNU General Public License for more details. | |
16 | ||
17 | #You should have received a copy of the GNU General Public License | |
18 | #along with GNU CC; see the file COPYING. If not, write to | |
8d62a21c | 19 | #the Free Software Foundation, 59 Temple Place - Suite 330, |
20 | #Boston MA 02111-1307, USA. | |
32e6d418 | 21 | |
22 | # The targets for external use include: | |
23 | # all, doc, proto, install, install-cross, install-cross-rest, | |
a8514488 | 24 | # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean, |
32e6d418 | 25 | # stage1, stage2, stage3, stage4. |
26 | ||
c6396a0b | 27 | # Suppress smart makes who think they know how to automake Yacc files |
28 | .y.c: | |
29 | ||
87c0ad1b | 30 | # Directory where sources are, from where we are. |
31 | srcdir = @srcdir@ | |
32 | VPATH = @srcdir@ | |
33 | ||
d73e991a | 34 | # Pointer to the GCC Project website |
35 | website=http://gcc.gnu.org | |
36 | ||
32e6d418 | 37 | # Variables that exist for you to override. |
38 | # See below for how to change them for certain systems. | |
39 | ||
73027c94 | 40 | # List of language subdirectories. |
41 | # This is overridden by configure. | |
87c0ad1b | 42 | SUBDIRS =@subdirs@ |
73027c94 | 43 | |
32e6d418 | 44 | # Selection of languages to be made. |
73027c94 | 45 | # This is overridden by configure. |
76103b2c | 46 | CONFIG_LANGUAGES = @all_languages@ |
844c30fe | 47 | LANGUAGES = c gcov$(exeext) $(CONFIG_LANGUAGES) |
32e6d418 | 48 | |
5728fc9b | 49 | # Languages should create dependencies of $(INTL_TARGETS) on generated |
50 | # sources in Make-lang.in. Example: | |
51 | # $(INTL_TARGETS): $(srcdir)/cp/parse.c | |
52 | INTL_TARGETS = intl.all intl.install intl.distdir | |
53 | ||
e754efc9 | 54 | # Selection of languages to be made during stage1 build. |
55 | # This is overridden by configure. | |
87c0ad1b | 56 | BOOT_LANGUAGES = c @all_boot_languages@ |
e754efc9 | 57 | |
32e6d418 | 58 | ALLOCA = |
1ab99fde | 59 | ALLOCA_FLAGS = |
94c53b91 | 60 | ALLOCA_FINISH = true |
32e6d418 | 61 | |
c6221df9 | 62 | # Various ways of specifying flags for compilations: |
32e6d418 | 63 | # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2. |
64 | # BOOT_CFLAGS is the value of CFLAGS to pass | |
65 | # to the stage2 and stage3 compilations | |
c6221df9 | 66 | # WARN_CFLAGS are the warning flags to pass to stage2 and stage3. |
6f63674e | 67 | # (And for stage 1 if the native compiler is GCC.) It is |
a727632e | 68 | # separate from BOOT_CFLAGS because people tend to override optimization |
69 | # flags and we'd like them to still have warnings turned on. They are free | |
70 | # to explicitly turn warnings off if they wish. | |
32e6d418 | 71 | # XCFLAGS is used for most compilations but not when using the GCC just built. |
329da2a1 | 72 | # TCFLAGS is used for compilations with the GCC just built. |
32e6d418 | 73 | XCFLAGS = |
329da2a1 | 74 | TCFLAGS = |
6f63674e | 75 | CFLAGS = -g @stage1_warn_cflags@ |
86373592 | 76 | BOOT_CFLAGS = -O2 $(CFLAGS) |
20cfb17d | 77 | WARN_CFLAGS = -W -Wall -Wtraditional |
32e6d418 | 78 | # These exists to be overridden by the x-* and t-* files, respectively. |
79 | X_CFLAGS = | |
80 | T_CFLAGS = | |
81 | ||
82 | X_CPPFLAGS = | |
83 | T_CPPFLAGS = | |
84 | ||
be2828ce | 85 | AWK = @AWK@ |
38bce124 | 86 | CC = @CC@ |
fbf120a6 | 87 | # srcdir might be a relative pathname which won't be valid in a subdirectory, |
88 | # so we must use objdir/srcdir instead to make it safe. objdir is always | |
89 | # a full pathname. | |
90 | BISON = `if [ -f $(objdir)/../bison/bison ] ; then case $(srcdir) in \ | |
91 | /*) echo $(objdir)/../bison/bison -L $(srcdir)/../bison/ ;; \ | |
92 | *) echo $(objdir)/../bison/bison -L $(objdir)/$(srcdir)/../bison/ ;; \ | |
f6b47e76 | 93 | esac; else echo bison ; fi` |
3f1608f3 | 94 | BISONFLAGS = |
fbf120a6 | 95 | LEX = `if [ -f $(objdir)/../flex/flex ] ; then echo $(objdir)/../flex/flex ; else echo flex ; fi` |
73027c94 | 96 | LEXFLAGS = |
32e6d418 | 97 | AR = ar |
32e6d418 | 98 | AR_FLAGS = rc |
0dbd1c74 | 99 | LN = @symbolic_link@ |
4664c5d5 | 100 | DLLTOOL = dlltool |
32e6d418 | 101 | SHELL = /bin/sh |
102 | # on sysV, define this as cp. | |
87c0ad1b | 103 | INSTALL = @INSTALL@ |
ea4a6c81 | 104 | # Some systems may be missing symbolic links, regular links, or both. |
105 | # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate. | |
106 | LN=@LN@ | |
107 | LN_S=@LN_S@ | |
32e6d418 | 108 | # These permit overriding just for certain files. |
74086405 | 109 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
110 | INSTALL_DATA = @INSTALL_DATA@ | |
faef3f64 | 111 | MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \ |
112 | then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \ | |
113 | else echo makeinfo ; fi` | |
64cda823 | 114 | MAKEINFOFLAGS = |
f345940f | 115 | TEXI2DVI = texi2dvi |
73027c94 | 116 | # For GNUmake: let us decide what gets passed to recursive makes. |
117 | MAKEOVERRIDES = | |
87c0ad1b | 118 | @SET_MAKE@ |
32e6d418 | 119 | |
120 | # Define this as & to perform parallel make on a Sequent. | |
c6221df9 | 121 | # Note that this has some bugs, and it seems currently necessary |
32e6d418 | 122 | # to compile all the gen* files first by hand to avoid erroneous results. |
123 | P = | |
124 | ||
125 | # How to invoke ranlib. | |
126 | RANLIB = ranlib | |
127 | # Test to use to see whether ranlib exists on the system. | |
396c97db | 128 | RANLIB_TEST = \ |
129 | [ -f $(RANLIB) ] \ | |
363fd278 | 130 | || [ -f /usr/bin/ranlib -o -f /bin/ranlib ] |
73b4c875 | 131 | |
32e6d418 | 132 | # Compiler to use for compiling libgcc1.a. |
133 | # OLDCC should not be the GNU C compiler, | |
134 | # since that would compile typical libgcc1.a functions such as mulsi3 | |
135 | # into infinite recursions. | |
136 | OLDCC = cc | |
137 | ||
138 | # CFLAGS for use with OLDCC, for compiling libgcc1.a. | |
139 | # NOTE: -O does not work on some Unix systems! | |
140 | CCLIBFLAGS = -O | |
141 | ||
c6396a0b | 142 | # Version of ar to use when compiling libgcc1.a. |
32e6d418 | 143 | OLDAR = ar |
38bce124 | 144 | OLDAR_FLAGS = qc |
32e6d418 | 145 | |
2cfd79fe | 146 | # Target to use when installing include directory. Either |
147 | # install-headers-tar or install-headers-cpio. | |
87c0ad1b | 148 | INSTALL_HEADERS_DIR = @build_install_headers_dir@ |
2cfd79fe | 149 | |
c8763215 | 150 | # Header files that are made available under the same name |
151 | # to programs compiled with GCC. | |
152 | USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ | |
b9a1fcb3 | 153 | $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/proto.h \ |
c6221df9 | 154 | $(srcdir)/ginclude/stdbool.h $(srcdir)/ginclude/iso646.h \ |
155 | $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) | |
c8763215 | 156 | |
157 | # Target to use whe installing assert.h. Some systems may | |
158 | # want to set this empty. | |
159 | INSTALL_ASSERT_H = install-assert-h | |
160 | ||
3b9b6fde | 161 | # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test. |
b3781cc4 | 162 | # Usually the one we just built. |
32e6d418 | 163 | # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS). |
1a2fb812 | 164 | GCC_FOR_TARGET = ./xgcc -B$(build_tooldir)/bin/ -B./ -I$(build_tooldir)/include |
32e6d418 | 165 | |
166 | # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. | |
167 | # It omits XCFLAGS, and specifies -B./. | |
66820558 | 168 | # It also specifies -I./include to find, e.g., stddef.h. |
329da2a1 | 169 | GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS) |
32e6d418 | 170 | |
2828fac4 | 171 | # Specify the abi to use when building the c++ runtime |
172 | GXX_ABI_FLAG=@GXX_ABI_FLAG@ | |
173 | ||
b541ad9d | 174 | # Sed command to transform gcc to installed name. Overwritten by configure. |
3271658e | 175 | program_transform_name = @program_transform_name@ |
ccb6700d | 176 | program_transform_cross_name = s,^,$(target_alias)-, |
b541ad9d | 177 | |
11d80b02 | 178 | build_canonical = @build_canonical@ |
179 | host_canonical = @host_canonical@ | |
180 | ||
32e6d418 | 181 | # Tools to use when building a cross-compiler. |
182 | # These are used because `configure' appends `cross-make' | |
183 | # to the makefile when making a cross-compiler. | |
184 | ||
fbc57885 | 185 | # Use the tools from the build tree, if they are available. |
186 | ||
187 | # objdir is set by configure. | |
188 | objdir = @objdir@ | |
189 | ||
190 | AR_FOR_TARGET = ` \ | |
191 | if [ -f $(objdir)/../binutils/ar ] ; then \ | |
192 | echo $(objdir)/../binutils/ar ; \ | |
193 | else \ | |
194 | if [ "$(host_canonical)" = "$(target)" ] ; then \ | |
195 | echo ar; \ | |
196 | else \ | |
e440364b | 197 | t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \ |
fbc57885 | 198 | fi; \ |
199 | fi` | |
aa787722 | 200 | AR_FLAGS_FOR_TARGET = |
201 | AR_CREATE_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) rc | |
202 | AR_EXTRACT_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) x | |
fbc57885 | 203 | RANLIB_FOR_TARGET = ` \ |
204 | if [ -f $(objdir)/../binutils/ranlib ] ; then \ | |
205 | echo $(objdir)/../binutils/ranlib ; \ | |
206 | else \ | |
207 | if [ "$(host_canonical)" = "$(target)" ] ; then \ | |
208 | echo ranlib; \ | |
209 | else \ | |
e440364b | 210 | t='$(program_transform_cross_name)'; echo ranlib | sed -e $$t ; \ |
fbc57885 | 211 | fi; \ |
212 | fi` | |
213 | RANLIB_TEST_FOR_TARGET = \ | |
214 | [ -f $(RANLIB_FOR_TARGET) ] \ | |
215 | || ( [ "$(host_canonical)" = "$(target)" ] \ | |
216 | && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ) | |
217 | ||
3f69fed5 | 218 | # Dir to search for system headers. Overridden by cross-make. |
219 | SYSTEM_HEADER_DIR = /usr/include | |
220 | ||
397f1574 | 221 | # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. |
222 | CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include | |
223 | ||
58113712 | 224 | # Control whether to run fixproto and fixincludes. |
61fad423 | 225 | STMP_FIXPROTO = stmp-fixproto |
58113712 | 226 | STMP_FIXINC = stmp-fixinc |
a5889b74 | 227 | |
0848b369 | 228 | # Test to see whether <limits.h> exists in the system header files. |
229 | LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] | |
230 | ||
87c0ad1b | 231 | target=@target@ |
71d9c015 | 232 | target_alias=@target_alias@ |
87c0ad1b | 233 | xmake_file=@dep_host_xmake_file@ |
234 | tmake_file=@dep_tmake_file@ | |
235 | out_file=$(srcdir)/config/@out_file@ | |
236 | out_object_file=@out_object_file@ | |
237 | md_file=$(srcdir)/config/@md_file@ | |
238 | tm_file=@tm_file_list@ | |
239 | build_xm_file=@build_xm_file_list@ | |
240 | host_xm_file=@host_xm_file_list@ | |
241 | lang_specs_files=@lang_specs_files@ | |
242 | lang_options_files=@lang_options_files@ | |
c3cc26e1 | 243 | lang_tree_files=@lang_tree_files@ |
714fe809 | 244 | GCC_THREAD_FILE=@thread_file@ |
5c872430 | 245 | OBJC_BOEHM_GC=@objc_boehm_gc@ |
58febf9e | 246 | GTHREAD_FLAGS=@gthread_flags@ |
7955e3d2 | 247 | # Be prepared for gcc2 merges. |
248 | gcc_version=@gcc_version@ | |
249 | gcc_version_trigger=@gcc_version_trigger@ | |
250 | version=$(gcc_version) | |
4f5e65d7 | 251 | mainversion=`grep version_string $(srcdir)/version.c | sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/'` |
32e6d418 | 252 | |
32e6d418 | 253 | # Common prefix for installation directories. |
254 | # NOTE: This directory must exist when you start installation. | |
87c0ad1b | 255 | prefix = @prefix@ |
2ffdcadf | 256 | # Directory in which to put localized header files. On the systems with |
257 | # gcc as the native cc, `local_prefix' may not be `prefix' which is | |
258 | # `/usr'. | |
a2aa0fc1 | 259 | # NOTE: local_prefix *should not* default from prefix. |
87c0ad1b | 260 | local_prefix = @local_prefix@ |
c6396a0b | 261 | # Directory in which to put host dependent programs and libraries |
87c0ad1b | 262 | exec_prefix = @exec_prefix@ |
32e6d418 | 263 | # Directory in which to put the executable for the command `gcc' |
87c0ad1b | 264 | bindir = @bindir@ |
32e6d418 | 265 | # Directory in which to put the directories used by the compiler. |
87c0ad1b | 266 | libdir = @libdir@ |
32e6d418 | 267 | # Directory in which the compiler finds executables, libraries, etc. |
67cb4bc1 | 268 | libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version) |
40cb25f2 | 269 | # Used to produce a relative $(gcc_tooldir) in gcc.o |
8099945b | 270 | unlibsubdir = ../../.. |
f22b529a | 271 | # Directory in which to find other cross-compilation tools and headers. |
066520ea | 272 | dollar = @dollar@ |
f22b529a | 273 | # Used in install-cross. |
274 | gcc_tooldir = @gcc_tooldir@ | |
275 | # Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/ | |
276 | build_tooldir = $(exec_prefix)/$(target_alias) | |
3bf5d4dc | 277 | # Directory in which the compiler finds g++ includes. |
8ffadb5b | 278 | gcc_gxx_include_dir= @gcc_gxx_include_dir@ |
35df828f | 279 | # Directory to search for site-specific includes. |
9671ce48 | 280 | includedir = $(local_prefix)/include |
db9a0b19 | 281 | # assertdir is overridden in cross-make. |
9d8314a9 | 282 | # (But this currently agrees with what is in cross-make.) |
40cb25f2 | 283 | assertdir = $(gcc_tooldir)/include |
a2aa0fc1 | 284 | # where the info files go |
87c0ad1b | 285 | infodir = @infodir@ |
3e2f90b9 | 286 | # Where cpp should go besides $prefix/bin if necessary |
287 | cpp_install_dir = @cpp_install_dir@ | |
be2828ce | 288 | # where the locale files go |
289 | datadir = $(prefix)/@DATADIRNAME@ | |
290 | localedir = $(datadir)/locale | |
32e6d418 | 291 | # Extension (if any) to put in installed man-page filename. |
292 | manext = .1 | |
f403cbcb | 293 | objext = .o |
2aa3e87b | 294 | exeext = @host_exeext@ |
295 | build_exeext = @build_exeext@ | |
f403cbcb | 296 | |
32e6d418 | 297 | # Directory in which to put man pages. |
3cf6a465 | 298 | mandir = @mandir@ |
299 | man1dir = $(mandir)/man1 | |
f32abccb | 300 | # Dir for temp files. |
301 | tmpdir = /tmp | |
32e6d418 | 302 | |
be2828ce | 303 | # Top build directory, relative to here. |
304 | top_builddir = . | |
305 | ||
306 | # Whether we were configured with NLS. | |
307 | USE_NLS = @USE_NLS@ | |
308 | ||
309 | # Internationalization library. | |
310 | INTLLIBS = @INTLLIBS@ | |
311 | ||
312 | # List of internationalization subdirectories. | |
313 | POSUB = @POSUB@ | |
314 | INTL_SUBDIRS = intl $(POSUB) | |
315 | ||
32e6d418 | 316 | # Additional system libraries to link with. |
317 | CLIB= | |
318 | ||
319 | # Change this to a null string if obstacks are installed in the | |
320 | # system library. | |
321 | OBSTACK=obstack.o | |
322 | ||
05513b45 | 323 | # The GC method to be used on this system. |
772580ce | 324 | GGC=@GGC@.o |
05513b45 | 325 | |
326 | # If a supplementary library is being used for the GC. | |
327 | GGC_LIB= | |
328 | ||
b8a373b2 | 329 | # Configure will set these if you need vfprintf and possibly _doprnt support. |
330 | VFPRINTF=@vfprintf@ | |
331 | DOPRINT=@doprint@ | |
332 | ||
2289acd7 | 333 | # Specify the rule for actually making libgcc.a, |
334 | LIBGCC = libgcc.a | |
335 | # and the rule for installing it. | |
336 | INSTALL_LIBGCC = install-libgcc | |
337 | ||
32e6d418 | 338 | # Specify the rule for actually making libgcc1.a. |
c6396a0b | 339 | # The value may be empty; that means to do absolutely nothing |
340 | # with or for libgcc1.a. | |
32e6d418 | 341 | LIBGCC1 = libgcc1.a |
342 | ||
b0d230b7 | 343 | # Specify the rule for making libgcc1.a for a cross-compiler. |
344 | # The default rule assumes that libgcc1.a is supplied by the user. | |
345 | CROSS_LIBGCC1 = libgcc1.cross | |
346 | ||
32e6d418 | 347 | # Specify the rule for actually making libgcc2.a. |
348 | LIBGCC2 = libgcc2.a | |
349 | ||
350 | # Options to use when compiling libgcc2.a. | |
351 | # -g1 causes output of debug info only for file-scope entities. | |
352 | # we use this here because that should be enough, and also | |
353 | # so that -g1 will be tested. | |
cce804d3 | 354 | # |
b1e0e993 | 355 | LIBGCC2_DEBUG_CFLAGS = -g1 |
c6221df9 | 356 | LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@ |
690a93ea | 357 | |
358 | # Additional options to use when compiling libgcc2.a. | |
359 | # Some targets override this to -Iinclude | |
360 | LIBGCC2_INCLUDES = | |
361 | ||
b5dba0c7 | 362 | # Additional target-dependent options for compiling libgcc2.a. |
c6221df9 | 363 | TARGET_LIBGCC2_CFLAGS = |
b5dba0c7 | 364 | |
3b9b6fde | 365 | # libgcc1-test target (must also be overridable for a target) |
366 | LIBGCC1_TEST = libgcc1-test | |
17886975 | 367 | |
32e6d418 | 368 | # List of extra executables that should be compiled for this target machine |
369 | # that are used for compiling from source code to object code. | |
370 | # The rules for compiling them should be in the t-* file for the machine. | |
87c0ad1b | 371 | EXTRA_PASSES =@extra_passes@ |
32e6d418 | 372 | |
c6396a0b | 373 | # Like EXTRA_PASSES, but these are used when linking. |
87c0ad1b | 374 | EXTRA_PROGRAMS = @extra_programs@ |
c6396a0b | 375 | |
376 | # List of extra object files that should be compiled for this target machine. | |
32e6d418 | 377 | # The rules for compiling them should be in the t-* file for the machine. |
87c0ad1b | 378 | EXTRA_PARTS = @extra_parts@ |
32e6d418 | 379 | |
c6396a0b | 380 | # List of extra object files that should be compiled and linked with |
381 | # compiler proper (cc1, cc1obj, cc1plus). | |
87c0ad1b | 382 | EXTRA_OBJS = @extra_objs@ |
c6396a0b | 383 | |
17108b2b | 384 | # List of extra object files that should be compiled and linked with |
385 | # the gcc driver. | |
87c0ad1b | 386 | EXTRA_GCC_OBJS =@host_extra_gcc_objs@ |
17108b2b | 387 | |
630c76ba | 388 | # List of additional header files to install. |
389 | # Often this is edited directly by `configure'. | |
87c0ad1b | 390 | EXTRA_HEADERS =@extra_headers_list@ |
630c76ba | 391 | |
0c787992 | 392 | # Set this to `collect2' to enable use of collect2. |
87c0ad1b | 393 | USE_COLLECT2 = @will_use_collect2@ |
98ae6ed6 | 394 | # If we might be using collect2, then this variable will be set to |
395 | # -DUSE_COLLECT2. toplev.c, collect2.c and libgcc2.c all need to | |
396 | # if we may be using collect2. | |
23029fe8 | 397 | MAYBE_USE_COLLECT2 = @maybe_use_collect2@ |
79f818d0 | 398 | # It is convenient for configure to add the assignment at the beginning, |
399 | # so don't override it here. | |
0c787992 | 400 | USE_COLLECT2 = collect2$(exeext) |
79f818d0 | 401 | |
32e6d418 | 402 | # List of extra C and assembler files to add to libgcc1.a. |
403 | # Assembler files should have names ending in `.asm'. | |
c6221df9 | 404 | LIB1FUNCS_EXTRA = |
32e6d418 | 405 | |
406 | # List of extra C and assembler files to add to libgcc2.a. | |
407 | # Assembler files should have names ending in `.asm'. | |
c6221df9 | 408 | LIB2FUNCS_EXTRA = |
32e6d418 | 409 | |
3e2f90b9 | 410 | # Handle cpp installation. |
411 | INSTALL_CPP= | |
412 | UNINSTALL_CPP= | |
413 | ||
d54b81e0 | 414 | # We do not try to build float.h anymore. Let configure select the |
415 | # appropriate pre-built float.h file for the target. | |
19c49761 | 416 | FLOAT_H=@float_h_file@ |
d54b81e0 | 417 | |
32e6d418 | 418 | # Program to convert libraries. |
c6221df9 | 419 | LIBCONVERT = |
32e6d418 | 420 | |
421 | # Control whether header files are installed. | |
32e6d418 | 422 | INSTALL_HEADERS=install-headers |
423 | ||
106a27e5 | 424 | # Additional directories of header files to run fixincludes on. |
af731fc2 | 425 | # These should be directories searched automatically by default |
426 | # just as /usr/include is. | |
c6221df9 | 427 | # *Do not* use this for directories that happen to contain |
af731fc2 | 428 | # header files, but are not searched automatically by default. |
106a27e5 | 429 | # On most systems, this is empty. |
430 | OTHER_FIXINCLUDES_DIRS= | |
431 | ||
fc0b8ef8 | 432 | # A list of all the language-specific executables. |
433 | # This is overridden by configure. | |
8757933b | 434 | COMPILERS = cc1$(exeext) @all_compilers@ |
fc0b8ef8 | 435 | |
77a164d8 | 436 | # List of things which should already be built whenever we try to use xgcc |
32e6d418 | 437 | # to compile anything (without linking). |
7f6a6499 | 438 | GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) |
32e6d418 | 439 | |
77a164d8 | 440 | # List of things which should already be built whenever we try to use xgcc |
32e6d418 | 441 | # to link anything. |
2289acd7 | 442 | GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS) |
32e6d418 | 443 | |
32e6d418 | 444 | # Directory to link to, when using the target `maketest'. |
445 | DIR = ../gcc | |
446 | ||
89e36a04 | 447 | # Guaranteed to not exist when not passing md through cpp. |
2c352995 | 448 | # This value is overridden directly by configure. |
89e36a04 | 449 | MD_FILE = md-cpp-not-used |
450 | ||
32e6d418 | 451 | # Flags to use when cross-building GCC. |
452 | # Prefix to apply to names of object files when using them | |
453 | # to run on the machine we are compiling on. | |
454 | HOST_PREFIX= | |
455 | # Prefix to apply to names of object files when compiling them | |
456 | # to run on the machine we are compiling on. | |
c6221df9 | 457 | # The default for this variable is chosen to keep these rules |
32e6d418 | 458 | # out of the way of the other rules for compiling the same source files. |
459 | HOST_PREFIX_1=loser- | |
460 | HOST_CC=$(CC) | |
461 | HOST_CFLAGS=$(ALL_CFLAGS) | |
c6396a0b | 462 | HOST_CLIB=$(CLIB) |
be2828ce | 463 | HOST_INTLLIBS=$(INTLLIBS) |
32e6d418 | 464 | HOST_LDFLAGS=$(LDFLAGS) |
465 | HOST_CPPFLAGS=$(ALL_CPPFLAGS) | |
c6396a0b | 466 | HOST_ALLOCA=$(ALLOCA) |
467 | HOST_MALLOC=$(MALLOC) | |
468 | HOST_OBSTACK=$(OBSTACK) | |
b8a373b2 | 469 | HOST_VFPRINTF=$(VFPRINTF) |
470 | HOST_DOPRINT=$(DOPRINT) | |
32e6d418 | 471 | |
b541ad9d | 472 | # Actual name to use when installing a native compiler. |
ccb6700d | 473 | GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t` |
28c11b39 | 474 | CPP_INSTALL_NAME = `t='$(program_transform_name)'; echo cpp | sed -e $$t` |
fc56a674 | 475 | PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t` |
476 | UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t` | |
5ef852e5 | 477 | GCOV_INSTALL_NAME = `t='$(program_transform_name)'; echo gcov | sed -e $$t` |
86220f45 | 478 | GCCBUG_INSTALL_NAME = `t='$(program_transform_name)'; echo gccbug | sed -e $$t` |
b541ad9d | 479 | |
480 | # Actual name to use when installing a cross-compiler. | |
ccb6700d | 481 | GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t` |
2ff5d8bd | 482 | CPP_CROSS_NAME = `t='$(program_transform_cross_name)'; echo cpp | sed -e $$t` |
fc56a674 | 483 | PROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo protoize | sed -e $$t` |
484 | UNPROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo unprotoize | sed -e $$t` | |
b541ad9d | 485 | |
32e6d418 | 486 | # Choose the real default target. |
487 | ALL=all.internal | |
488 | ||
489 | # Choose the real install target. | |
2cfd79fe | 490 | INSTALL_TARGET=install-normal |
491 | ||
6c08487b | 492 | # Setup the testing framework, if you have one |
493 | EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \ | |
494 | echo $${rootme}/../expect/expect ; \ | |
495 | else echo expect ; fi` | |
496 | ||
497 | RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ | |
498 | echo $${srcdir}/../dejagnu/runtest ; \ | |
499 | else echo runtest; fi` | |
500 | RUNTESTFLAGS = | |
501 | ||
b33b80ed | 502 | # Extra symbols for fixproto to define when parsing headers. |
c6221df9 | 503 | FIXPROTO_DEFINES = |
b33b80ed | 504 | |
b7c87ff2 | 505 | # Extra flags to use when compiling crt{begin,end}.o. |
c6221df9 | 506 | CRTSTUFF_T_CFLAGS = |
b7c87ff2 | 507 | |
4d3c962c | 508 | # Extra flags to use when compiling [m]crt0.o. |
c6221df9 | 509 | CRT0STUFF_T_CFLAGS = |
4d3c962c | 510 | |
0dbd1c74 | 511 | # "t" or nothing, for building multilibbed versions of, say, crtbegin.o. |
512 | T = | |
513 | ||
32e6d418 | 514 | # End of variables for you to override. |
515 | ||
516 | # Definition of `all' is here so that new rules inserted by sed | |
517 | # do not specify the default target. | |
518 | # The real definition is under `all.internal' (for native compilers) | |
519 | # or `all.cross' (for cross compilers). | |
c6396a0b | 520 | all: all.indirect |
32e6d418 | 521 | |
131b361e | 522 | # This tells GNU Make version 3 not to put all variables in the environment. |
523 | .NOEXPORT: | |
524 | ||
32e6d418 | 525 | # sed inserts variable overrides after the following line. |
a0a99f10 | 526 | ####target overrides |
87c0ad1b | 527 | @target_overrides@ |
528 | ||
a0a99f10 | 529 | ####host overrides |
87c0ad1b | 530 | @host_overrides@ |
531 | ||
a0a99f10 | 532 | ####cross overrides |
87c0ad1b | 533 | @cross_defines@ |
534 | @cross_overrides@ | |
535 | ||
e77fd588 | 536 | ####build overrides |
87c0ad1b | 537 | @build_overrides@ |
2e9d8ccf | 538 | #\f |
32e6d418 | 539 | # Now figure out from those variables how to compile and link. |
540 | ||
c6396a0b | 541 | all.indirect: $(ALL) |
542 | ||
7b6bbd12 | 543 | # IN_GCC tells various files that system.h, toplev.c, etc are available. |
5701cb15 | 544 | INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@ |
32e6d418 | 545 | |
546 | # This is the variable actually used when we compile. | |
792e272d | 547 | # If you change this line, you probably also need to change the definition |
548 | # of HOST_CFLAGS in build-make to match. | |
5539b206 | 549 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \ |
792e272d | 550 | @DEFS@ |
32e6d418 | 551 | |
552 | # Likewise. | |
553 | ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) | |
554 | ||
555 | # Even if ALLOCA is set, don't use it if compiling with GCC. | |
c1f5b841 | 556 | USE_ALLOCA= ${ALLOCA} |
557 | USE_HOST_ALLOCA= ` case "${HOST_ALLOCA}" in ?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac ` | |
c6396a0b | 558 | USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac ` |
559 | USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac ` | |
b8a373b2 | 560 | USE_HOST_VFPRINTF= ` case "${HOST_VFPRINTF}" in ?*) echo ${HOST_PREFIX}${HOST_VFPRINTF} ;; esac ` |
561 | USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPRINT} ;; esac ` | |
32e6d418 | 562 | |
563 | # Dependency on obstack, alloca, malloc or whatever library facilities | |
564 | # are not installed in the system libraries. | |
565 | # We don't use USE_ALLOCA because backquote expansion doesn't work in deps. | |
be2828ce | 566 | LIBDEPS= $(INTLLIBS) $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) |
32e6d418 | 567 | |
568 | # Likewise, for use in the tools that must run on this machine | |
569 | # even if we are cross-building GCC. | |
570 | # We don't use USE_ALLOCA because backquote expansion doesn't work in deps. | |
be2828ce | 571 | HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_INTLLIBS) $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT) |
32e6d418 | 572 | |
573 | # How to link with both our special library facilities | |
574 | # and the system's installed libraries. | |
be2828ce | 575 | LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) $(CLIB) ../libiberty/libiberty.a |
32e6d418 | 576 | |
577 | # Likewise, for use in the tools that must run on this machine | |
578 | # even if we are cross-building GCC. | |
c6396a0b | 579 | HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \ |
be2828ce | 580 | $(HOST_INTLLIBS) $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) \ |
581 | $(HOST_CLIB) | |
32e6d418 | 582 | |
05513b45 | 583 | HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o $(HOST_PREFIX)ggc-none.o |
262d46de | 584 | HOST_PRINT = $(HOST_PREFIX)print-rtl.o |
04b58880 | 585 | HOST_ERRORS = $(HOST_PREFIX)errors.o |
32e6d418 | 586 | |
587 | # Specify the directories to be searched for header files. | |
588 | # Both . and srcdir are used, in that order, | |
589 | # so that tm.h and config.h will be found in the compilation | |
590 | # subdirectory rather than in the source directory. | |
dda5abb0 | 591 | INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include |
32e6d418 | 592 | |
593 | # Always use -I$(srcdir)/config when compiling. | |
594 | .c.o: | |
595 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< | |
596 | ||
597 | # This tells GNU make version 3 not to export all the variables | |
598 | # defined in this file into the environment. | |
599 | .NOEXPORT: | |
2e9d8ccf | 600 | #\f |
73027c94 | 601 | # Support for additional languages (other than c and objc). |
602 | # ??? objc can be supported this way too (leave for later). | |
603 | ||
604 | # These next lines are overridden by configure. | |
87c0ad1b | 605 | LANG_MAKEFILES = @all_lang_makefiles@ |
606 | LANG_STAGESTUFF = @all_stagestuff@ | |
607 | LANG_DIFF_EXCLUDES = @all_diff_excludes@ | |
608 | LANG_LIB2FUNCS = @all_lib2funcs@ | |
609 | LANG_EXTRA_HEADERS = @all_headers@ | |
73027c94 | 610 | |
611 | # Flags to pass to recursive makes. | |
612 | # CC is set by configure. Hosts without symlinks need special handling | |
613 | # because we need CC="stage1/xgcc -Bstage1/" to work in the language | |
614 | # subdirectories. | |
615 | # ??? The choices here will need some experimenting with. | |
71094bab | 616 | ORDINARY_FLAGS_TO_PASS = \ |
396c97db | 617 | "AR_FLAGS_FOR_TARGET=$(AR_FLAGS_FOR_TARGET)" \ |
aa787722 | 618 | "AR_CREATE_FOR_TARGET=$(AR_CREATE_FOR_TARGET)" \ |
619 | "AR_EXTRACT_FOR_TARGET=$(AR_EXTRACT_FOR_TARGET)" \ | |
73027c94 | 620 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
621 | "BISON=$(BISON)" \ | |
622 | "BISONFLAGS=$(BISONFLAGS)" \ | |
73027c94 | 623 | "CFLAGS=$(CFLAGS)" \ |
2feda28e | 624 | "CLIB=$(CLIB)" \ |
c1a2e040 | 625 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ |
73027c94 | 626 | "LDFLAGS=$(LDFLAGS)" \ |
627 | "LEX=$(LEX)" \ | |
628 | "LEXFLAGS=$(LEXFLAGS)" \ | |
ea4a6c81 | 629 | "LN=$(LN)" \ |
630 | "LN_S=$(LN_S)" \ | |
73027c94 | 631 | "MAKEINFO=$(MAKEINFO)" \ |
632 | "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ | |
73027c94 | 633 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
634 | "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \ | |
635 | "SHELL=$(SHELL)" \ | |
87c0ad1b | 636 | "STAGE_PREFIX=@stage_prefix_set_by_configure@" \ |
62268150 | 637 | "exeext=$(exeext)" \ |
2aa3e87b | 638 | "build_exeext=$(build_exeext)" \ |
62268150 | 639 | "objext=$(objext)" \ |
73027c94 | 640 | "exec_prefix=$(exec_prefix)" \ |
641 | "prefix=$(prefix)" \ | |
933b38ee | 642 | "local_prefix=$(local_prefix)" \ |
8ffadb5b | 643 | "gxx_include_dir=$(gcc_gxx_include_dir)" \ |
73027c94 | 644 | "tooldir=$(tooldir)" \ |
40cb25f2 | 645 | "gcc_tooldir=$(gcc_tooldir)" \ |
73027c94 | 646 | "bindir=$(bindir)" \ |
be2828ce | 647 | "libsubdir=$(libsubdir)" \ |
648 | "datadir=$(datadir)" \ | |
649 | "distdir=../tmp/\$$(subdir)" \ | |
650 | "localedir=$(localedir)" | |
71094bab | 651 | FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) "CC=@cc_set_by_configure@" |
be2828ce | 652 | PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \ |
653 | -e 's|^ *[^ /][^ /]*/|%&|' \ | |
654 | -e 's| -B| -B%|g' \ | |
655 | -e 's|% *[^- /]|%&|g' \ | |
656 | -e 's|%% *|../|g' \ | |
657 | -e 's|%||g' | |
658 | SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \ | |
b441f25a | 659 | "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`" |
2e9d8ccf | 660 | #\f |
32e6d418 | 661 | # Lists of files for various purposes. |
662 | ||
ee8f5350 | 663 | # Language-specific object files for C and Objective C. |
664 | C_AND_OBJC_OBJS = c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o \ | |
dc12af01 | 665 | c-aux-info.o c-common.o c-iterate.o @extra_c_objs@ |
ee8f5350 | 666 | |
32e6d418 | 667 | # Language-specific object files for C. |
ee8f5350 | 668 | C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) |
6cba4ca3 | 669 | |
32e6d418 | 670 | # Language-independent object files. |
076f8fe1 | 671 | OBJS = diagnostic.o \ |
672 | toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ | |
53800dbe | 673 | function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o real.o \ |
674 | builtins.o intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o \ | |
be2828ce | 675 | dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \ |
dd2acd83 | 676 | integrate.o jump.o cse.o loop.o unroll.o flow.o combine.o varray.o \ |
be2828ce | 677 | regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \ |
5701cb15 | 678 | insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o \ |
e48ba7af | 679 | insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \ |
e5fed9e1 | 680 | profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \ |
fa8477c9 | 681 | mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o \ |
60ecc450 | 682 | predict.o lists.o ggc-common.o $(GGC) simplify-rtx.o ssa.o bb-reorder.o \ |
683 | sibcall.o | |
32e6d418 | 684 | |
685 | # GEN files are listed separately, so they can be built before doing parallel | |
686 | # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load | |
687 | # them before rtl.o is compiled. | |
3ad7bb1c | 688 | GEN= genemit genoutput genrecog genextract genflags gencodes genconfig \ |
1a237d7e | 689 | genpeep gengenrtl gencheck |
32e6d418 | 690 | |
be69511d | 691 | CCCP=@cpp_main@ |
3e4227af | 692 | |
32e6d418 | 693 | # Files to be copied away after each stage in building. |
62268150 | 694 | STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ |
32e6d418 | 695 | insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ |
be2828ce | 696 | insn-attr.h insn-attrtab.c insn-opinit.c tree-check.h \ |
7014838c | 697 | s-flags s-config s-codes s-mlib s-unders s-genrtl \ |
9e042f31 | 698 | s-output s-recog s-emit s-extract s-peep s-check \ |
eef892c9 | 699 | s-attr s-attrtab s-opinit s-crt s-$(T)crtS s-crt0 \ |
2aa3e87b | 700 | genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \ |
701 | genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \ | |
702 | genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \ | |
7369c81f | 703 | genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \ |
1a237d7e | 704 | gencheck$(build_exeext) \ |
28c11b39 | 705 | xgcc$(exeext) xcpp$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \ |
d1871a55 | 706 | $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ |
62268150 | 707 | $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \ |
708 | protoize$(exeext) unprotoize$(exeext) \ | |
c20b28d5 | 709 | specs collect2$(exeext) $(USE_COLLECT2) underscore.c \ |
2b55270a | 710 | gcov$(exeext) *.bp \ |
389cd241 | 711 | *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \ |
82575fa7 | 712 | *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.gcse *.flow2 *.peephole2 \ |
dadde703 | 713 | *.ssa *.ussa \ |
73b4c875 | 714 | *.[si] libcpp.a \ |
73027c94 | 715 | $(LANG_STAGESTUFF) |
32e6d418 | 716 | |
717 | # Members of libgcc1.a. | |
718 | LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \ | |
799330a9 | 719 | _lshrsi3 _ashrsi3 _ashlsi3 \ |
32e6d418 | 720 | _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \ |
721 | _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \ | |
722 | _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \ | |
723 | _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \ | |
724 | _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2 | |
725 | ||
726 | # Library members defined in libgcc2.c. | |
727 | LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ | |
799330a9 | 728 | _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \ |
4b8f50a8 | 729 | _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \ |
32e6d418 | 730 | _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \ |
619c3e71 | 731 | _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \ |
d055d75f | 732 | _fixtfdi _fixunstfdi _floatditf \ |
4b7a79e2 | 733 | __gcc_bcmp _varargs __dummy _eprintf \ |
734 | _bb _shtab _clear_cache _trampoline __main _exit \ | |
a69e7f5f | 735 | _ctors _pure |
736 | ||
737 | LIB2FUNCS_EH = _eh | |
32e6d418 | 738 | |
04ddb594 | 739 | FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \ |
740 | _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \ | |
a4110d9a | 741 | _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \ |
dc3b536a | 742 | _sf_to_df _thenan_sf _sf_to_usi _df_to_usi |
04ddb594 | 743 | |
744 | DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \ | |
745 | _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \ | |
a4110d9a | 746 | _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \ |
dc3b536a | 747 | _df_to_sf _thenan_df _sf_to_usi _df_to_usi |
04ddb594 | 748 | |
32e6d418 | 749 | # The files that "belong" in CONFIG_H are deliberately omitted |
750 | # because having them there would not be useful in actual practice. | |
751 | # All they would do is cause complete recompilation every time | |
752 | # one of the machine description files is edited. | |
753 | # That may or may not be what one wants to do. | |
754 | # If it is, rm *.o is an easy way to do it. | |
c20b28d5 | 755 | # CONFIG_H = $(host_xm_file) $(tm_file) |
32e6d418 | 756 | CONFIG_H = |
cfbfd5e6 | 757 | MACHMODE_H = machmode.h machmode.def |
758 | RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) | |
3ad7bb1c | 759 | RTL_H = $(RTL_BASE_H) genrtl.h |
4e9d90c7 | 760 | TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def |
395adca1 | 761 | BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h |
f6afeec9 | 762 | DEMANGLE_H = $(srcdir)/../include/demangle.h |
4a7d7a8b | 763 | RECOG_H = recog.h |
ae262a47 | 764 | EXPR_H = expr.h insn-codes.h |
cfbfd5e6 | 765 | REGS_H = regs.h varray.h $(MACHMODE_H) |
15aa1c64 | 766 | INTEGRATE_H = integrate.h varray.h |
ec7d7ef9 | 767 | LOOP_H = loop.h varray.h basic-block.h |
4f5e65d7 | 768 | GCC_H = gcc.h version.h |
2e9d8ccf | 769 | #\f |
73027c94 | 770 | # Language makefile fragments. |
771 | ||
772 | # The following targets define the interface between us and the languages. | |
773 | # | |
774 | # all.build, all.cross, start.encap, rest.encap, | |
775 | # info, dvi, | |
776 | # install-normal, install-common, install-info, install-man, | |
777 | # uninstall, distdir, | |
a8514488 | 778 | # mostlyclean, clean, distclean, extraclean, maintainer-clean, |
73027c94 | 779 | # stage1, stage2, stage3, stage4 |
780 | # | |
781 | # Each language is linked in with a series of hooks (since we can't use `::' | |
782 | # targets). The name of each hooked is "lang.${target_name}" (eg: lang.info). | |
783 | # Configure computes and adds these here. | |
784 | ||
785 | ####language hooks | |
87c0ad1b | 786 | @language_hooks@ |
73027c94 | 787 | |
788 | # sed inserts language fragments after the following line. | |
789 | ####language fragments | |
87c0ad1b | 790 | @language_fragments@ |
73027c94 | 791 | |
792 | # End of language makefile fragments. | |
2e9d8ccf | 793 | #\f |
8d12f02c | 794 | # The only suffixes we want for implicit rules are .c and .o, so clear |
795 | # the list and add them. This speeds up GNU Make, and allows -r to work. | |
796 | .SUFFIXES: | |
797 | .SUFFIXES: .c .o | |
32e6d418 | 798 | |
d44645af | 799 | Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \ |
160b6fa9 | 800 | $(xmake_file) $(tmake_file) $(LANG_MAKEFILES) |
801 | $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \ | |
802 | "$(xmake_file)" "$(tmake_file)" | |
f403cbcb | 803 | cp config.status config.run |
76103b2c | 804 | LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run |
5484bc67 | 805 | rm -f config.run |
32e6d418 | 806 | |
82470d2e | 807 | $(srcdir)/configure: $(srcdir)/configure.in |
87c0ad1b | 808 | cd $(srcdir); autoconf |
809 | ||
0d9d9ae4 | 810 | # cstamp-h.in controls rebuilding of config.in. |
d44645af | 811 | # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't |
812 | # delete it. A stamp file is needed as autoheader won't update the file if | |
813 | # nothing has changed. | |
0d9d9ae4 | 814 | # It remains in the source directory and is part of the distribution. |
815 | # This follows what is done in shellutils, fileutils, etc. | |
c3b8daa3 | 816 | # "echo timestamp" is used instead of touch to be consistent with other |
817 | # packages that use autoconf (??? perhaps also to avoid problems with patch?). | |
0d9d9ae4 | 818 | # ??? Newer versions have a maintainer mode that may be useful here. |
819 | $(srcdir)/config.in: $(srcdir)/cstamp-h.in | |
820 | $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h | |
d211e301 | 821 | cd $(srcdir) && autoheader |
ba679b21 | 822 | @rm -f $(srcdir)/cstamp-h.in |
c3b8daa3 | 823 | echo timestamp > $(srcdir)/cstamp-h.in |
764fc592 | 824 | auto-host.h: cstamp-h ; @true |
0d9d9ae4 | 825 | cstamp-h: config.in config.status |
76103b2c | 826 | CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status |
5539b206 | 827 | |
d44645af | 828 | # Really, really stupid make features, such as SUN's KEEP_STATE, may force |
829 | # a target to build even if it is up-to-date. So we must verify that | |
830 | # config.status does not exist before failing. | |
7014838c | 831 | config.status: $(srcdir)/configure version.c |
d44645af | 832 | @if [ ! -f config.status ] ; then \ |
833 | echo You must configure gcc. Look at the INSTALL file for details.; \ | |
834 | false; \ | |
835 | else \ | |
76103b2c | 836 | LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \ |
d44645af | 837 | fi |
838 | ||
bfcba12d | 839 | all.internal: start.encap rest.encap doc |
32e6d418 | 840 | # This is what to compile if making a cross-compiler. |
73027c94 | 841 | # Note that we can compile enquire using the cross-compiler just built, |
87540b0a | 842 | # although we can't run it on this machine. |
58113712 | 843 | all.cross: native gcc-cross xcpp$(exeext) specs \ |
f4bd6786 | 844 | $(LIBGCC) $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc |
e77fd588 | 845 | # This is what to compile if making gcc with a cross-compiler. |
28c11b39 | 846 | all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build |
32e6d418 | 847 | # This is what must be made before installing GCC and converting libraries. |
28c11b39 | 848 | start.encap: native xgcc$(exeext) xcpp$(exeext) specs $(LIBGCC1) \ |
849 | xlimits.h lang.start.encap | |
335ebf8f | 850 | # These can't be made until after GCC can run. |
58113712 | 851 | rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap |
32e6d418 | 852 | # This is what is made with the host's compiler |
853 | # whether making a cross compiler or not. | |
be2828ce | 854 | native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \ |
3ded972d | 855 | $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) |
32e6d418 | 856 | |
857 | # Define the names for selecting languages in LANGUAGES. | |
7f6a6499 | 858 | C c: cc1$(exeext) |
32e6d418 | 859 | PROTO: proto |
860 | ||
ee4720a9 | 861 | # Tell GNU make these are phony targets. |
8757933b | 862 | .PHONY: C c PROTO proto |
ee4720a9 | 863 | |
840a6e8d | 864 | # On the target machine, finish building a cross compiler. |
865 | # This does the things that can't be done on the host machine. | |
19c49761 | 866 | rest.cross: $(LIBGCC) specs |
840a6e8d | 867 | |
3b9b6fde | 868 | # Verify that it works to compile and link libgcc1-test. |
d7330690 | 869 | # If it does, then there are sufficient replacements for libgcc1.a. |
3b9b6fde | 870 | libgcc1-test: libgcc1-test.o native $(GCC_PARTS) |
55e40402 | 871 | @echo "Testing libgcc1. Ignore linker warning messages." |
3b9b6fde | 872 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \ |
b6f6ec68 | 873 | -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name` |
7f6a6499 | 874 | libgcc1-test.o: libgcc1-test.c native xgcc$(exeext) |
3b9b6fde | 875 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c |
d7330690 | 876 | |
840a6e8d | 877 | # Recompile all the language-independent object files. |
878 | # This is used only if the user explicitly asks for it. | |
32e6d418 | 879 | compilations: ${OBJS} |
880 | ||
03f51dea | 881 | # Create a list of the language-independent object files so the language |
882 | # subdirectories needn't mention their names explicitly. | |
c6221df9 | 883 | stamp-objlist: $(OBJS) |
b54842d8 | 884 | echo " $(OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist |
03f51dea | 885 | |
77a164d8 | 886 | # We call this executable `xgcc' rather than `gcc' |
887 | # to avoid confusion if the current directory is in the path | |
888 | # and CC is `gcc'. It is renamed to `gcc' when it is installed. | |
cdf76fe2 | 889 | xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \ |
a91671eb | 890 | version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) |
cdf76fe2 | 891 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \ |
892 | prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) | |
840a6e8d | 893 | |
28c11b39 | 894 | # We call this executable `xcpp' rather than `cpp' |
895 | # since the real preprocessor is named `cpp'. It too is renamed | |
896 | # when it is installed. | |
897 | # The only difference from xgcc is that it's linked with cppspec.o | |
898 | # instead of gccspec.o. | |
899 | xcpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \ | |
900 | version.o $(LIBDEPS) $(EXTRA_GCC_OBJS) | |
901 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \ | |
902 | prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS) | |
903 | ||
840a6e8d | 904 | # Dump a specs file to make -B./ read these specs over installed ones. |
7f6a6499 | 905 | specs: xgcc$(exeext) |
c92e16d4 | 906 | $(GCC_FOR_TARGET) -dumpspecs > tmp-specs |
907 | mv tmp-specs specs | |
32e6d418 | 908 | |
77a164d8 | 909 | # We do want to create an executable named `xgcc', so we can use it to |
32e6d418 | 910 | # compile libgcc2.a. |
911 | # Also create gcc-cross, so that install-common will install properly. | |
7f6a6499 | 912 | gcc-cross: xgcc$(exeext) |
62268150 | 913 | cp xgcc$(exeext) gcc-cross$(exeext) |
32e6d418 | 914 | |
95c4b02a | 915 | cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS) |
916 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS) | |
32e6d418 | 917 | |
3f69fed5 | 918 | # Build the version of limits.h that we will install. |
919 | xlimits.h: glimits.h limitx.h limity.h | |
0848b369 | 920 | if $(LIMITS_H_TEST) ; then \ |
c92e16d4 | 921 | cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \ |
3f69fed5 | 922 | else \ |
c92e16d4 | 923 | cat $(srcdir)/glimits.h > tmp-xlimits.h; \ |
3f69fed5 | 924 | fi |
c92e16d4 | 925 | mv tmp-xlimits.h xlimits.h |
2e9d8ccf | 926 | #\f |
32e6d418 | 927 | # Build libgcc.a. |
928 | # This is done in two parts because some functions, in libgcc1.c, | |
77a164d8 | 929 | # must be compiled with something other than GCC, |
930 | # while the rest, in libgcc2.c, must be compiled with xgcc. | |
931 | # That means we can't do libgcc2.c until after xgcc, cc1, etc. | |
32e6d418 | 932 | |
933 | # Use this as value of LIBGCC1 to cause conversion to GNU library format. | |
934 | # LIBCONVERT should put its output in libgcc1.conv. | |
935 | libgcc1.conv: libgcc1.a | |
936 | $(LIBCONVERT) libgcc1.a libgcc1.conv | |
937 | ||
938 | # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely. | |
939 | # Make an empty file instead. | |
66e9b81a | 940 | libgcc1.null: $(GCC_PASSES) |
144546c5 | 941 | echo "void __foo () {}" > dummy.c |
32e6d418 | 942 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c |
aa787722 | 943 | $(AR_CREATE_FOR_TARGET) libgcc1.null dummy$(objext) |
62268150 | 944 | rm -f dummy$(objext) dummy.c |
32e6d418 | 945 | |
fe918d35 | 946 | # This is $(LIBGCC1) for a cross-compiler. |
c6221df9 | 947 | # We have no automatic way of building libgcc1.a, |
fe918d35 | 948 | # so it's up to the installer to find a way to do that. |
949 | # This rule deliberately does not depend on libgcc1.a | |
950 | # so that it will fail if the installer hasn't provided it. | |
951 | libgcc1.cross: | |
952 | mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false) | |
953 | ||
32e6d418 | 954 | # Compile the library of arithmetic subroutines with the native compiler. |
77a164d8 | 955 | # Don't compile it with GCC! |
32e6d418 | 956 | # (That would cause most arithmetic functions to call themselves.) |
5eef7030 | 957 | # |
958 | # NOTE: If you modify these rules substantially, please be sure to | |
959 | # check at least config/i386/t-sco5 and possibly other makefile | |
960 | # fragments. | |
32e6d418 | 961 | libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status |
962 | -rm -f tmplibgcc1.a | |
963 | # Actually build it in tmplibgcc1.a, then rename at end, | |
964 | # so that libgcc1.a itself remains nonexistent if compilation is aborted. | |
965 | # -e causes any failing command to make this rule fail. | |
966 | # -e doesn't work in certain shells, so we test $$? as well. | |
547e1b60 | 967 | # lynx has a broken ar, it always complains when the initial library is |
968 | # empty, thus this command works only if we don't do -e | |
969 | # There is a trailing backslash (\) deleted from the following line. | |
970 | # set -e; | |
32e6d418 | 971 | for name in $(LIB1FUNCS); \ |
972 | do \ | |
973 | echo $${name}; \ | |
62268150 | 974 | rm -f $${name}$(objext); \ |
5eef7030 | 975 | $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \ |
32e6d418 | 976 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
62268150 | 977 | mv libgcc1$(objext) $${name}$(objext); \ |
978 | $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ | |
979 | rm -f $${name}$(objext); \ | |
32e6d418 | 980 | done |
981 | # Some shells crash when a loop has no items. | |
982 | # So make sure there is always at least one--`..'. | |
983 | # Then ignore it. | |
984 | # We don't use -e here because there are if statements | |
985 | # that should not make the command give up when the if condition is false. | |
986 | # Instead, we test for failure after each command where it matters. | |
4daa2154 | 987 | for file in .. $(LIB1FUNCS_EXTRA); \ |
32e6d418 | 988 | do \ |
989 | if [ x$${file} != x.. ]; then \ | |
24f83907 | 990 | name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \ |
32e6d418 | 991 | echo $${name}; \ |
992 | if [ $${name}.asm = $${file} ]; then \ | |
f32abccb | 993 | cp $${file} $${name}.s || exit 1; file=$${name}.s; \ |
32e6d418 | 994 | else true; fi; \ |
5eef7030 | 995 | $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \ |
32e6d418 | 996 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
62268150 | 997 | $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ |
32e6d418 | 998 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
62268150 | 999 | rm -f $${name}.s $${name}$(objext); \ |
32e6d418 | 1000 | else true; \ |
1001 | fi; \ | |
1002 | done | |
396c97db | 1003 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
1004 | $(RANLIB_FOR_TARGET) tmplibgcc1.a; \ | |
1005 | else true; fi | |
32e6d418 | 1006 | mv tmplibgcc1.a libgcc1.a |
1007 | ||
cf80c04b | 1008 | # Build libgcc1.a from assembler source. LIB1ASMFUNCS is the list of |
1009 | # functions. LIB1ASMSRC is the name of the source file in the config | |
1010 | # subdirectory. | |
1011 | libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC) | |
1012 | -rm -f tmplibgcc1.a libgcc1.S | |
1013 | cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S | |
1014 | # Actually build it in tmplibgcc1.a, then rename at end, | |
1015 | # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted. | |
1016 | # -e causes any failing command to make this rule fail. | |
1017 | # -e doesn't work in certain shells, so we test $$? as well. | |
1018 | # lynx has a broken ar, it always complains when the initial library is | |
1019 | # empty, thus this command works only if we don't do -e | |
1020 | # There is a trailing backslash (\) deleted from the following line. | |
1021 | # set -e; | |
1022 | for name in $(LIB1ASMFUNCS); \ | |
1023 | do \ | |
1024 | echo $${name}; \ | |
1025 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \ | |
1026 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ | |
62268150 | 1027 | mv libgcc1$(objext) $${name}$(objext); \ |
aa787722 | 1028 | $(AR_CREATE_FOR_TARGET) tmplibgcc1.a $${name}$(objext); \ |
62268150 | 1029 | rm -f $${name}$(objext); \ |
cf80c04b | 1030 | done |
1031 | -rm -f libgcc1.S | |
1032 | mv tmplibgcc1.a libgcc1-asm.a | |
1033 | ||
a20b21eb | 1034 | # Generate assembly versions of the functions required for libgcc1. |
1035 | # You'll still need to massage the code by hand (possibly hacking | |
1036 | # underscores and local labels) but this will get you started. | |
1037 | libgcc1.S: libgcc1.c $(CONFIG_H) config.status | |
1038 | -rm -f libgcc1.S | |
1039 | touch libgcc1.S | |
1040 | for name in $(LIB1FUNCS); \ | |
1041 | do \ | |
1042 | echo $${name}; \ | |
5eef7030 | 1043 | $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \ |
a20b21eb | 1044 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
1045 | echo '#ifdef ' L$${name} >> libgcc1.S; \ | |
1046 | cat libgcc1.s >> libgcc1.S; \ | |
1047 | echo '#endif /*' L$${name} '*/' >> libgcc1.S; \ | |
1048 | echo "" >> libgcc1.S; \ | |
1049 | done | |
1050 | ||
32e6d418 | 1051 | # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled. |
1052 | # But recompiling cc1 should not force recompilation of libgcc2.a. | |
1053 | # If you want to force recompilation, delete libgcc2.a. | |
58113712 | 1054 | libgcc2.ready: $(GCC_PASSES) stmp-int-hdrs $(STMP_FIXPROTO) |
32e6d418 | 1055 | -if [ -f libgcc2.ready ] ; then \ |
1056 | true; \ | |
1057 | else \ | |
1058 | touch libgcc2.ready; \ | |
1059 | fi | |
1060 | ||
447a9eb9 | 1061 | LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS) |
04ddb594 | 1062 | libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \ |
069631e1 | 1063 | $(MACHMODE_H) longlong.h frame.h gbl-ctors.h config.status stmp-int-hdrs \ |
1064 | tsystem.h | |
32e6d418 | 1065 | # Actually build it in tmplibgcc2.a, then rename at end, |
1066 | # so that libgcc2.a itself remains nonexistent if compilation is aborted. | |
1067 | -rm -f tmplibgcc2.a | |
1068 | # -e causes any failing command to make this rule fail. | |
1069 | # -e doesn't work in certain shells, so we test $$? as well. | |
547e1b60 | 1070 | # lynx has a broken ar, it always complains when the initial library is |
1071 | # empty, thus this command works only if we don't do -e | |
1072 | # There is a trailing backslash (\) deleted from the following line. | |
1073 | # set -e; | |
32e6d418 | 1074 | for name in $(LIB2FUNCS); \ |
1075 | do \ | |
1076 | echo $${name}; \ | |
c6396a0b | 1077 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ |
98ae6ed6 | 1078 | $(MAYBE_USE_COLLECT2) $(srcdir)/libgcc2.c -o $${name}$(objext); \ |
32e6d418 | 1079 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
aa787722 | 1080 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \ |
62268150 | 1081 | rm -f $${name}$(objext); \ |
32e6d418 | 1082 | done |
a69e7f5f | 1083 | for name in $(LIB2FUNCS_EH); \ |
1084 | do \ | |
1085 | echo $${name}; \ | |
1086 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -fexceptions $(INCLUDES) -c \ | |
1087 | -DL$${name} $(srcdir)/libgcc2.c -o $${name}$(objext); \ | |
1088 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ | |
aa787722 | 1089 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \ |
a69e7f5f | 1090 | rm -f $${name}$(objext); \ |
1091 | done | |
04ddb594 | 1092 | if [ x$(FPBIT) != x ]; then \ |
1093 | for name in $(FPBIT_FUNCS); \ | |
1094 | do \ | |
1095 | echo $${name}; \ | |
1096 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ | |
1097 | -DFINE_GRAINED_LIBRARIES $(FPBIT) -o $${name}$(objext); \ | |
1098 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ | |
aa787722 | 1099 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \ |
04ddb594 | 1100 | rm -f $${name}$(objext); \ |
1101 | done; \ | |
1102 | else true; fi; | |
1103 | if [ x$(DPBIT) != x ]; then \ | |
1104 | for name in $(DPBIT_FUNCS); \ | |
1105 | do \ | |
1106 | echo $${name}; \ | |
1107 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ | |
dc3b536a | 1108 | -DFINE_GRAINED_LIBRARIES $(DPBIT) -o _dp$${name}$(objext); \ |
04ddb594 | 1109 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
aa787722 | 1110 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a _dp$${name}$(objext); \ |
dc3b536a | 1111 | rm -f _dp$${name}$(objext); \ |
04ddb594 | 1112 | done; \ |
1113 | else true; fi; | |
32e6d418 | 1114 | # Some shells crash when a loop has no items. |
1115 | # So make sure there is always at least one--`..'. | |
1116 | # Then ignore it. | |
1117 | # We don't use -e here because there are if statements | |
1118 | # that should not make the command give up when the if condition is false. | |
1119 | # Instead, we test for failure after each command where it matters. | |
447a9eb9 | 1120 | for file in $(LIB2ADD); do \ |
1121 | name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \ | |
1122 | oname=` echo $${name} | sed -e 's,.*/,,'`; \ | |
1123 | if [ $${name}.txt = $${file} ]; then \ | |
1124 | for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \ | |
1125 | $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ | |
396c97db | 1126 | AR_FOR_TARGET="$(AR_FOR_TARGET)" \ |
aa787722 | 1127 | AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ |
1128 | AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \ | |
396c97db | 1129 | AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" CC="$(CC)" \ |
447a9eb9 | 1130 | CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \ |
1131 | HOST_PREFIX_1="$(HOST_PREFIX_1)" \ | |
1132 | LANGUAGES="$(LANGUAGES)" \ | |
1133 | LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \ | |
6143c0f8 | 1134 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
aa787722 | 1135 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a $${f}; \ |
447a9eb9 | 1136 | rm -f $${f}; \ |
1137 | else true; \ | |
1138 | fi; done; \ | |
1139 | else \ | |
1140 | echo $${name}; \ | |
1141 | if [ $${name}.asm = $${file} ]; then \ | |
1142 | cp $${file} $${name}.s || exit 1; file=$${name}.s; \ | |
1143 | else true; fi; \ | |
1144 | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ | |
1145 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ | |
aa787722 | 1146 | $(AR_CREATE_FOR_TARGET) tmplibgcc2.a $${oname}$(objext); \ |
447a9eb9 | 1147 | rm -f $${name}.s $${oname}$(objext); \ |
32e6d418 | 1148 | fi; \ |
1149 | done | |
1150 | mv tmplibgcc2.a libgcc2.a | |
1151 | # These lines were deleted from above the mv command | |
1152 | # because ranlibing libgcc.a itself should suffice. | |
1153 | # -if [ x${HPUX_GAS} = x ] ; then \ | |
396c97db | 1154 | # if $(RANLIB_TEST_FOR_TARGET) ; then \ |
1155 | # $(RANLIB_FOR_TARGET) tmplibgcc2.a; | |
1156 | # else true; fi; \ | |
32e6d418 | 1157 | # else true; fi |
1158 | ||
1159 | # Combine the various libraries into a single library, libgcc.a. | |
51045f0c | 1160 | # $(LIBGCC1) is added after $(LIBGCC2) so that routines written in |
1161 | # assembler will be used in preference to the C versions. | |
32e6d418 | 1162 | libgcc.a: $(LIBGCC1) $(LIBGCC2) |
1163 | -rm -rf tmplibgcc.a libgcc.a tmpcopy | |
1164 | mkdir tmpcopy | |
aa787722 | 1165 | (cd tmpcopy; $(AR_EXTRACT_FOR_TARGET) ../$(LIBGCC2)) |
edf5976e | 1166 | # Some versions of ar (specifically the one in RISC/os 5.x), create an |
1167 | # unwritable table of contents file, and then print an error message when | |
1168 | # the second ar command tries to overwrite this file. To avoid the error | |
1169 | # message from ar, we make sure all files are writable. | |
75c6d942 | 1170 | -(cd tmpcopy; chmod +w * > /dev/null 2>&1) |
51045f0c | 1171 | -if [ x$(LIBGCC1) != x ]; \ |
aa787722 | 1172 | then (cd tmpcopy; $(AR_EXTRACT_FOR_TARGET) ../$(LIBGCC1)); \ |
51045f0c | 1173 | else true; \ |
1174 | fi | |
aa787722 | 1175 | (cd tmpcopy; $(AR_CREATE_FOR_TARGET) ../tmplibgcc.a *$(objext)) |
32e6d418 | 1176 | rm -rf tmpcopy |
396c97db | 1177 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
1178 | $(RANLIB_FOR_TARGET) tmplibgcc.a; \ | |
1179 | else true; fi | |
32e6d418 | 1180 | # Actually build it in tmplibgcc.a, then rename at end, |
1181 | # so that libgcc.a itself remains nonexistent if compilation is aborted. | |
1182 | mv tmplibgcc.a libgcc.a | |
1183 | ||
f1ad3130 | 1184 | # Use the genmultilib shell script to generate the information the gcc |
1185 | # driver program needs to select the library directory based on the | |
1186 | # switches. | |
997d68fe | 1187 | multilib.h: s-mlib; @true |
1188 | s-mlib: $(srcdir)/genmultilib Makefile | |
3d97d965 | 1189 | $(SHELL) $(srcdir)/genmultilib \ |
1190 | "$(MULTILIB_OPTIONS)" \ | |
1191 | "$(MULTILIB_DIRNAMES)" \ | |
1192 | "$(MULTILIB_MATCHES)" \ | |
1193 | "$(MULTILIB_EXCEPTIONS)" \ | |
54518c3b | 1194 | "$(MULTILIB_EXTRA_OPTS)" \ |
1195 | "$(MULTILIB_EXCLUSIONS)" > tmp-mlib.h | |
bbb1c53a | 1196 | $(SHELL) $(srcdir)/move-if-change tmp-mlib.h multilib.h |
997d68fe | 1197 | touch s-mlib |
f1ad3130 | 1198 | |
1199 | # Build multiple copies of libgcc.a, one for each target switch. | |
1200 | stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \ | |
069631e1 | 1201 | frame.h tsystem.h \ |
cfbfd5e6 | 1202 | $(LIB2ADD) $(MACHMODE_H) longlong.h gbl-ctors.h config.status |
f1ad3130 | 1203 | for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ |
1204 | dir=`echo $$i | sed -e 's/;.*$$//'`; \ | |
1205 | flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ | |
f1ad3130 | 1206 | $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ |
396c97db | 1207 | AR_FOR_TARGET="$(AR_FOR_TARGET)" \ |
aa787722 | 1208 | AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ |
1209 | AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \ | |
396c97db | 1210 | AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ |
1211 | CC="$(CC)" CFLAGS="$(CFLAGS)" \ | |
1212 | RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \ | |
1213 | RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \ | |
93ed8bee | 1214 | LANGUAGES="$(LANGUAGES)" \ |
f1ad3130 | 1215 | HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ |
00075505 | 1216 | LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \ |
cdc96909 | 1217 | MULTILIB_CFLAGS="$${flags}" \ |
00075505 | 1218 | LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \ |
1219 | dir="$${dir}" stmp-multilib-sub; \ | |
ee4720a9 | 1220 | if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ |
f1ad3130 | 1221 | done |
1222 | touch stmp-multilib | |
1223 | ||
00075505 | 1224 | # Subroutine of stmp-multilib so make -n works. |
1225 | stmp-multilib-sub: | |
cdc96909 | 1226 | rm -f $(LIBGCC2) |
1227 | if [ -d $(dir) ]; then \ | |
1228 | cd $(dir); \ | |
1229 | rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \ | |
a123fd67 | 1230 | else true; \ |
cdc96909 | 1231 | fi |
00075505 | 1232 | $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ |
396c97db | 1233 | AR_FOR_TARGET="$(AR_FOR_TARGET)" \ |
aa787722 | 1234 | AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ |
1235 | AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \ | |
396c97db | 1236 | AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ |
1237 | CC="$(CC)" CFLAGS="$(CFLAGS)" \ | |
00075505 | 1238 | HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ |
93ed8bee | 1239 | LANGUAGES="$(LANGUAGES)" \ |
00075505 | 1240 | LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2) |
1241 | if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \ | |
1242 | then true; \ | |
1243 | else rm -f $(LIBGCC1); \ | |
1244 | fi | |
1245 | if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \ | |
1246 | then true; \ | |
1247 | else \ | |
1248 | $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ | |
396c97db | 1249 | AR_FOR_TARGET="$(AR_FOR_TARGET)" \ |
aa787722 | 1250 | AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ |
1251 | AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \ | |
396c97db | 1252 | AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ |
1253 | CC="$(CC)" CFLAGS="$(CFLAGS)" \ | |
00075505 | 1254 | HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ |
93ed8bee | 1255 | LANGUAGES="$(LANGUAGES)" \ |
00075505 | 1256 | LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \ |
1257 | fi | |
1258 | rm -rf tmplibgcc.a tmpcopy | |
1259 | mkdir tmpcopy | |
aa787722 | 1260 | (cd tmpcopy; $(AR_EXTRACT_FOR_TARGET) ../$(LIBGCC2)) |
cca60770 | 1261 | # Some versions of ar (specifically the one in RISC/os 5.x), create an |
1262 | # unwritable table of contents file, and then print an error message when | |
1263 | # the second ar command tries to overwrite this file. To avoid the error | |
1264 | # message from ar, we make sure all files are writable. | |
1265 | -(cd tmpcopy; chmod +w * > /dev/null 2>&1) | |
51045f0c | 1266 | if [ x$(LIBGCC1) != x ]; \ |
aa787722 | 1267 | then (cd tmpcopy; $(AR_EXTRACT_FOR_TARGET) ../$(LIBGCC1)); \ |
51045f0c | 1268 | else true; \ |
1269 | fi | |
aa787722 | 1270 | (cd tmpcopy; $(AR_CREATE_FOR_TARGET) ../tmplibgcc.a *$(objext)) |
00075505 | 1271 | rm -rf libgcc2.a tmpcopy |
396c97db | 1272 | if $(RANLIB_TEST_FOR_TARGET) ; then \ |
1273 | $(RANLIB_FOR_TARGET) tmplibgcc.a; \ | |
1274 | else true; fi | |
00075505 | 1275 | if [ -d $(dir) ]; then true; else mkdir $(dir); fi |
1276 | mv tmplibgcc.a $(dir)/libgcc.a | |
cdc96909 | 1277 | for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ |
1278 | $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ | |
396c97db | 1279 | AR_FOR_TARGET="$(AR_FOR_TARGET)" \ |
aa787722 | 1280 | AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ |
1281 | AR_EXTRACT_FOR_TARGET="$(AR_EXTRACT_FOR_TARGET)" \ | |
396c97db | 1282 | AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \ |
1283 | CC="$(CC)" CFLAGS="$(CFLAGS)" \ | |
cdc96909 | 1284 | HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ |
0d0b968b | 1285 | LANGUAGES="$(LANGUAGES)" \ |
cdc96909 | 1286 | MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \ |
1287 | mv t$${f} $(dir)/$${f}; \ | |
a123fd67 | 1288 | else true; \ |
cdc96909 | 1289 | fi; done |
00075505 | 1290 | |
32e6d418 | 1291 | # Compile two additional files that are linked with every program |
6bcd7097 | 1292 | # linked using GCC on systems using COFF or ELF, for the sake of C++ |
1293 | # constructors. | |
ad87de1e | 1294 | $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \ |
069631e1 | 1295 | defaults.h frame.h gbl-ctors.h stmp-int-hdrs tsystem.h |
6efd403b | 1296 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ |
fe0c5877 | 1297 | -finhibit-size-directive -fno-inline-functions \ |
1298 | -fno-exceptions $(CRTSTUFF_T_CFLAGS) @inhibit_libc@ \ | |
6efd403b | 1299 | -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o $(T)crtbegin$(objext) |
cdc96909 | 1300 | |
ad87de1e | 1301 | $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \ |
069631e1 | 1302 | defaults.h frame.h gbl-ctors.h stmp-int-hdrs tsystem.h |
6efd403b | 1303 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ |
fe0c5877 | 1304 | -finhibit-size-directive -fno-inline-functions \ |
1305 | -fno-exceptions $(CRTSTUFF_T_CFLAGS) @inhibit_libc@ \ | |
6efd403b | 1306 | -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext) |
6bcd7097 | 1307 | |
1308 | # On some systems we also want to install versions of these files | |
1309 | # compiled using PIC for use in shared libraries. | |
eef892c9 | 1310 | $(T)crtbeginS.o $(T)crtendS.o: s-$(T)crtS ; @true |
6bcd7097 | 1311 | |
eef892c9 | 1312 | s-$(T)crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \ |
069631e1 | 1313 | defaults.h frame.h gbl-ctors.h stmp-int-hdrs tsystem.h |
5eef7030 | 1314 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \ |
fe0c5877 | 1315 | -DCRT_BEGIN -DCRTSTUFFS_O -finhibit-size-directive \ |
1316 | -fno-inline-functions -fno-exceptions @inhibit_libc@ -g0 \ | |
eef892c9 | 1317 | -c $(srcdir)/crtstuff.c -o $(T)crtbeginS$(objext) |
5eef7030 | 1318 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \ |
fe0c5877 | 1319 | -DCRT_END -DCRTSTUFFS_O -finhibit-size-directive \ |
1320 | -fno-inline-functions -fno-exceptions @inhibit_libc@ -g0 \ | |
eef892c9 | 1321 | -c $(srcdir)/crtstuff.c -o $(T)crtendS$(objext) |
1322 | touch s-$(T)crtS | |
4d3c962c | 1323 | |
1324 | # Compile the start modules crt0.o and mcrt0.o that are linked with every program | |
997d68fe | 1325 | crt0.o: s-crt0 ; @true |
1326 | mcrt0.o: s-crt0; @true | |
4d3c962c | 1327 | |
997d68fe | 1328 | s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) |
4d3c962c | 1329 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ |
1330 | -o crt0.o -c $(CRT0_S) | |
1331 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \ | |
1332 | -o mcrt0.o -c $(MCRT0_S) | |
997d68fe | 1333 | touch s-crt0 |
2e9d8ccf | 1334 | #\f |
32e6d418 | 1335 | # Compiling object files from source files. |
1336 | ||
1337 | # Note that dependencies on obstack.h are not written | |
1338 | # because that file is not part of GCC. | |
32e6d418 | 1339 | |
1340 | # C language specific files. | |
1341 | ||
dc12af01 | 1342 | c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h ggc.h \ |
72040e7e | 1343 | $(srcdir)/c-parse.h c-tree.h c-common.h input.h flags.h system.h toplev.h |
32e6d418 | 1344 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c |
112e5dd0 | 1345 | $(srcdir)/c-parse.h: $(srcdir)/c-parse.c |
1346 | $(srcdir)/c-parse.c: $(srcdir)/c-parse.y | |
9f8cd2f8 | 1347 | cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o c-parse.c c-parse.y |
0f557c81 | 1348 | $(srcdir)/c-parse.y: c-parse.in |
04e167f4 | 1349 | echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y |
d7c691fa | 1350 | sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ |
1351 | -e "/^ifc$$/d" -e "/^end ifc$$/d" \ | |
04e167f4 | 1352 | $(srcdir)/c-parse.in >>tmp-c-parse.y |
bbb1c53a | 1353 | $(SHELL) $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y |
d7c691fa | 1354 | |
0f557c81 | 1355 | $(srcdir)/c-gperf.h: c-parse.gperf |
bb905ef5 | 1356 | gperf -L C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \ |
ff559d95 | 1357 | -k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h || ( \ |
d73e991a | 1358 | echo "See " $(website)/cvs.html#generated_files >&2 ; \ |
ff559d95 | 1359 | exit 1 ) |
bbb1c53a | 1360 | $(SHELL) $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h |
6a4a0b58 | 1361 | |
dc12af01 | 1362 | c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h ggc.h \ |
0a893c29 | 1363 | c-lex.h flags.h function.h output.h toplev.h defaults.h |
72040e7e | 1364 | c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h \ |
1365 | flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h | |
dc12af01 | 1366 | c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h ggc.h \ |
26df1c5e | 1367 | c-lex.h toplev.h output.h function.h |
405711de | 1368 | c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \ |
72040e7e | 1369 | c-common.h $(srcdir)/c-parse.h $(srcdir)/c-gperf.h c-pragma.h input.h \ |
dc12af01 | 1370 | intl.h flags.h toplev.h output.h mbchar.h ggc.h |
72040e7e | 1371 | c-aux-info.o : c-aux-info.c $(CONFIG_H) system.h $(TREE_H) c-tree.h \ |
1372 | c-common.h flags.h toplev.h | |
c3ab7bd5 | 1373 | c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h |
304c5bf1 | 1374 | c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) function.h \ |
abda829b | 1375 | defaults.h c-pragma.h toplev.h ggc.h |
405711de | 1376 | c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \ |
72040e7e | 1377 | c-common.h flags.h toplev.h $(EXPR_H) |
4a7d7a8b | 1378 | mbchar.o: mbchar.c $(CONFIG_H) system.h mbchar.h |
27f5edd1 | 1379 | graph.o: graph.c $(CONFIG_H) system.h toplev.h flags.h output.h $(RTL_H) \ |
e5bd1365 | 1380 | function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h |
152bf224 | 1381 | sbitmap.o: sbitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) |
32e6d418 | 1382 | |
c6221df9 | 1383 | COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o |
67ce0331 | 1384 | collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS) |
e77fd588 | 1385 | # Don't try modifying collect2 (aka ld) in place--it might be linking this. |
62268150 | 1386 | -rm -f collect2$(exeext) |
be2828ce | 1387 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(COLLECT2_OBJS) $(LIBS) |
32e6d418 | 1388 | |
be2828ce | 1389 | collect2.o : collect2.c $(CONFIG_H) system.h gstab.h intl.h \ |
56fc5f02 | 1390 | $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h version.h |
5e03c63d | 1391 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
67cb4bc1 | 1392 | -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \ |
5e03c63d | 1393 | -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'` |
32e6d418 | 1394 | |
e504db4a | 1395 | tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h collect2.h |
c3ab7bd5 | 1396 | hash.o: hash.c hash.h system.h toplev.h |
cc895f11 | 1397 | |
4a7d7a8b | 1398 | vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h |
099377d8 | 1399 | rm -f vfprintf.c |
1400 | $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c | |
1401 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c | |
1402 | ||
a5b1863e | 1403 | splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \ |
4a7d7a8b | 1404 | $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h |
a5b1863e | 1405 | rm -f splay-tree.c |
1406 | $(LN_S) $(srcdir)/../libiberty/splay-tree.c splay-tree.c | |
1407 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) splay-tree.c | |
1408 | ||
997d68fe | 1409 | underscore.c: s-under ; @true |
7306ddcf | 1410 | |
997d68fe | 1411 | s-under: $(GCC_PASSES) |
c20b28d5 | 1412 | echo "int xxy_us_dummy;" >tmp-dum.c |
1413 | $(GCC_FOR_TARGET) -S tmp-dum.c | |
1414 | echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c | |
1415 | if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ | |
1416 | echo "int prepends_underscore = 1;" >>tmp-under.c; \ | |
d2f0b724 | 1417 | else \ |
c20b28d5 | 1418 | echo "int prepends_underscore = 0;" >>tmp-under.c; \ |
d2f0b724 | 1419 | fi |
bbb1c53a | 1420 | $(SHELL) $(srcdir)/move-if-change tmp-under.c underscore.c |
c20b28d5 | 1421 | -rm -f tmp-dum.c tmp-dum.s |
997d68fe | 1422 | touch s-under |
d2f0b724 | 1423 | |
32e6d418 | 1424 | # A file used by all variants of C. |
1425 | ||
c3ab7bd5 | 1426 | c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \ |
74647769 | 1427 | c-common.h flags.h toplev.h output.h c-pragma.h $(RTL_H) ggc.h \ |
1428 | $(EXPR_H) | |
32e6d418 | 1429 | |
1430 | # Language-independent files. | |
1431 | ||
4813bdd4 | 1432 | DRIVER_DEFINES = \ |
b155ba2f | 1433 | -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ |
c6396a0b | 1434 | -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ |
7df9e578 | 1435 | -DDEFAULT_TARGET_VERSION=\"$(version)\" \ |
67cb4bc1 | 1436 | -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \ |
b155ba2f | 1437 | -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ |
1438 | -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" | |
be2828ce | 1439 | gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \ |
4f5e65d7 | 1440 | Makefile $(lang_specs_files) prefix.h $(GCC_H) |
4813bdd4 | 1441 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
1442 | $(DRIVER_DEFINES) \ | |
32e6d418 | 1443 | -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` |
1444 | ||
4f5e65d7 | 1445 | gccspec.o: gccspec.c $(CONFIG_H) system.h $(GCC_H) |
1446 | cppspec.o: cppspec.c $(CONFIG_H) system.h $(GCC_H) | |
cdf76fe2 | 1447 | |
3e207e38 | 1448 | tree-check.h: s-check ; @true |
1051d196 | 1449 | s-check : gencheck $(srcdir)/move-if-change |
3e207e38 | 1450 | ./gencheck > tmp-check.h |
bbb1c53a | 1451 | $(SHELL) $(srcdir)/move-if-change tmp-check.h tree-check.h |
3e207e38 | 1452 | touch s-check |
1453 | ||
60239181 | 1454 | gencheck : gencheck.o $(HOST_LIBDEPS) |
3e207e38 | 1455 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
1456 | gencheck.o $(HOST_LIBS) | |
1457 | ||
60239181 | 1458 | gencheck.o : gencheck.c gencheck.h tree.def $(CONFIG_H) hconfig.h system.h \ |
1459 | $(lang_tree_files) | |
be2828ce | 1460 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ |
1461 | $(srcdir)/gencheck.c | |
580b113f | 1462 | |
32e6d418 | 1463 | dumpvers: dumpvers.c |
1464 | ||
4f5e65d7 | 1465 | version.o: version.c version.h |
05513b45 | 1466 | |
6374999a | 1467 | ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \ |
bebb7b68 | 1468 | flags.h ggc.h varray.h hash.h |
1469 | ||
6374999a | 1470 | ggc-simple.o: ggc-simple.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ |
df74f689 | 1471 | ggc.h varray.h |
05513b45 | 1472 | |
6374999a | 1473 | ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ |
df74f689 | 1474 | ggc.h varray.h |
911ab6b9 | 1475 | |
4018a53d | 1476 | ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) ggc.h |
05513b45 | 1477 | |
4018a53d | 1478 | ggc-callbacks.o: ggc-callbacks.c $(CONFIG_H) $(RTL_H) $(TREE_H) ggc.h |
fa8477c9 | 1479 | |
7b6bbd12 | 1480 | obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H) |
1481 | rm -f obstack.c | |
1482 | $(LN_S) $(srcdir)/../libiberty/obstack.c obstack.c | |
1483 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) obstack.c | |
1484 | ||
7bcdc3c7 | 1485 | prefix.o: prefix.c $(CONFIG_H) system.h Makefile prefix.h |
0dbd1c74 | 1486 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
1487 | -DPREFIX=\"$(prefix)\" \ | |
1488 | -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'` | |
32e6d418 | 1489 | |
7014838c | 1490 | convert.o: convert.c $(CONFIG_H) system.h $(TREE_H) flags.h convert.h toplev.h |
beb68ac1 | 1491 | |
a7b0c170 | 1492 | tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h \ |
f2d83427 | 1493 | ggc.h $(HASHTAB_H) |
1bfd55c5 | 1494 | print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) ggc.h |
c091e5a4 | 1495 | stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \ |
521dd524 | 1496 | function.h $(EXPR_H) $(RTL_H) toplev.h ggc.h |
0f9685e4 | 1497 | fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \ |
1bfd55c5 | 1498 | $(RTL_H) ggc.h |
076f8fe1 | 1499 | diagnostic.o : $(CONFIG_H) system.h $(TREE_H) $(RTL_H) tm_p.h flags.h \ |
d5b68c75 | 1500 | input.h insn-attr.h insn-codes.h insn-config.h toplev.h intl.h |
0a893c29 | 1501 | toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) function.h \ |
636fef92 | 1502 | flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \ |
be2828ce | 1503 | insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \ |
c5b89159 | 1504 | dwarf2out.h sdbout.h dbxout.h $(EXPR_H) $(BASIC_BLOCK_H) graph.h loop.h \ |
5d0e87b7 | 1505 | except.h regs.h $(lang_options_files) |
b600804e | 1506 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \ |
67cb4bc1 | 1507 | -DTARGET_NAME=\"$(target_alias)\" \ |
fe918d35 | 1508 | -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'` |
32e6d418 | 1509 | |
705695cd | 1510 | rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h ggc.h toplev.h |
32e6d418 | 1511 | |
f6b12c3a | 1512 | print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) $(BASIC_BLOCK_H) |
405711de | 1513 | rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H) |
04b58880 | 1514 | errors.o : errors.c $(CONFIG_H) system.h errors.h |
32e6d418 | 1515 | |
405711de | 1516 | varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \ |
d6ff8d83 | 1517 | function.h defaults.h $(EXPR_H) hard-reg-set.h $(REGS_H) \ |
a7b0c170 | 1518 | xcoffout.h output.h c-pragma.h toplev.h dbxout.h sdbout.h ggc.h |
405711de | 1519 | function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
d6ff8d83 | 1520 | function.h insn-flags.h insn-codes.h $(EXPR_H) $(REGS_H) hard-reg-set.h \ |
a7b0c170 | 1521 | insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h ggc.h |
405711de | 1522 | stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \ |
ae262a47 | 1523 | insn-flags.h insn-config.h insn-codes.h hard-reg-set.h $(EXPR_H) except.h \ |
a4d05baf | 1524 | $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h ggc.h |
405711de | 1525 | except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
d6ff8d83 | 1526 | function.h insn-flags.h $(EXPR_H) $(REGS_H) hard-reg-set.h \ |
a7b0c170 | 1527 | insn-config.h $(RECOG_H) output.h except.h toplev.h intl.h ggc.h |
405711de | 1528 | expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \ |
d3b64f2d | 1529 | $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h $(RECOG_H) \ |
521dd524 | 1530 | output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h \ |
bab4aa59 | 1531 | ggc.h intl.h |
53800dbe | 1532 | builtins.o : builtins.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
1533 | function.h $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h \ | |
1534 | $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \ | |
1535 | except.h | |
ae262a47 | 1536 | calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \ |
70024855 | 1537 | insn-flags.h $(REGS_H) toplev.h output.h function.h |
405711de | 1538 | expmed.o : expmed.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
d3b64f2d | 1539 | insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) real.h toplev.h |
405711de | 1540 | explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
d3b64f2d | 1541 | hard-reg-set.h insn-config.h $(EXPR_H) $(RECOG_H) insn-flags.h \ |
a5fb14bd | 1542 | insn-codes.h toplev.h function.h |
405711de | 1543 | optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
d3b64f2d | 1544 | insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) reload.h \ |
d8c9779c | 1545 | toplev.h ggc.h real.h |
d6ff8d83 | 1546 | dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h $(REGS_H) \ |
0e93a6ac | 1547 | insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \ |
4f5e65d7 | 1548 | toplev.h |
405711de | 1549 | sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \ |
d6ff8d83 | 1550 | function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \ |
7b6bbd12 | 1551 | insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \ |
1552 | sdbout.h toplev.h | |
405711de | 1553 | dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \ |
de2f3039 | 1554 | flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h |
405711de | 1555 | dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \ |
ae262a47 | 1556 | flags.h insn-config.h reload.h output.h defaults.h \ |
eacbfaac | 1557 | hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h varray.h \ |
de2f3039 | 1558 | ggc.h except.h |
405711de | 1559 | xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \ |
cff53614 | 1560 | flags.h toplev.h output.h dbxout.h ggc.h |
405711de | 1561 | emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
a7b0c170 | 1562 | function.h $(REGS_H) insn-config.h $(RECOG_H) real.h ggc.h \ |
73f5c1e3 | 1563 | $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \ |
1564 | $(HASHTAB_H) | |
c3ab7bd5 | 1565 | real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h |
405711de | 1566 | integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
395adca1 | 1567 | $(INTEGRATE_H) insn-flags.h insn-config.h $(EXPR_H) real.h $(REGS_H) \ |
a4d05baf | 1568 | intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) |
d6ff8d83 | 1569 | jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \ |
0a893c29 | 1570 | insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \ |
fe3b47be | 1571 | toplev.h insn-attr.h |
32e6d418 | 1572 | |
af21a202 | 1573 | simplify-rtx.o : simplify-rtx.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) \ |
1574 | hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ | |
1617c276 | 1575 | output.h function.h cselib.h ggc.h $(srcdir)/../include/obstack.h |
d6ff8d83 | 1576 | cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ |
df74f689 | 1577 | real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h ggc.h |
d3b64f2d | 1578 | gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \ |
1579 | flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \ | |
0a893c29 | 1580 | function.h output.h toplev.h |
60ecc450 | 1581 | sibcall.o : sibcall.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) function.h \ |
1582 | hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) | |
fb11422a | 1583 | resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \ |
d8c9779c | 1584 | $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \ |
1585 | insn-attr.h | |
e48ba7af | 1586 | lcm.o : lcm.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ |
18862b5a | 1587 | real.h insn-config.h insn-attr.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) |
dadde703 | 1588 | ssa.o : ssa.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) $(BASIC_BLOCK_H) \ |
1589 | output.h insn-config.h | |
405711de | 1590 | profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \ |
521dd524 | 1591 | gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h function.h insn-config.h \ |
1592 | ggc.h | |
a4d05baf | 1593 | loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h $(LOOP_H) insn-config.h \ |
d6ff8d83 | 1594 | insn-flags.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \ |
1617c276 | 1595 | $(BASIC_BLOCK_H) function.h toplev.h varray.h except.h cselib.h |
0a893c29 | 1596 | unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h function.h \ |
395adca1 | 1597 | $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \ |
1598 | varray.h | |
2d9b9dfe | 1599 | flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h insn-config.h \ |
952b0f82 | 1600 | $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \ |
c98bac56 | 1601 | insn-flags.h function.h except.h $(EXPR_H) |
0a893c29 | 1602 | combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h function.h \ |
d6ff8d83 | 1603 | insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \ |
ce1fd7fc | 1604 | $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h |
405711de | 1605 | regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \ |
0a893c29 | 1606 | $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h \ |
0dddbcb3 | 1607 | toplev.h function.h output.h ggc.h |
405711de | 1608 | local-alloc.o : local-alloc.c $(CONFIG_H) system.h $(RTL_H) flags.h \ |
0a893c29 | 1609 | $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \ |
1610 | output.h function.h insn-attr.h toplev.h | |
405711de | 1611 | bitmap.o : bitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H) \ |
d6ff8d83 | 1612 | $(REGS_H) |
0a893c29 | 1613 | global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h reload.h function.h \ |
d6ff8d83 | 1614 | $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h output.h toplev.h |
1615 | varray.o : varray.c $(CONFIG_H) system.h varray.h $(RTL_H) $(TREE_H) bitmap.h | |
ae262a47 | 1616 | reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h $(EXPR_H) \ |
d6ff8d83 | 1617 | reload.h $(RECOG_H) hard-reg-set.h insn-config.h insn-codes.h $(REGS_H) \ |
0a893c29 | 1618 | function.h real.h toplev.h |
ae262a47 | 1619 | reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h $(EXPR_H) \ |
d6ff8d83 | 1620 | reload.h $(REGS_H) hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \ |
1617c276 | 1621 | $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h cselib.h |
405711de | 1622 | caller-save.o : caller-save.c $(CONFIG_H) system.h $(RTL_H) flags.h \ |
0a893c29 | 1623 | $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \ |
ae262a47 | 1624 | $(RECOG_H) reload.h $(EXPR_H) toplev.h |
405711de | 1625 | reorg.o : reorg.c $(CONFIG_H) system.h $(RTL_H) conditions.h hard-reg-set.h \ |
d3b64f2d | 1626 | $(BASIC_BLOCK_H) $(REGS_H) insn-config.h insn-attr.h insn-flags.h \ |
0a893c29 | 1627 | $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h |
308704fb | 1628 | alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h \ |
1617c276 | 1629 | $(REGS_H) toplev.h output.h $(EXPR_H) insn-flags.h ggc.h function.h \ |
1630 | cselib.h | |
405711de | 1631 | regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \ |
0a893c29 | 1632 | $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h function.h \ |
ae262a47 | 1633 | $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h |
5701cb15 | 1634 | haifa-sched.o : haifa-sched.c $(CONFIG_H) system.h $(RTL_H) \ |
0a893c29 | 1635 | $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h function.h \ |
952b0f82 | 1636 | insn-attr.h toplev.h $(RECOG_H) except.h |
be2828ce | 1637 | final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h intl.h \ |
0a893c29 | 1638 | $(REGS_H) $(RECOG_H) conditions.h insn-config.h insn-attr.h function.h \ |
1639 | real.h output.h hard-reg-set.h insn-flags.h insn-codes.h gstab.h except.h \ | |
1640 | xcoffout.h defaults.h toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h \ | |
1641 | dbxout.h | |
f6b12c3a | 1642 | recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) function.h $(BASIC_BLOCK_H) \ |
d6ff8d83 | 1643 | $(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \ |
f6b12c3a | 1644 | insn-flags.h insn-codes.h real.h toplev.h output.h resource.h |
952b0f82 | 1645 | reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) $(RECOG_H) \ |
0a893c29 | 1646 | $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h \ |
82575fa7 | 1647 | varray.h function.h |
4a7d7a8b | 1648 | dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h |
59423b59 | 1649 | predict.o: predict.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
1650 | insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \ | |
1e53290d | 1651 | $(RECOG_H) insn-flags.h function.h except.h $(EXPR_H) |
d8fcbd1d | 1652 | lists.o: lists.c $(CONFIG_H) system.h toplev.h $(RTL_H) ggc.h |
a6540cbf | 1653 | bb-reorder.o : bb-reorder.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ |
1654 | insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \ | |
1655 | $(RECOG_H) insn-flags.h function.h except.h $(EXPR_H) | |
48c6936b | 1656 | |
dc12af01 | 1657 | $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \ |
d6ff8d83 | 1658 | $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \ |
0a893c29 | 1659 | insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h function.h |
b600804e | 1660 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file) |
32e6d418 | 1661 | |
f213fcf9 | 1662 | # Build auxiliary files that support ecoff format. |
1663 | mips-tfile: mips-tfile.o version.o $(LIBDEPS) | |
62268150 | 1664 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS) |
f213fcf9 | 1665 | |
56fc5f02 | 1666 | mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h version.h |
f213fcf9 | 1667 | |
1668 | mips-tdump: mips-tdump.o version.o $(LIBDEPS) | |
62268150 | 1669 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS) |
f213fcf9 | 1670 | |
47003e2a | 1671 | mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) system.h |
f213fcf9 | 1672 | |
636b182c | 1673 | # Build file to support OSF/rose half-pic format. |
1486870d | 1674 | halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) system.h |
636b182c | 1675 | |
32e6d418 | 1676 | # Normally this target is not used; but it is used if you |
1677 | # define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c | |
1678 | # from the GNU Emacs distribution. | |
099377d8 | 1679 | alloca.o: $(srcdir)/../libiberty/alloca.c |
1680 | rm -f alloca.c | |
1681 | $(LN_S) $(srcdir)/../libiberty/alloca.c alloca.c | |
32e6d418 | 1682 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \ |
099377d8 | 1683 | -c `echo alloca.c | sed 's,^\./,,'` |
32e6d418 | 1684 | $(ALLOCA_FINISH) |
2e9d8ccf | 1685 | #\f |
c6221df9 | 1686 | # Generate header and source files from the machine description, |
32e6d418 | 1687 | # and compile them. |
1688 | ||
1689 | .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \ | |
1690 | insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \ | |
1691 | insn-attr.h insn-attrtab.c | |
1692 | ||
1693 | # The following pair of rules has this effect: | |
1694 | # genconfig is run only if the md has changed since genconfig was last run; | |
1695 | # but the file insn-config.h is touched only when its contents actually change. | |
1696 | ||
1697 | # Each of the other insn-* files is handled by a similar pair of rules. | |
1698 | ||
3f69fed5 | 1699 | # This causes an anomaly in the results of make -n |
997d68fe | 1700 | # because insn-* is older than s-* |
3f69fed5 | 1701 | # and thus make -n thinks that insn-* will be updated |
1702 | # and force recompilation of things that depend on it. | |
9ac790c5 | 1703 | # We use move-if-change precisely to avoid such recompilation. |
3f69fed5 | 1704 | # But there is no way to teach make -n that it will be avoided. |
1705 | ||
32e6d418 | 1706 | # Each of the insn-*.[ch] rules has a semicolon at the end, |
1707 | # for otherwise the system Make on SunOS 4.1 never tries | |
876dc5b0 | 1708 | # to recompile insn-*.o. To avoid problems and extra noise from |
1709 | # versions of make which don't like empty commands (nothing after the | |
1710 | # trailing `;'), we call true for each. | |
32e6d418 | 1711 | |
997d68fe | 1712 | insn-config.h: s-config ; @true |
1713 | s-config : $(md_file) genconfig $(srcdir)/move-if-change | |
c20b28d5 | 1714 | ./genconfig $(md_file) > tmp-config.h |
bbb1c53a | 1715 | $(SHELL) $(srcdir)/move-if-change tmp-config.h insn-config.h |
997d68fe | 1716 | touch s-config |
32e6d418 | 1717 | |
997d68fe | 1718 | insn-flags.h: s-flags ; @true |
1719 | s-flags : $(md_file) genflags $(srcdir)/move-if-change | |
c20b28d5 | 1720 | ./genflags $(md_file) > tmp-flags.h |
bbb1c53a | 1721 | $(SHELL) $(srcdir)/move-if-change tmp-flags.h insn-flags.h |
997d68fe | 1722 | touch s-flags |
32e6d418 | 1723 | |
997d68fe | 1724 | insn-codes.h: s-codes ; @true |
1725 | s-codes : $(md_file) gencodes $(srcdir)/move-if-change | |
c20b28d5 | 1726 | ./gencodes $(md_file) > tmp-codes.h |
bbb1c53a | 1727 | $(SHELL) $(srcdir)/move-if-change tmp-codes.h insn-codes.h |
997d68fe | 1728 | touch s-codes |
32e6d418 | 1729 | |
ae262a47 | 1730 | insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \ |
952b0f82 | 1731 | insn-config.h insn-flags.h insn-codes.h system.h reload.h $(RECOG_H) \ |
1732 | function.h flags.h hard-reg-set.h resource.h | |
32e6d418 | 1733 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c |
1734 | ||
997d68fe | 1735 | insn-emit.c: s-emit ; @true |
1736 | s-emit : $(md_file) genemit $(srcdir)/move-if-change | |
c20b28d5 | 1737 | ./genemit $(md_file) > tmp-emit.c |
bbb1c53a | 1738 | $(SHELL) $(srcdir)/move-if-change tmp-emit.c insn-emit.c |
997d68fe | 1739 | touch s-emit |
32e6d418 | 1740 | |
ad87de1e | 1741 | insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \ |
5bcc7f1f | 1742 | real.h output.h flags.h system.h function.h hard-reg-set.h resource.h |
32e6d418 | 1743 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c |
1744 | ||
997d68fe | 1745 | insn-recog.c: s-recog ; @true |
1746 | s-recog : $(md_file) genrecog $(srcdir)/move-if-change | |
c20b28d5 | 1747 | ./genrecog $(md_file) > tmp-recog.c |
bbb1c53a | 1748 | $(SHELL) $(srcdir)/move-if-change tmp-recog.c insn-recog.c |
997d68fe | 1749 | touch s-recog |
32e6d418 | 1750 | |
bdb66cef | 1751 | insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \ |
ae262a47 | 1752 | insn-config.h flags.h $(RECOG_H) $(EXPR_H) reload.h system.h |
bdb66cef | 1753 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c |
1754 | ||
997d68fe | 1755 | insn-opinit.c: s-opinit ; @true |
1756 | s-opinit : $(md_file) genopinit $(srcdir)/move-if-change | |
c20b28d5 | 1757 | ./genopinit $(md_file) > tmp-opinit.c |
bbb1c53a | 1758 | $(SHELL) $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c |
997d68fe | 1759 | touch s-opinit |
bdb66cef | 1760 | |
5d07813e | 1761 | insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \ |
952b0f82 | 1762 | insn-config.h $(RECOG_H) |
32e6d418 | 1763 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c |
1764 | ||
997d68fe | 1765 | insn-extract.c: s-extract ; @true |
1766 | s-extract : $(md_file) genextract $(srcdir)/move-if-change | |
c20b28d5 | 1767 | ./genextract $(md_file) > tmp-extract.c |
bbb1c53a | 1768 | $(SHELL) $(srcdir)/move-if-change tmp-extract.c insn-extract.c |
997d68fe | 1769 | touch s-extract |
32e6d418 | 1770 | |
4063e82c | 1771 | insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \ |
952b0f82 | 1772 | system.h insn-config.h $(RECOG_H) except.h function.h |
32e6d418 | 1773 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c |
1774 | ||
997d68fe | 1775 | insn-peep.c: s-peep ; @true |
1776 | s-peep : $(md_file) genpeep $(srcdir)/move-if-change | |
c20b28d5 | 1777 | ./genpeep $(md_file) > tmp-peep.c |
bbb1c53a | 1778 | $(SHELL) $(srcdir)/move-if-change tmp-peep.c insn-peep.c |
997d68fe | 1779 | touch s-peep |
32e6d418 | 1780 | |
74273693 | 1781 | insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) $(REGS_H) real.h \ |
952b0f82 | 1782 | output.h insn-attr.h insn-config.h system.h toplev.h $(RECOG_H) |
32e6d418 | 1783 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c |
1784 | ||
997d68fe | 1785 | insn-attr.h: s-attr ; @true |
1786 | s-attr : $(md_file) genattr $(srcdir)/move-if-change | |
c20b28d5 | 1787 | ./genattr $(md_file) > tmp-attr.h |
bbb1c53a | 1788 | $(SHELL) $(srcdir)/move-if-change tmp-attr.h insn-attr.h |
997d68fe | 1789 | touch s-attr |
32e6d418 | 1790 | |
997d68fe | 1791 | insn-attrtab.c: s-attrtab ; @true |
1792 | s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change | |
44981bc7 | 1793 | ./genattrtab $(md_file) > tmp-attrtab.c |
bbb1c53a | 1794 | $(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c |
997d68fe | 1795 | touch s-attrtab |
32e6d418 | 1796 | |
bde3a957 | 1797 | insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) ggc.h $(REGS_H) real.h \ |
1798 | conditions.h hard-reg-set.h insn-config.h insn-flags.h insn-attr.h \ | |
1799 | output.h $(RECOG_H) function.h insn-codes.h system.h toplev.h flags.h | |
32e6d418 | 1800 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c |
1801 | ||
997d68fe | 1802 | insn-output.c: s-output ; @true |
1803 | s-output : $(md_file) genoutput $(srcdir)/move-if-change | |
c20b28d5 | 1804 | ./genoutput $(md_file) > tmp-output.c |
bbb1c53a | 1805 | $(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c |
997d68fe | 1806 | touch s-output |
3ad7bb1c | 1807 | |
71661611 | 1808 | genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h ggc.h |
997d68fe | 1809 | genrtl.c genrtl.h : s-genrtl |
7cc452c1 | 1810 | @true # force gnu make to recheck modification times. |
1811 | ||
997d68fe | 1812 | s-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H) |
7014838c | 1813 | ./gengenrtl -h >tmp-genrtl.h |
bbb1c53a | 1814 | $(SHELL) $(srcdir)/move-if-change tmp-genrtl.h genrtl.h |
7014838c | 1815 | ./gengenrtl >tmp-genrtl.c |
bbb1c53a | 1816 | $(SHELL) $(srcdir)/move-if-change tmp-genrtl.c genrtl.c |
997d68fe | 1817 | touch s-genrtl |
2e9d8ccf | 1818 | #\f |
32e6d418 | 1819 | # Compile the programs that generate insn-* from the machine description. |
1820 | # They are compiled with $(HOST_CC), and associated libraries, | |
1821 | # since they need to run on this machine | |
1822 | # even if GCC is being compiled to run on some other machine. | |
1823 | ||
1824 | # $(CONFIG_H) is omitted from the deps of the gen*.o | |
c6221df9 | 1825 | # because these programs don't really depend on anything |
32e6d418 | 1826 | # about the target machine. They do depend on config.h itself, |
1827 | # since that describes the host machine. | |
1828 | ||
89e36a04 | 1829 | # Pass the md file through cpp if the target requests it. |
2c352995 | 1830 | $(MD_FILE): $(MD_DEPS) |
1831 | rm -f $@ | |
c20b28d5 | 1832 | $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@ |
c92e16d4 | 1833 | mv tmp-$@ $@ |
89e36a04 | 1834 | |
04b58880 | 1835 | genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1836 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1837 | genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1838 | |
04b58880 | 1839 | genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1840 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c |
1841 | ||
04b58880 | 1842 | genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1843 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1844 | genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1845 | |
04b58880 | 1846 | genflags.o : genflags.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1847 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c |
1848 | ||
04b58880 | 1849 | gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1850 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1851 | gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1852 | |
04b58880 | 1853 | gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1854 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c |
1855 | ||
04b58880 | 1856 | genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1857 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1858 | genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1859 | |
04b58880 | 1860 | genemit.o : genemit.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1861 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c |
1862 | ||
04b58880 | 1863 | genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1864 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1865 | genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
bdb66cef | 1866 | |
04b58880 | 1867 | genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) system.h errors.h |
bdb66cef | 1868 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c |
1869 | ||
04b58880 | 1870 | genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1871 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1872 | genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1873 | |
04b58880 | 1874 | genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1875 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c |
1876 | ||
04b58880 | 1877 | genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1878 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1879 | genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1880 | |
04b58880 | 1881 | genextract.o : genextract.c $(RTL_H) $(build_xm_file) system.h insn-config.h errors.h |
32e6d418 | 1882 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c |
1883 | ||
04b58880 | 1884 | genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1885 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1886 | genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1887 | |
04b58880 | 1888 | genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1889 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c |
1890 | ||
04b58880 | 1891 | genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1892 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1893 | genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1894 | |
04b58880 | 1895 | genattr.o : genattr.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1896 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c |
1897 | ||
140cb7e4 | 1898 | genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1899 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
140cb7e4 | 1900 | genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1901 | |
15b50aec | 1902 | genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) system.h errors.h ggc.h |
32e6d418 | 1903 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c |
1904 | ||
04b58880 | 1905 | genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS) |
62268150 | 1906 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ |
04b58880 | 1907 | genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS) |
32e6d418 | 1908 | |
04b58880 | 1909 | genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) system.h errors.h |
32e6d418 | 1910 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c |
3ad7bb1c | 1911 | |
1912 | gengenrtl : gengenrtl.o $(HOST_LIBDEPS) | |
1913 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ | |
1914 | gengenrtl.o $(HOST_LIBS) | |
1915 | ||
952b0f82 | 1916 | gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h real.h |
3ad7bb1c | 1917 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gengenrtl.c |
2e9d8ccf | 1918 | #\f |
32e6d418 | 1919 | # Compile the libraries to be used by gen*. |
1920 | # If we are not cross-building, gen* use the same .o's that cc1 will use, | |
1921 | # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict | |
1922 | # with the rules for rtl.o, alloca.o, etc. | |
b38d33a3 | 1923 | $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) system.h $(RTL_H) \ |
1924 | bitmap.h ggc.h toplev.h | |
32e6d418 | 1925 | rm -f $(HOST_PREFIX)rtl.c |
e77fd588 | 1926 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c |
32e6d418 | 1927 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c |
1928 | ||
f6b12c3a | 1929 | $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) \ |
1930 | $(RTL_H) $(BASIC_BLOCK_H) system.h | |
262d46de | 1931 | rm -f $(HOST_PREFIX)print-rtl.c |
e77fd588 | 1932 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c |
262d46de | 1933 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c |
1934 | ||
a3426c4c | 1935 | $(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(CONFIG_H) system.h $(RTL_H) \ |
d6ff8d83 | 1936 | flags.h $(BASIC_BLOCK_H) $(REGS_H) |
a3426c4c | 1937 | rm -f $(HOST_PREFIX)bitmap.c |
1938 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c | |
1939 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c | |
1940 | ||
b38d33a3 | 1941 | $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) system.h $(RTL_H) |
32e6d418 | 1942 | rm -f $(HOST_PREFIX)rtlanal.c |
e77fd588 | 1943 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c |
32e6d418 | 1944 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c |
1945 | ||
099377d8 | 1946 | $(HOST_PREFIX_1)alloca.o: $(srcdir)/../libiberty/alloca.c |
32e6d418 | 1947 | rm -f $(HOST_PREFIX)alloca.c |
099377d8 | 1948 | $(LN_S) $(srcdir)/../libiberty/alloca.c $(HOST_PREFIX)alloca.c |
32e6d418 | 1949 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c |
1950 | ||
b38d33a3 | 1951 | $(HOST_PREFIX_1)obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H) |
32e6d418 | 1952 | rm -f $(HOST_PREFIX)obstack.c |
7b6bbd12 | 1953 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c |
32e6d418 | 1954 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c |
1955 | ||
44a8856e | 1956 | $(HOST_PREFIX_1)vfprintf.o: $(srcdir)/../libiberty/vfprintf.c |
b8a373b2 | 1957 | rm -f $(HOST_PREFIX)vfprintf.c |
099377d8 | 1958 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/vfprintf.c > $(HOST_PREFIX)vfprintf.c |
b8a373b2 | 1959 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)vfprintf.c |
1960 | ||
1961 | $(HOST_PREFIX_1)doprint.o: doprint.c | |
1962 | rm -f $(HOST_PREFIX)doprint.c | |
1963 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/doprint.c > $(HOST_PREFIX)doprint.c | |
1964 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)doprint.c | |
1965 | ||
32e6d418 | 1966 | $(HOST_PREFIX_1)malloc.o: malloc.c |
1967 | rm -f $(HOST_PREFIX)malloc.c | |
e77fd588 | 1968 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c |
32e6d418 | 1969 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c |
1970 | ||
04b58880 | 1971 | $(HOST_PREFIX_1)errors.o: errors.c |
1972 | rm -f $(HOST_PREFIX)errors.c | |
1973 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(HOST_PREFIX)errors.c | |
1974 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)errors.c | |
1975 | ||
1976 | ||
32e6d418 | 1977 | # This satisfies the dependency that we get if you cross-compile a compiler |
1978 | # that does not need to compile alloca, malloc or whatever. | |
c6221df9 | 1979 | $(HOST_PREFIX_1): |
32e6d418 | 1980 | touch $(HOST_PREFIX_1) |
649d8da6 | 1981 | |
92d28b1c | 1982 | $(HOST_PREFIX_1)ggc-none.o: ggc-none.c |
297db6d7 | 1983 | rm -f $(HOST_PREFIX)ggc-none.c |
1984 | sed -e 's/config[.]h/hconfig.h/' $(srcdir)/ggc-none.c > $(HOST_PREFIX)ggc-none.c | |
1985 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)ggc-none.c | |
92d28b1c | 1986 | |
be2828ce | 1987 | |
1988 | #\f | |
1989 | # Remake internationalization support. | |
1990 | ||
1991 | intl.o: intl.c intl.h gansidecl.h Makefile | |
1992 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ | |
1993 | -DLOCALEDIR=\"$(localedir)\" \ | |
1994 | -c `echo $(srcdir)/intl.c | sed 's,^\./,,'` | |
1995 | ||
1996 | # This is needed to when doing a partial build after a `make clean'. | |
1997 | # libintl.a does not depend on intl.all, | |
1998 | # as that would force a lot of recompiling. | |
1999 | $(top_builddir)/intl/libintl.a: | |
2000 | @echo "$(MAKE) intl.all" | |
2001 | @$(MAKE) $(FLAGS_TO_PASS) intl.all | |
2002 | ||
2003 | # Make sure all the headers are there for xgettext to scan. | |
5728fc9b | 2004 | $(INTL_TARGETS): $(srcdir)/c-gperf.h \ |
2005 | $(srcdir)/c-parse.c $(srcdir)/c-parse.h $(srcdir)/cexp.c | |
be2828ce | 2006 | |
2007 | intl.all intl.install intl.uninstall intl.distdir \ | |
2008 | intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean: | |
2009 | @for d in $(INTL_SUBDIRS); do \ | |
2010 | target=`expr $@ : 'intl.\(.*\)'` && \ | |
2011 | echo "(cd $$d && $(MAKE) $$target)" && \ | |
2012 | (cd $$d && AWK='$(AWK)' $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $$target); \ | |
2013 | done | |
2014 | ||
2015 | # intl.distdir doesn't copy the intl makefiles (since they aren't distributed), | |
2016 | # but we need them for the `make extraclean' in distdir-finish. | |
2017 | intl.distdir-fixup: | |
2018 | for d in $(INTL_SUBDIRS); do \ | |
2019 | ln $$d/Makefile tmp/$$d || cp $$d/Makefile tmp/$$d || exit; \ | |
2020 | done | |
2e9d8ccf | 2021 | #\f |
32e6d418 | 2022 | # Remake cpp and protoize. |
2023 | ||
2024 | # Making the preprocessor | |
7f6a6499 | 2025 | cpp$(exeext): $(CCCP)$(exeext) |
f403cbcb | 2026 | -rm -f cpp$(exeext) |
ea4a6c81 | 2027 | $(LN) $(CCCP)$(exeext) cpp$(exeext) |
c6221df9 | 2028 | CCCP_OBJS = cccp.o cexp.o intl.o prefix.o version.o @extra_cpp_objs@ mbchar.o |
be2828ce | 2029 | cccp$(exeext): $(CCCP_OBJS) $(LIBDEPS) |
2030 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CCCP_OBJS) $(LIBS) | |
7014838c | 2031 | cexp.o: $(srcdir)/cexp.c $(CONFIG_H) system.h mbchar.h |
32e6d418 | 2032 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c |
2033 | $(srcdir)/cexp.c: $(srcdir)/cexp.y | |
2034 | cd $(srcdir); $(BISON) -o cexp.c cexp.y | |
62268150 | 2035 | |
e2d3326d | 2036 | PREPROCESSOR_DEFINES = \ |
2037 | -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ | |
2038 | -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ | |
2039 | -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ | |
2040 | -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ | |
2041 | -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" | |
8099945b | 2042 | # We use $(libsubdir)/$(unlibsubdir) to match the |
2043 | # -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used. | |
be2828ce | 2044 | cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \ |
56fc5f02 | 2045 | mbchar.h prefix.h Makefile.in version.h |
32e6d418 | 2046 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
e2d3326d | 2047 | $(PREPROCESSOR_DEFINES) \ |
32e6d418 | 2048 | -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` |
2049 | ||
58113712 | 2050 | LIBCPP_OBJS = cpplib.o cpphash.o cpperror.o cppexp.o cppfiles.o \ |
0578f103 | 2051 | cppinit.o cppulp.o cpplex.o mkdeps.o \ |
62adb1fe | 2052 | prefix.o version.o mbchar.o @extra_cpp_objs@ |
95c4b02a | 2053 | |
a7ccf951 | 2054 | LIBCPP_DEPS = cpplib.h cpphash.h intl.h system.h |
5ecec5da | 2055 | HASHTAB_H = $(srcdir)/../include/hashtab.h |
a7ccf951 | 2056 | |
73b4c875 | 2057 | # All the other archives built/used by this makefile are for targets. This |
2058 | # one is strictly for the host. | |
2059 | # | |
95c4b02a | 2060 | libcpp.a: $(LIBCPP_OBJS) |
6d250c05 | 2061 | -rm -rf libcpp.a |
396c97db | 2062 | $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS) |
2063 | if $(RANLIB_TEST) ; then $(RANLIB) libcpp.a ; else true ; fi | |
95c4b02a | 2064 | |
20ed13da | 2065 | cppmain$(exeext): cppmain.o intl.o libcpp.a $(LIBDEPS) |
95c4b02a | 2066 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \ |
20ed13da | 2067 | intl.o libcpp.a $(LIBS) |
3e4227af | 2068 | |
5ecec5da | 2069 | cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h |
f03d7bcd | 2070 | |
5ecec5da | 2071 | cppulp.o: cppulp.c $(CONFIG_H) system.h output.h |
a7ccf951 | 2072 | cpperror.o: cpperror.c $(CONFIG_H) $(LIBCPP_DEPS) |
2073 | cppexp.o: cppexp.c $(CONFIG_H) $(LIBCPP_DEPS) | |
0578f103 | 2074 | cpplex.o: cpplex.c $(CONFIG_H) $(LIBCPP_DEPS) |
4bf559f2 | 2075 | cpplib.o: cpplib.c $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) |
608a2132 | 2076 | cpphash.o: cpphash.c $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) |
4bf559f2 | 2077 | cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) mkdeps.h |
164e0f66 | 2078 | |
5ecec5da | 2079 | cppinit.o: cppinit.c $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) mkdeps.h \ |
2080 | prefix.h output.h Makefile version.h | |
3e4227af | 2081 | $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
e2d3326d | 2082 | $(PREPROCESSOR_DEFINES) \ |
6d71dc85 | 2083 | -c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'` |
a852e3b1 | 2084 | |
62adb1fe | 2085 | mkdeps.o: mkdeps.c $(CONFIG_H) system.h mkdeps.h |
2086 | ||
876dc5b0 | 2087 | # Note for the stamp targets, we run the program `true' instead of |
2088 | # having an empty command (nothing following the semicolon). | |
2089 | ||
7f6a6499 | 2090 | proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X |
32e6d418 | 2091 | |
c6221df9 | 2092 | PROTO_OBJS = intl.o version.o |
be2828ce | 2093 | |
2094 | protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS) | |
2095 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS) | |
ab866dde | 2096 | |
be2828ce | 2097 | unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS) |
2098 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS) | |
ab866dde | 2099 | |
eeadfa9d | 2100 | protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \ |
56fc5f02 | 2101 | Makefile version.h |
32e6d418 | 2102 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
e2d3326d | 2103 | $(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \ |
122c82ed | 2104 | $(srcdir)/protoize.c |
2105 | ||
eeadfa9d | 2106 | unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \ |
56fc5f02 | 2107 | $(CONFIG_H) system.h Makefile version.h |
32e6d418 | 2108 | $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
e2d3326d | 2109 | $(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \ |
122c82ed | 2110 | $(srcdir)/unprotoize.c |
32e6d418 | 2111 | |
32e6d418 | 2112 | # This info describes the target machine, so compile with GCC just built. |
62268150 | 2113 | SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \ |
2114 | stmp-int-hdrs | |
f678532a | 2115 | -rm -f SYSCALLS.c tmp-SYSCALLS.s |
79f818d0 | 2116 | cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c |
32e6d418 | 2117 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ |
f678532a | 2118 | -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c |
2119 | -rm -f SYSCALLS.c tmp-SYSCALLS.s | |
0b20f012 | 2120 | |
a5889b74 | 2121 | |
0b20f012 | 2122 | test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES) |
c548e550 | 2123 | -rm -f tmp-proto.[cso] |
262d46de | 2124 | cp $(srcdir)/protoize.c tmp-proto.c |
2125 | chmod u+w tmp-proto.c | |
c548e550 | 2126 | ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \ |
e2d3326d | 2127 | $(GCC_CFLAGS) $(INCLUDES) \ |
0b20f012 | 2128 | -DGCC_INCLUDE_DIR=0 \ |
2129 | -DGPLUSPLUS_INCLUDE_DIR=0 \ | |
2130 | -DCROSS_INCLUDE_DIR=0 \ | |
46073b39 | 2131 | -DTOOL_INCLUDE_DIR=0 \ |
e2d3326d | 2132 | -DSTANDARD_EXEC_PREFIX=0 \ |
2133 | -DDEFAULT_TARGET_MACHINE=0 \ | |
2134 | -DDEFAULT_TARGET_VERSION=0" tmp-proto.c | |
1a754c64 | 2135 | @echo '**********' Expect 400 lines of differences. |
c548e550 | 2136 | -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff |
2137 | -wc -l tmp-proto.diff | |
2138 | ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \ | |
e2d3326d | 2139 | $(GCC_CFLAGS) $(INCLUDES) \ |
0b20f012 | 2140 | -DGCC_INCLUDE_DIR=0 \ |
2141 | -DGPLUSPLUS_INCLUDE_DIR=0 \ | |
2142 | -DCROSS_INCLUDE_DIR=0 \ | |
46073b39 | 2143 | -DTOOL_INCLUDE_DIR=0 \ |
e2d3326d | 2144 | -DSTANDARD_EXEC_PREFIX=0 \ |
2145 | -DDEFAULT_TARGET_MACHINE=0 \ | |
2146 | -DDEFAULT_TARGET_VERSION=0" tmp-proto.c | |
0b20f012 | 2147 | @echo Expect zero differences. |
262d46de | 2148 | diff $(srcdir)/protoize.c tmp-proto.c | cat |
62268150 | 2149 | -rm -f tmp-proto.[cs] tmp-proto$(objext) |
2b55270a | 2150 | |
be2828ce | 2151 | gcov.o: gcov.c gcov-io.h intl.h system.h |
2b55270a | 2152 | |
0f11bb5d | 2153 | # Only one of 'gcov' or 'gcov.exe' is actually built, depending |
2154 | # upon whether $(exeext) is empty or not. | |
be2828ce | 2155 | GCOV_OBJS = gcov.o intl.o |
2156 | gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) | |
2157 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ | |
2e9d8ccf | 2158 | #\f |
2cfd79fe | 2159 | # Build the include directory. The stamp files are stmp-* rather than |
997d68fe | 2160 | # s-* so that mostlyclean does not force the include directory to |
2cfd79fe | 2161 | # be rebuilt. |
2162 | ||
d54b81e0 | 2163 | # Build the include directory including float.h (which no longer depends upon |
690a93ea | 2164 | # enquire). |
58113712 | 2165 | stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h |
2cfd79fe | 2166 | # Copy in the headers provided with gcc. |
2167 | # The sed command gets just the last file name component; | |
2168 | # this is necessary because VPATH could add a dirname. | |
2169 | # Using basename would be simpler, but some systems don't have it. | |
220345e0 | 2170 | # The touch command is here to workaround an AIX/Linux NFS bug. |
c8763215 | 2171 | for file in .. $(USER_H); do \ |
2172 | if [ X$$file != X.. ]; then \ | |
2173 | realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ | |
220345e0 | 2174 | touch include/$$realfile; \ |
1941d7da | 2175 | rm -f include/$$realfile; \ |
2176 | cp $$file include; \ | |
2177 | chmod a+r include/$$realfile; \ | |
c8763215 | 2178 | fi; \ |
2cfd79fe | 2179 | done |
b5850e21 | 2180 | rm -f include/limits.h |
2cfd79fe | 2181 | cp xlimits.h include/limits.h |
2182 | chmod a+r include/limits.h | |
690a93ea | 2183 | rm -f include/float.h |
19c49761 | 2184 | if [ x$(FLOAT_H) != xMakefile.in ]; then \ |
2185 | cp $(srcdir)/config/$(FLOAT_H) include/float.h && \ | |
0dbd1c74 | 2186 | chmod a+r include/float.h; \ |
2187 | else :; fi | |
d54b81e0 | 2188 | # Install the README |
2189 | rm -f include/README | |
2190 | cp $(srcdir)/README-fixinc include/README | |
2191 | chmod a+r include/README | |
2192 | touch $@ | |
2193 | ||
584727c9 | 2194 | # fixinc.sh depends on this, not on specs directly. |
2195 | # The idea is to make sure specs gets built, but not rerun fixinc.sh | |
2196 | # after each stage just because specs' mtime has changed. | |
2197 | specs.ready: specs | |
2198 | -if [ -f specs.ready ] ; then \ | |
2199 | true; \ | |
2200 | else \ | |
2201 | touch specs.ready; \ | |
2202 | fi | |
2203 | ||
2dc7f475 | 2204 | FIXINCSRCDIR=$(srcdir)/fixinc |
2205 | fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ | |
ed8eb9b3 | 2206 | $(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/gnu-regex.c \ |
2207 | $(FIXINCSRCDIR)/server.c $(FIXINCSRCDIR)/gnu-regex.h \ | |
584727c9 | 2208 | $(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready |
434bb88d | 2209 | MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc; pwd` ; \ |
2210 | export MAKE srcdir ; \ | |
2211 | cd ./fixinc; $(SHELL) $${srcdir}/mkfixinc.sh $(target) | |
2212 | ||
2cfd79fe | 2213 | # Build fixed copies of system files. |
434bb88d | 2214 | stmp-fixinc: fixinc.sh gsyslimits.h |
2215 | rm -rf include; mkdir include | |
7014838c | 2216 | -chmod a+rx include |
434bb88d | 2217 | TARGET_MACHINE=$(target); srcdir=`cd $(srcdir); pwd`; \ |
f26c984d | 2218 | INSTALL_ASSERT_H=$(INSTALL_ASSERT_H); SHELL=$(SHELL) ;\ |
2219 | export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \ | |
434bb88d | 2220 | $(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) |
b7d4d520 | 2221 | rm -f include/syslimits.h |
2222 | if [ -f include/limits.h ]; then \ | |
2223 | mv include/limits.h include/syslimits.h; \ | |
2224 | else \ | |
2225 | cp $(srcdir)/gsyslimits.h include/syslimits.h; \ | |
2226 | fi | |
2227 | chmod a+r include/syslimits.h | |
d989b259 | 2228 | # If $(SYSTEM_HEADER_DIR) is $(tooldir)/sys-include, and |
8099945b | 2229 | # that directory exists, then make sure that $(libsubdir) exists. |
d989b259 | 2230 | # This is because cpp is compiled to find $(tooldir)/include via |
8099945b | 2231 | # $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir) |
2232 | # exists. | |
d989b259 | 2233 | # We deliberately use tooldir instead of gcc_tooldir here. gcc_tooldir |
2234 | # won't work because libsubdir doesn't exist yet. | |
2235 | if [ "$(SYSTEM_HEADER_DIR)" = "$(tooldir)/sys-include" ] \ | |
2236 | && [ -d $(tooldir)/sys-include ]; then \ | |
8099945b | 2237 | if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \ |
2238 | if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \ | |
2239 | if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \ | |
2240 | if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ | |
2241 | else true; fi | |
9e74f24f | 2242 | touch stmp-fixinc |
7c4f0e88 | 2243 | |
a5889b74 | 2244 | # Files related to the fixproto script. |
58113712 | 2245 | # gen-protos and fix-header are compiled with HOST_CC, but they are only |
2246 | # used in native and host-x-target builds, so it's safe to link them with | |
2247 | # libiberty.a. | |
a5889b74 | 2248 | |
047c2b8b | 2249 | deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs |
6ce07cb7 | 2250 | if [ -d $(SYSTEM_HEADER_DIR) ]; \ |
2251 | then \ | |
2252 | CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \ | |
a5889b74 | 2253 | export CC; \ |
6ce07cb7 | 2254 | $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \ |
2255 | mv tmp-deduced.h deduced.h; \ | |
2256 | else \ | |
2257 | touch deduced.h; \ | |
2258 | fi | |
a5889b74 | 2259 | |
745272db | 2260 | GEN_PROTOS_OBJS = gen-protos.o scan.o |
e65966c3 | 2261 | gen-protos: $(GEN_PROTOS_OBJS) |
8ac08729 | 2262 | ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \ |
58113712 | 2263 | $(GEN_PROTOS_OBJS) ../libiberty/libiberty.a |
a5889b74 | 2264 | |
745272db | 2265 | gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h |
c68462d9 | 2266 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c |
2267 | ||
1486870d | 2268 | scan.o: scan.c scan.h $(build_xm_file) system.h |
c68462d9 | 2269 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c |
9541a717 | 2270 | |
047c2b8b | 2271 | xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile |
c92e16d4 | 2272 | cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c |
2273 | mv tmp-fixtmp.c fixtmp.c | |
2f9d2927 | 2274 | $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \ |
6fc3eafd | 2275 | | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \ |
c92e16d4 | 2276 | | ./gen-protos >xsys-protos.hT |
2277 | mv xsys-protos.hT xsys-protos.h | |
d7c4552e | 2278 | rm -rf fixtmp.c |
a5889b74 | 2279 | |
62268150 | 2280 | fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \ |
95c4b02a | 2281 | libcpp.a |
62268150 | 2282 | $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \ |
58113712 | 2283 | scan-decls.o scan.o libcpp.a $(HOST_LIBS) ../libiberty/libiberty.a |
a5889b74 | 2284 | |
7b6bbd12 | 2285 | fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \ |
745272db | 2286 | xsys-protos.h $(build_xm_file) system.h cpplib.h |
c68462d9 | 2287 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c |
2288 | ||
164e0f66 | 2289 | scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h |
c68462d9 | 2290 | $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c |
a5889b74 | 2291 | |
047c2b8b | 2292 | # stmp-fixproto depends on this, not on fix-header directly. |
2293 | # The idea is to make sure fix-header gets built, | |
2294 | # but not rerun fixproto after each stage | |
2295 | # just because fix-header's mtime has changed. | |
2296 | fixhdr.ready: fix-header | |
2297 | -if [ -f fixhdr.ready ] ; then \ | |
2298 | true; \ | |
2299 | else \ | |
2300 | touch fixhdr.ready; \ | |
2301 | fi | |
2302 | ||
58113712 | 2303 | # stmp-int-headers is to make sure fixincludes has already finished. |
276709eb | 2304 | # The if statement is so that we don't run fixproto a second time |
2305 | # if it has already been run on the files in `include'. | |
58113712 | 2306 | stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs |
2deaa28d | 2307 | @echo "Various warnings and error messages from fixproto are normal" |
7014838c | 2308 | -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi |
b948f736 | 2309 | -if [ -f include/fixed ] ; then true; \ |
276709eb | 2310 | else \ |
6f1f992e | 2311 | : This line works around a 'make' bug in BSDI 1.1.; \ |
ff8281e4 | 2312 | FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ |
e555525a | 2313 | mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \ |
2314 | export mkinstalldirs; \ | |
bcc35674 | 2315 | if [ -d $(SYSTEM_HEADER_DIR) ] ; then \ |
2316 | $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ | |
2317 | else true; fi; \ | |
276709eb | 2318 | touch include/fixed; \ |
2319 | fi | |
a5889b74 | 2320 | touch stmp-fixproto |
2e9d8ccf | 2321 | #\f |
32e6d418 | 2322 | # Remake the info files. |
2323 | ||
627defc4 | 2324 | doc: info |
17b258fe | 2325 | info: cpp.info gcc.info lang.info |
32e6d418 | 2326 | |
17b258fe | 2327 | cpp.info: $(srcdir)/cpp.texi |
069f16fd | 2328 | $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi |
32e6d418 | 2329 | |
17b258fe | 2330 | gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ |
2331 | $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ | |
2332 | $(srcdir)/tm.texi $(srcdir)/gcov.texi | |
069f16fd | 2333 | $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi |
630c76ba | 2334 | |
17b258fe | 2335 | dvi: gcc.dvi cpp.dvi lang.dvi |
627defc4 | 2336 | |
64616031 | 2337 | # This works with GNU Make's default rule. |
17b258fe | 2338 | gcc.dvi: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ |
2339 | $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ | |
2340 | $(srcdir)/tm.texi $(srcdir)/gcov.texi | |
2341 | TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi | |
2342 | texindex gcc.?? | |
2343 | TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex gcc.texi | |
2344 | ||
2345 | cpp.dvi: $(srcdir)/cpp.texi | |
2346 | TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi | |
2347 | texindex cpp.?? | |
2348 | TEXINPUTS=${texidir}:$(srcdir):$$TEXINPUTS tex cpp.texi | |
2349 | ||
2350 | ||
2351 | INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi | |
3ed0d670 | 2352 | cd $(srcdir); $(MAKEINFO) -D INSTALLONLY \ |
c6221df9 | 2353 | --no-split -o INSTALL install1.texi |
2e9d8ccf | 2354 | #\f |
32e6d418 | 2355 | # Deletion of files made during compilation. |
2356 | # There are four levels of this: | |
a8514488 | 2357 | # `mostlyclean', `clean', `distclean' and `maintainer-clean'. |
32e6d418 | 2358 | # `mostlyclean' is useful while working on a particular type of machine. |
c6396a0b | 2359 | # It deletes most, but not all, of the files made by compilation. |
32e6d418 | 2360 | # It does not delete libgcc.a or its parts, so it won't have to be recompiled. |
c6396a0b | 2361 | # `clean' deletes everything made by running `make all'. |
79f818d0 | 2362 | # `distclean' also deletes the files made by config. |
a8514488 | 2363 | # `maintainer-clean' also deletes everything that could be regenerated |
1f42ecdc | 2364 | # automatically, except for `configure'. |
2365 | # We remove as much from the language subdirectories as we can | |
73027c94 | 2366 | # (less duplicated code). |
32e6d418 | 2367 | |
c50e5930 | 2368 | INTL_MOSTLYCLEAN = intl.mostlyclean |
2369 | mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean | |
32e6d418 | 2370 | -rm -f $(STAGESTUFF) |
2371 | # Delete the temporary source copies for cross compilation. | |
2372 | -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c | |
2373 | -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c | |
c6221df9 | 2374 | -rm -f $(HOST_PREFIX_1)obstack.c |
32e6d418 | 2375 | # Delete the temp files made in the course of building libgcc.a. |
c09ccbc2 | 2376 | -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test |
32e6d418 | 2377 | for name in $(LIB1FUNCS); do rm -f $${name}.c; done |
997d68fe | 2378 | # Delete other built files. |
2379 | -rm -f t-float.h-cross xsys-protos.hT fp-bit.c dp-bit.c | |
2380 | # Delete the stamp and temporary files. | |
2381 | -rm -f s-* tmp-* stamp-* stmp-* | |
73027c94 | 2382 | -rm -f */stamp-* */tmp-* |
c6396a0b | 2383 | # Delete debugging dump files. |
32e6d418 | 2384 | -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop |
18aa2adf | 2385 | -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof |
dadde703 | 2386 | -rm -f *.regmove *.mach *.bp *.gcse *.flow2 *.peephole2 *.ssa *.ussa |
73027c94 | 2387 | -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl |
2388 | -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2 | |
f276de6b | 2389 | -rm -f */*.sched2 */*.stack */*.regmove */*.gcse */*.flow2 |
dadde703 | 2390 | -rm -f */*.peephole2 */*.ssa */*.ussa |
c6396a0b | 2391 | # Delete some files made during installation. |
19c49761 | 2392 | -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c |
e98401fc | 2393 | -rm -f collect collect2 mips-tfile mips-tdump alloca.s |
a5889b74 | 2394 | # Delete files generated for fixproto |
15dece2a | 2395 | -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \ |
c9c7b9d8 | 2396 | gen-protos fixproto.list fixtmp.* fixhdr.ready |
c6396a0b | 2397 | # Delete unwanted output files from TeX. |
2398 | -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg | |
73027c94 | 2399 | -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg |
79f818d0 | 2400 | # Delete sorted indices we don't actually use. |
2401 | -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns | |
c6396a0b | 2402 | # Delete core dumps. |
73027c94 | 2403 | -rm -f core */core |
2b55270a | 2404 | -rm -f *.bp */*.bp |
32e6d418 | 2405 | |
79f818d0 | 2406 | # Delete all files made by compilation |
2407 | # that don't exist in the distribution. | |
c50e5930 | 2408 | INTL_CLEAN = intl.clean |
2409 | clean: mostlyclean $(INTL_CLEAN) lang.clean | |
745e3a0d | 2410 | -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready |
17108b2b | 2411 | -rm -f libgcc1.null |
131b361e | 2412 | -rm -f *.dvi |
73027c94 | 2413 | -rm -f */*.dvi |
89e36a04 | 2414 | -if [ -f md.pre-cpp ]; then \ |
2415 | rm -f md ; \ | |
2416 | fi | |
2cfd79fe | 2417 | # Delete the include directory. |
997d68fe | 2418 | -rm -rf include |
d73a48cc | 2419 | # Delete files used by the "multilib" facility (including libgcc subdirs). |
f1ad3130 | 2420 | -rm -f multilib.h tmpmultilib* |
d73a48cc | 2421 | -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \ |
2422 | rm -rf $(MULTILIB_DIRNAMES); \ | |
2423 | else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \ | |
2424 | rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \ | |
2425 | fi ; fi | |
119f80e4 | 2426 | -rm -fr stage1 stage2 stage3 stage4 |
32e6d418 | 2427 | |
79f818d0 | 2428 | # Delete all files that users would normally create |
2429 | # while building and installing GCC. | |
be2828ce | 2430 | INTL_DISTCLEAN = intl.distclean |
2431 | distclean: clean $(INTL_DISTCLEAN) lang.distclean | |
7953c610 | 2432 | -rm -f tm.h tm_p.h config.h auto-host.h auto-build.h tconfig.h hconfig.h |
764fc592 | 2433 | -rm -f md cstamp-h |
1f42ecdc | 2434 | -rm -f config.status config.run config.cache config.bak |
160b6fa9 | 2435 | -rm -f Make-lang Make-hooks Make-host Make-target |
c3cc26e1 | 2436 | -rm -f Makefile specs.h options.h gencheck.h *.oaux |
58febf9e | 2437 | -rm -f gthr-default.h |
c4ed51d6 | 2438 | -rm -f */stage1 */stage2 */stage3 */stage4 */include |
08d7a103 | 2439 | -rm -f c-parse.output |
b541ad9d | 2440 | -rm -f *.asm |
ae115421 | 2441 | -rm -f float.h |
45e01ea1 | 2442 | -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak |
2443 | -rm -f testsuite/{gcc,g++}.{log,sum} | |
be2828ce | 2444 | -rm -f intl/libintl.h libintl.h |
c6396a0b | 2445 | |
2446 | # Delete anything likely to be found in the source directory | |
2447 | # that shouldn't be in the distribution. | |
73027c94 | 2448 | extraclean: distclean lang.extraclean |
bbbdbddd | 2449 | -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~* |
131b361e | 2450 | -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej |
08d7a103 | 2451 | -rm -f config/*/=* config/*/"#"* config/*/*~* |
2452 | -rm -f config/*/*.orig config/*/*.rej | |
300d5cb3 | 2453 | -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz |
13da1009 | 2454 | -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs |
08d7a103 | 2455 | -rm -f *lose config/*lose config/*/*lose |
997d68fe | 2456 | -rm -f *.s *.s[0-9] *.i config/ChangeLog |
be2828ce | 2457 | -rm -f y.tab.c yacc.* |
73027c94 | 2458 | -rm -f */=* */"#"* */*~* |
2459 | -rm -f */patch* */*.orig */*.rej | |
2460 | -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz | |
2461 | -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs | |
2462 | -rm -f */*lose */*.s */*.s[0-9] */*.i | |
32e6d418 | 2463 | |
1f42ecdc | 2464 | # Get rid of every file that's generated from some other file, except for `configure'. |
32e6d418 | 2465 | # Most of these files ARE PRESENT in the GCC distribution. |
c50e5930 | 2466 | # We define INTL_DISTCLEAN, INTL_CLEAN & INTL_MOSTLYCLEAN to be empty in the |
2467 | # submake, so that we don't descend into intl after its makefile has been | |
2468 | # removed. | |
1f42ecdc | 2469 | maintainer-clean: |
2470 | @echo 'This command is intended for maintainers to use; it' | |
2471 | @echo 'deletes files that may need special tools to rebuild.' | |
c50e5930 | 2472 | $(MAKE) INTL_DISTCLEAN= INTL_CLEAN= INTL_MOSTLYCLEAN= \ |
2473 | intl.maintainer-clean lang.maintainer-clean distclean | |
8757933b | 2474 | -rm -f c-parse.y c-gperf.h |
32e6d418 | 2475 | -rm -f c-parse.c c-parse.h c-parse.output |
c6221df9 | 2476 | -rm -f cexp.c cexp.output TAGS |
c6396a0b | 2477 | -rm -f cpp.info* cpp.??s cpp.*aux |
2478 | -rm -f gcc.info* gcc.??s gcc.*aux | |
2e9d8ccf | 2479 | #\f |
32e6d418 | 2480 | # Entry points `install' and `uninstall'. |
c6396a0b | 2481 | # Also use `install-collect2' to install collect2 when the config files don't. |
32e6d418 | 2482 | |
3f69fed5 | 2483 | # The semicolon is to prevent the install.sh -> install default rule |
876dc5b0 | 2484 | # from doing anything. Having it run true helps avoid problems and |
2485 | # noise from versions of make which don't like to have null commands. | |
c2a18965 | 2486 | install: $(INSTALL_TARGET) ; @true |
32e6d418 | 2487 | |
2cfd79fe | 2488 | # Copy the compiler files into directories where they will be run. |
62268150 | 2489 | # Install the driver last so that the window when things are |
2490 | # broken is small. | |
2289acd7 | 2491 | install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \ |
3e2f90b9 | 2492 | $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \ |
2493 | install-driver | |
32e6d418 | 2494 | |
e77fd588 | 2495 | # Do nothing while making gcc with a cross-compiler. The person who |
2496 | # makes gcc for the target machine has to know how to put a complete | |
2497 | # gcc together by hand. | |
2498 | install-build: force | |
2499 | @echo You have to install gcc on your target machine by hand. | |
2500 | ||
32e6d418 | 2501 | # Run this on the target machine |
2502 | # to finish installation of cross compiler. | |
19c49761 | 2503 | # This is not used anymore now that float.h does not depend on enquire. |
32e6d418 | 2504 | install-cross-rest: install-float-h-cross |
2505 | ||
3e2f90b9 | 2506 | # Handle cpp installation. |
28c11b39 | 2507 | install-cpp: xcpp$(exeext) |
2ff5d8bd | 2508 | -if [ -f gcc-cross$(exeext) ] ; then \ |
2509 | rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ | |
2510 | $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ | |
2511 | if [ x$(cpp_install_dir) != x ]; then \ | |
2512 | rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ | |
2513 | $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ | |
2514 | else true; fi; \ | |
2515 | else \ | |
2516 | rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ | |
2517 | $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ | |
2518 | if [ x$(cpp_install_dir) != x ]; then \ | |
2519 | rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ | |
2520 | $(INSTALL_PROGRAM) -m 755 xcpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ | |
2521 | else true; fi; \ | |
2522 | fi | |
3e2f90b9 | 2523 | |
2524 | uninstall-cpp: | |
2ff5d8bd | 2525 | -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) |
2526 | -rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext) | |
3e2f90b9 | 2527 | -if [ x$(cpp_install_dir) != x ]; then \ |
2ff5d8bd | 2528 | rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ |
2529 | rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ | |
3e2f90b9 | 2530 | else true; fi |
2531 | ||
32e6d418 | 2532 | # Install float.h for cross compiler. |
2533 | # Run this on the target machine! | |
19c49761 | 2534 | # This is not used anymore now that float.h does not depend on enquire. |
0d5bce1b | 2535 | install-float-h-cross: installdirs |
9f10de4b | 2536 | # if [ -f enquire ] ; then true; else false; fi |
2537 | # Note: don't use -. We should fail right away if enquire was not made. | |
2538 | ./enquire -f > $(tmpdir)/float.h | |
32e6d418 | 2539 | -rm -f $(libsubdir)/include/float.h |
f32abccb | 2540 | $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h |
2541 | -rm -f $(tmpdir)/float.h | |
32e6d418 | 2542 | chmod a-x $(libsubdir)/include/float.h |
2543 | ||
0d5bce1b | 2544 | # Create the installation directories. |
2545 | installdirs: | |
2546 | -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi | |
2547 | -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi | |
47db7968 | 2548 | -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi |
2549 | -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi | |
444c3fb0 | 2550 | # This dir isn't currently searched by cpp. |
47db7968 | 2551 | # -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi |
c6367e90 | 2552 | -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \ |
2553 | fdir=$${fdir}/$${dir}; \ | |
2554 | if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \ | |
2555 | done | |
47db7968 | 2556 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi |
2557 | -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi | |
40cb25f2 | 2558 | -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi |
47db7968 | 2559 | -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi |
2560 | -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi | |
3cf6a465 | 2561 | # We don't use mkdir -p to create the parents of man1dir, |
32e6d418 | 2562 | # because some systems don't support it. |
3cf6a465 | 2563 | # Instead, we use this technique to create the immediate parent of man1dir. |
2564 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ | |
47db7968 | 2565 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi |
3cf6a465 | 2566 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi |
32e6d418 | 2567 | |
2568 | # Install the compiler executables built during cross compilation. | |
0d5bce1b | 2569 | install-common: native installdirs $(EXTRA_PARTS) lang.install-common |
32e6d418 | 2570 | for file in $(COMPILERS); do \ |
2571 | if [ -f $$file ] ; then \ | |
2572 | rm -f $(libsubdir)/$$file; \ | |
2573 | $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ | |
2574 | else true; \ | |
2575 | fi; \ | |
2576 | done | |
1a1e7b42 | 2577 | for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \ |
32e6d418 | 2578 | if [ x"$$file" != x.. ]; then \ |
2579 | rm -f $(libsubdir)/$$file; \ | |
2580 | $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ | |
2581 | else true; fi; \ | |
2582 | done | |
1a1e7b42 | 2583 | for file in $(EXTRA_PARTS) ..; do \ |
2584 | if [ x"$$file" != x.. ]; then \ | |
2585 | rm -f $(libsubdir)/$$file; \ | |
2586 | $(INSTALL_DATA) $$file $(libsubdir)/$$file; \ | |
0dbd1c74 | 2587 | chmod a-x $(libsubdir)/$$file; \ |
1a1e7b42 | 2588 | else true; fi; \ |
2589 | done | |
8a4b1e01 | 2590 | # Don't mess with specs if it doesn't exist yet. |
94c53b91 | 2591 | -if [ -f specs ] ; then \ |
2592 | rm -f $(libsubdir)/specs; \ | |
8a4b1e01 | 2593 | $(INSTALL_DATA) specs $(libsubdir)/specs; \ |
0dbd1c74 | 2594 | chmod a-x $(libsubdir)/specs; \ |
8a4b1e01 | 2595 | fi |
62268150 | 2596 | # Install protoize if it was compiled. |
2597 | -if [ -f protoize$(exeext) ]; \ | |
2598 | then \ | |
fc56a674 | 2599 | if [ -f gcc-cross$(exeext) ] ; then \ |
2600 | rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ | |
2601 | $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ | |
2602 | rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ | |
2603 | $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ | |
2604 | else \ | |
2605 | rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ | |
2606 | $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ | |
2607 | rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ | |
2608 | $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ | |
2609 | fi ; \ | |
62268150 | 2610 | rm -f $(libsubdir)/SYSCALLS.c.X; \ |
2611 | $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ | |
2612 | chmod a-x $(libsubdir)/SYSCALLS.c.X; \ | |
2613 | fi | |
2614 | -rm -f $(libsubdir)/cpp$(exeext) | |
2615 | $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext) | |
e2a2be99 | 2616 | # Install gcov if it was compiled. |
2b55270a | 2617 | -if [ -f gcov$(exeext) ]; \ |
2618 | then \ | |
2619 | rm -f $(bindir)/gcov$(exeext); \ | |
5ef852e5 | 2620 | $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ |
2b55270a | 2621 | fi |
86220f45 | 2622 | $(INSTALL_PROGRAM) gccbug $(bindir)/$(GCCBUG_INSTALL_NAME) |
62268150 | 2623 | |
67cb4bc1 | 2624 | # Install the driver program as $(target_alias)-gcc |
40cb25f2 | 2625 | # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc. |
7f6a6499 | 2626 | install-driver: xgcc$(exeext) |
f403cbcb | 2627 | -if [ -f gcc-cross$(exeext) ] ; then \ |
2628 | rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ | |
12d8e722 | 2629 | $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ |
40cb25f2 | 2630 | if [ -d $(gcc_tooldir)/bin/. ] ; then \ |
2631 | rm -f $(gcc_tooldir)/bin/gcc$(exeext); \ | |
2632 | $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \ | |
32e6d418 | 2633 | else true; fi; \ |
2634 | else \ | |
f403cbcb | 2635 | rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ |
2636 | $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ | |
67cb4bc1 | 2637 | rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \ |
ea4a6c81 | 2638 | $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \ |
67cb4bc1 | 2639 | mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(target_alias)-gcc$(exeext); \ |
32e6d418 | 2640 | fi |
32e6d418 | 2641 | |
a2aa0fc1 | 2642 | # Install the info files. |
dff6b323 | 2643 | # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir |
509d95a7 | 2644 | # to do the install. |
0d5bce1b | 2645 | install-info: doc installdirs lang.install-info |
a2aa0fc1 | 2646 | -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* |
17b258fe | 2647 | for f in cpp.info* gcc.info*; do \ |
509d95a7 | 2648 | $(INSTALL_DATA) $$f $(infodir)/$$f; \ |
dff6b323 | 2649 | done |
509d95a7 | 2650 | -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
530e88cf | 2651 | if [ -f $(infodir)/dir ] ; then \ |
89980492 | 2652 | for f in cpp.info gcc.info; do \ |
509d95a7 | 2653 | install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ |
89980492 | 2654 | done; \ |
530e88cf | 2655 | else true; fi; \ |
89980492 | 2656 | else true; fi; |
a2aa0fc1 | 2657 | -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* |
2658 | ||
32e6d418 | 2659 | # Install the man pages. |
0d5bce1b | 2660 | install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man |
0dbd1c74 | 2661 | -if [ -f gcc-cross$(exeext) ] ; then \ |
3cf6a465 | 2662 | rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ |
2663 | $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ | |
2664 | chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(manext); \ | |
b541ad9d | 2665 | else \ |
3cf6a465 | 2666 | rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ |
2667 | $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ | |
2668 | chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \ | |
b541ad9d | 2669 | fi |
3cf6a465 | 2670 | -rm -f $(man1dir)/cccp$(manext) |
2671 | -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext) | |
2672 | -chmod a-x $(man1dir)/cccp$(manext) | |
32e6d418 | 2673 | |
2674 | # Install the library. | |
0d5bce1b | 2675 | install-libgcc: libgcc.a installdirs |
32e6d418 | 2676 | -if [ -f libgcc.a ] ; then \ |
2677 | rm -f $(libsubdir)/libgcc.a; \ | |
2678 | $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \ | |
396c97db | 2679 | if $(RANLIB_TEST_FOR_TARGET) ; then \ |
2680 | (cd $(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \ | |
32e6d418 | 2681 | chmod a-x $(libsubdir)/libgcc.a; \ |
2682 | else true; fi | |
2683 | ||
f1ad3130 | 2684 | # Install multiple versions of libgcc.a. |
0d5bce1b | 2685 | install-multilib: stmp-multilib installdirs |
f1ad3130 | 2686 | for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ |
2687 | dir=`echo $$i | sed -e 's/;.*$$//'`; \ | |
7014838c | 2688 | if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; chmod a+rx $(libsubdir)/$${dir}; fi; \ |
cdc96909 | 2689 | for f in libgcc.a $(EXTRA_MULTILIB_PARTS); do \ |
2690 | rm -f $(libsubdir)/$${dir}/$${f}; \ | |
2691 | $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \ | |
2692 | done; \ | |
396c97db | 2693 | if $(RANLIB_TEST_FOR_TARGET); then \ |
2694 | (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \ | |
2695 | else true; fi; \ | |
f1ad3130 | 2696 | chmod a-x $(libsubdir)/$${dir}/libgcc.a; \ |
2697 | done | |
2698 | ||
2cfd79fe | 2699 | # Install all the header files built in the include subdirectory. |
c8763215 | 2700 | install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H) |
2cfd79fe | 2701 | # Fix symlinks to absolute paths in the installed include directory to |
2702 | # point to the installed directory, not the build directory. | |
ea4a6c81 | 2703 | # Don't need to use LN_S here since we really do need ln -s and no substitutes. |
2cfd79fe | 2704 | -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \ |
2705 | if [ $$? -eq 0 ]; then \ | |
2706 | dir=`cd include; pwd`; \ | |
2707 | for i in $$files; do \ | |
2708 | dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ | |
2709 | if expr "$$dest" : "$$dir.*" > /dev/null; then \ | |
2710 | rm -f $(libsubdir)/include/$$i; \ | |
5822e312 | 2711 | ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \ |
2cfd79fe | 2712 | fi; \ |
2713 | done; \ | |
2714 | fi | |
32e6d418 | 2715 | |
2cfd79fe | 2716 | # Create or recreate the gcc private include file directory. |
0d5bce1b | 2717 | install-include-dir: installdirs |
2cfd79fe | 2718 | -rm -rf $(libsubdir)/include |
2719 | mkdir $(libsubdir)/include | |
2720 | -chmod a+rx $(libsubdir)/include | |
2721 | ||
2722 | # Install the include directory using tar. | |
58113712 | 2723 | install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir |
aa2760ef | 2724 | # We use `pwd`/include instead of just include to problems with CDPATH |
2725 | # Unless a full pathname is provided, some shells would print the new CWD, | |
2726 | # found in CDPATH, corrupting the output. We could just redirect the | |
2727 | # output of `cd', but some shells lose on redirection within `()'s | |
2728 | (cd `pwd`/include ; \ | |
39fd4ce1 | 2729 | tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar xpf - ) |
16db1e2d | 2730 | # /bin/sh on some systems returns the status of the first tar, |
2731 | # and that can lose with GNU tar which always writes a full block. | |
2732 | # So use `exit 0' to ignore its exit status. | |
2cfd79fe | 2733 | |
2734 | # Install the include directory using cpio. | |
58113712 | 2735 | install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir |
aa2760ef | 2736 | # See discussion about the use of `pwd` above |
2737 | cd `pwd`/include ; \ | |
2738 | find . -print | cpio -pdum $(libsubdir)/include | |
32e6d418 | 2739 | |
35df828f | 2740 | # Put assert.h where it won't override GNU libc's assert.h. |
2741 | # It goes in a dir that is searched after GNU libc's headers; | |
2742 | # thus, the following conditionals are no longer needed. | |
2743 | # But it's not worth deleting them now. | |
2744 | ## Don't replace the assert.h already there if it is not from GCC. | |
2745 | ## This code would be simpler if it tested for -f ... && ! grep ... | |
2746 | ## but supposedly the ! operator is missing in sh on some systems. | |
0d5bce1b | 2747 | install-assert-h: assert.h installdirs |
eb5a0caa | 2748 | if [ -f $(assertdir)/assert.h ]; \ |
2749 | then \ | |
95856242 | 2750 | if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \ |
a953974c | 2751 | then \ |
eb5a0caa | 2752 | rm -f $(assertdir)/assert.h; \ |
2753 | $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ | |
04873c54 | 2754 | chmod a-x $(assertdir)/assert.h; \ |
eb5a0caa | 2755 | else true; \ |
2756 | fi; \ | |
2ba284c3 | 2757 | else \ |
db9a0b19 | 2758 | rm -f $(assertdir)/assert.h; \ |
2759 | $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ | |
04873c54 | 2760 | chmod a-x $(assertdir)/assert.h; \ |
2ba284c3 | 2761 | fi |
32e6d418 | 2762 | |
0c787992 | 2763 | # Use this target to install the program `collect2' under the name `collect2'. |
0d5bce1b | 2764 | install-collect2: collect2 installdirs |
0c787992 | 2765 | $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext) |
c6396a0b | 2766 | # Install the driver program as $(libsubdir)/gcc for collect2. |
f403cbcb | 2767 | $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) |
c6396a0b | 2768 | |
32e6d418 | 2769 | # Cancel installation by deleting the installed files. |
3e2f90b9 | 2770 | uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP) |
32e6d418 | 2771 | -rm -rf $(libsubdir) |
f403cbcb | 2772 | -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) |
2773 | -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) | |
5ef852e5 | 2774 | -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) |
2775 | -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext) | |
2776 | -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) | |
2777 | -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext) | |
2778 | -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext) | |
3cf6a465 | 2779 | -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext) |
2780 | -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext) | |
2781 | -rm -rf $(man1dir)/cccp$(manext) | |
2782 | -rm -rf $(man1dir)/protoize$(manext) | |
2783 | -rm -rf $(man1dir)/unprotoize$(manext) | |
9e042f31 | 2784 | -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* |
2e9d8ccf | 2785 | #\f |
c6221df9 | 2786 | # These targets are for the dejagnu testsuites. The file site.exp |
6c08487b | 2787 | # contains global variables that all the testsuites will use. |
2788 | ||
2789 | # Set to $(target_alias)/ for cross. | |
2790 | target_subdir = @target_subdir@ | |
2791 | ||
2792 | site.exp: ./config.status Makefile | |
2793 | @echo "Making a new config file..." | |
2794 | -@rm -f ./tmp? | |
2795 | @touch site.exp | |
2796 | -@mv site.exp site.bak | |
2797 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
2798 | @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 | |
2799 | @echo "# add them to the last section" >> ./tmp0 | |
2800 | @echo "set rootme \"`pwd`\"" >> ./tmp0 | |
2801 | @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0 | |
2802 | @echo "set host_triplet $(host_canonical)" >> ./tmp0 | |
2803 | @echo "set build_triplet $(build_canonical)" >> ./tmp0 | |
2804 | @echo "set target_triplet $(target)" >> ./tmp0 | |
2805 | @echo "set target_alias $(target_alias)" >> ./tmp0 | |
2806 | # CFLAGS is set even though it's empty to show we reserve the right to set it. | |
2807 | @echo "set CFLAGS \"\"" >> ./tmp0 | |
2808 | @echo "set CXXFLAGS \"-I$(objdir)/../$(target_subdir)libio -I\$$srcdir/../libg++/src -I\$$srcdir/../libio -I\$$srcdir/../libstdc++ -I\$$srcdir/../libstdc++/stl -L$(objdir)/../$(target_subdir)libg++ -L$(objdir)/../$(target_subdir)libstdc++\"" >> ./tmp0 | |
2809 | # If newlib has been configured, we need to pass -B to gcc so it can find | |
2810 | # newlib's crt0.o if it exists. This will cause a "path prefix not used" | |
2811 | # message if it doesn't, but the testsuite is supposed to ignore the message - | |
2812 | # it's too difficult to tell when to and when not to pass -B (not all targets | |
2813 | # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that | |
2814 | # seems like too selective a test. | |
2815 | # ??? Another way to solve this might be to rely on linker scripts. Then | |
2816 | # theoretically the -B won't be needed. | |
2817 | # We also need to pass -L ../ld so that the linker can find ldscripts. | |
2818 | @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \ | |
2819 | echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \ | |
2820 | echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \ | |
2821 | echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ | |
2822 | echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \ | |
2823 | echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \ | |
2824 | else true; \ | |
2825 | fi | |
2826 | @if [ -d $(objdir)/../ld ] ; then \ | |
2827 | echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \ | |
2828 | else true; \ | |
2829 | fi | |
16ee23c7 | 2830 | echo "set tmpdir $(objdir)/testsuite" >> ./tmp0 |
6c08487b | 2831 | @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0 |
2832 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 | |
2833 | @cat ./tmp0 > site.exp | |
2834 | @cat site.bak | sed \ | |
2835 | -e '1,/^## All variables above are.*##/ d' >> site.exp | |
2836 | -@rm -f ./tmp? | |
2837 | ||
5c872430 | 2838 | CHECK_TARGETS = check-gcc check-g++ check-g77 check-objc |
6c08487b | 2839 | |
2840 | check: $(CHECK_TARGETS) | |
2841 | ||
20ab2c9c | 2842 | testsuite/site.exp: site.exp |
6c08487b | 2843 | if [ -d testsuite ]; then \ |
2844 | true; \ | |
2845 | else \ | |
2846 | mkdir testsuite; \ | |
2847 | fi | |
2848 | rm -rf testsuite/site.exp | |
2849 | cp site.exp testsuite/site.exp | |
20ab2c9c | 2850 | |
2851 | check-g++: testsuite/site.exp | |
2852 | -rootme=`pwd`; export rootme; \ | |
6c08487b | 2853 | srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ |
2854 | cd testsuite; \ | |
2855 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
2856 | if [ -f $${rootme}/../expect/expect ] ; then \ | |
57b96326 | 2857 | TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ |
6c08487b | 2858 | export TCL_LIBRARY ; fi ; \ |
2859 | $(RUNTEST) --tool g++ $(RUNTESTFLAGS) | |
2860 | ||
20ab2c9c | 2861 | check-gcc: testsuite/site.exp |
2862 | -rootme=`pwd`; export rootme; \ | |
6c08487b | 2863 | srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ |
2864 | cd testsuite; \ | |
2865 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
2866 | if [ -f $${rootme}/../expect/expect ] ; then \ | |
57b96326 | 2867 | TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ |
6c08487b | 2868 | export TCL_LIBRARY ; fi ; \ |
2869 | $(RUNTEST) --tool gcc $(RUNTESTFLAGS) | |
2870 | ||
4230ead8 | 2871 | check-g77: testsuite/site.exp |
2872 | -rootme=`pwd`; export rootme; \ | |
2873 | srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ | |
2874 | cd testsuite; \ | |
2875 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
2876 | if [ -f $${rootme}/../expect/expect ] ; then \ | |
57b96326 | 2877 | TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ |
4230ead8 | 2878 | export TCL_LIBRARY ; fi ; \ |
2879 | $(RUNTEST) --tool g77 $(RUNTESTFLAGS) | |
2880 | ||
5c872430 | 2881 | check-objc: testsuite/site.exp |
2882 | -rootme=`pwd`; export rootme; \ | |
2883 | srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \ | |
2884 | cd testsuite; \ | |
2885 | EXPECT=${EXPECT} ; export EXPECT ; \ | |
2886 | if [ -f $${rootme}/../expect/expect ] ; then \ | |
57b96326 | 2887 | TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \ |
5c872430 | 2888 | export TCL_LIBRARY ; fi ; \ |
2889 | $(RUNTEST) --tool objc $(RUNTESTFLAGS) | |
2890 | ||
32e6d418 | 2891 | # These exist for maintenance purposes. |
2892 | ||
2893 | # Update the tags table. | |
2894 | TAGS: force | |
2895 | cd $(srcdir); \ | |
997d68fe | 2896 | mkdir tmp-tags; \ |
2897 | mv -f c-parse.[ch] cexp.c =*.[chy] tmp-tags; \ | |
32e6d418 | 2898 | etags *.y *.h *.c; \ |
997d68fe | 2899 | mv tmp-tags/* .; \ |
2900 | rmdir tmp-tags | |
32e6d418 | 2901 | |
997d68fe | 2902 | # Create the distribution tar.gz file. |
2903 | dist: tmp-gcc.xtar | |
2904 | gzip --best < tmp-gcc.xtar > tmp-gcc.xtar.gz | |
2905 | mv tmp-gcc.xtar.gz gcc-$(version).tar.gz | |
32e6d418 | 2906 | |
997d68fe | 2907 | tmp-gcc.xtar: distdir |
6c76e6ec | 2908 | # Make the distribution. |
997d68fe | 2909 | tar -chf tmp-gcc.xtar gcc-$(version) |
2910 | ||
2911 | distdir-cvs: force | |
a4867808 | 2912 | if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi |
6c76e6ec | 2913 | |
73027c94 | 2914 | # This target exists to do the initial work before the language specific |
2915 | # stuff gets done. | |
0f557c81 | 2916 | distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \ |
997d68fe | 2917 | $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in \ |
823f5e65 | 2918 | $(srcdir)/version.c TAGS |
be2828ce | 2919 | @case '$(USE_NLS)' in \ |
2920 | yes) ;; \ | |
2921 | *) echo "configure with --enable-nls before making a distribution"; \ | |
2922 | exit 1;; \ | |
2923 | esac | |
2deaa28d | 2924 | @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \ |
630c76ba | 2925 | then true; \ |
0dce1b01 | 2926 | else echo "You must update the version number in \`gcc.texi'"; sleep 10;\ |
630c76ba | 2927 | fi |
131b361e | 2928 | # Update the version number in README |
be2828ce | 2929 | $(AWK) '$$1 " " $$2 " " $$3 == "This directory contains" \ |
131b361e | 2930 | { $$6 = version; print $$0 } \ |
2931 | $$1 " " $$2 " " $$3 != "This directory contains"' \ | |
a4867808 | 2932 | version=$(version) $(srcdir)/README > tmp.README |
131b361e | 2933 | mv tmp.README README |
c6221df9 | 2934 | -rm -rf gcc-$(version) tmp |
32e6d418 | 2935 | # Put all the files in a temporary subdirectory |
2936 | # which has the name that we want to have in the tar file. | |
c6396a0b | 2937 | mkdir tmp |
2938 | mkdir tmp/config | |
3bc8e4d6 | 2939 | mkdir tmp/ginclude |
a4867808 | 2940 | mkdir tmp/objc |
be2828ce | 2941 | mkdir tmp/intl |
2942 | mkdir tmp/po | |
a4867808 | 2943 | for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \ |
2944 | test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \ | |
c6396a0b | 2945 | done |
a4867808 | 2946 | if test "$(srcdir)" != "." ; then \ |
2947 | for file in c-parse.c cexp.c ; do \ | |
2948 | test -f ./$$file && $(LN_S) ../$$file tmp; \ | |
2949 | done; \ | |
2950 | fi | |
2951 | for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \ | |
2952 | if test -d $(srcdir)/config/$$file \ | |
2953 | && test "$$file" != RCS && test "$$file" != CVS; then \ | |
2954 | mkdir tmp/config/$$file; \ | |
2955 | for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \ | |
2956 | $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \ | |
8a32ef6f | 2957 | done; \ |
8a32ef6f | 2958 | else \ |
a4867808 | 2959 | $(LN_S) $(srcdir)/config/$$file tmp/config; \ |
8a32ef6f | 2960 | fi; \ |
32e6d418 | 2961 | done |
a4867808 | 2962 | for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \ |
2963 | $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \ | |
3bc8e4d6 | 2964 | done |
a4867808 | 2965 | for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \ |
2966 | $(LN_S) $(srcdir)/objc/$$file tmp/objc; \ | |
4f1fd857 | 2967 | done |
a4867808 | 2968 | $(LN_S) .gdbinit tmp |
73027c94 | 2969 | |
2970 | # Finish making `distdir', after the languages have done their thing. | |
2971 | distdir-finish: | |
c6396a0b | 2972 | mv tmp gcc-$(version) |
3bc8e4d6 | 2973 | # Get rid of everything we don't want in the distribution. We'd want |
2974 | # this to use Makefile.in, but it doesn't have the `lang.foo' targets | |
2975 | # expanded. | |
be2828ce | 2976 | cd gcc-$(version); make extraclean distdir-check VERSION_DEP= |
2977 | ||
2978 | distdir-check: | |
2979 | ($(AWK) '/^[^#]/{print} /^#[A-Za-z]/{print substr($$1, 2)}' | sort) \ | |
2980 | < po/POTFILES.in > tmp.POTFILES | |
2981 | ls [A-Za-z]*.[ch] [a-z]*/[A-Za-z]*.[ch] \ | |
2982 | [a-z]*/[a-z]*/[A-Za-z]*.[ch] | sort > tmp.src | |
2983 | diff tmp.POTFILES tmp.src || { \ | |
2984 | echo "po/POTFILES.in and sources do not match -- please fix"; \ | |
2985 | exit 1; \ | |
2986 | } | |
2987 | rm -f tmp.* | |
32e6d418 | 2988 | |
be2828ce | 2989 | distdir: distdir-cvs distdir-start intl.distdir intl.distdir-fixup \ |
2990 | lang.distdir distdir-finish | |
73027c94 | 2991 | |
c6221df9 | 2992 | # make diff oldversion=M.N |
2deaa28d | 2993 | # creates a diff file between an older distribution and this one. |
2994 | # The -P option assumes this is GNU diff. | |
2995 | diff: | |
6a4a0b58 | 2996 | diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \ |
823f5e65 | 2997 | -x cexp.c -x -x TAGS -x INSTALL \ |
997d68fe | 2998 | -x configure -x config.in \ |
73027c94 | 2999 | -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \ |
3000 | -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \ | |
3001 | $(LANG_DIFF_EXCLUDES) \ | |
997d68fe | 3002 | gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff |
2deaa28d | 3003 | |
fef36666 | 3004 | # A list of files to be destroyed during "lean" builds. |
3005 | VOL_FILES=`echo $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` | |
3006 | ||
58622ee7 | 3007 | bootstrap bootstrap-lean: force |
41f63c60 | 3008 | # Only build the C compiler for stage1, because that is the only one that |
3009 | # we can guarantee will build with the native compiler, and also it is the | |
3010 | # only thing useful for building stage2. | |
e754efc9 | 3011 | $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" |
32e6d418 | 3012 | $(MAKE) stage1 |
fef36666 | 3013 | -if test $@ = bootstrap-lean; then cd stage1 ; rm -f $(VOL_FILES); else true; fi |
c6396a0b | 3014 | # This used to define ALLOCA as empty, but that would lead to bad results |
3015 | # for a subsequent `make install' since that would not have ALLOCA empty. | |
3016 | # To prevent `make install' from compiling alloca.o and then relinking cc1 | |
3017 | # because alloca.o is newer, we permit these recursive makes to compile | |
3018 | # alloca.o. Then cc1 is newer, so it won't have to be relinked. | |
12626b99 | 3019 | $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" |
32e6d418 | 3020 | $(MAKE) stage2 |
fef36666 | 3021 | -if test $@ = bootstrap-lean; then rm -rf stage1; cd stage2 ; rm -f $(VOL_FILES); else true; fi |
12626b99 | 3022 | $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" |
732395de | 3023 | |
e4051ec5 | 3024 | bootstrap2 bootstrap2-lean: force |
12626b99 | 3025 | $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)" |
32e6d418 | 3026 | $(MAKE) stage2 |
fef36666 | 3027 | -if test $@ = bootstrap2-lean; then rm -rf stage1; cd stage2 ; rm -f $(VOL_FILES); else true; fi |
12626b99 | 3028 | $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" |
32e6d418 | 3029 | |
e4051ec5 | 3030 | bootstrap3 bootstrap3-lean: force |
12626b99 | 3031 | $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)" |
32e6d418 | 3032 | |
e4051ec5 | 3033 | bootstrap4 bootstrap4-lean: force |
12626b99 | 3034 | $(MAKE) CC="stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)" |
58622ee7 | 3035 | |
48c6936b | 3036 | # Compare the object files in the current directory with those in the |
3037 | # stage2 directory. | |
3038 | ||
639b13ee | 3039 | # ./ avoids bug in some versions of tail. |
d7fba489 | 3040 | compare compare3 compare4 compare-lean compare3-lean compare4-lean: force |
20becaef | 3041 | -rm -f .bad_compare |
d7fba489 | 3042 | case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
62268150 | 3043 | for file in *$(objext); do \ |
639b13ee | 3044 | tail +16c ./$$file > tmp-foo1; \ |
d7fba489 | 3045 | tail +16c stage$$stage/$$file > tmp-foo2 \ |
20becaef | 3046 | && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ |
48c6936b | 3047 | done |
d7fba489 | 3048 | case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
be2828ce | 3049 | for dir in tmp-foo intl $(SUBDIRS); do \ |
62268150 | 3050 | if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ |
3051 | for file in $$dir/*$(objext); do \ | |
73027c94 | 3052 | tail +16c ./$$file > tmp-foo1; \ |
d7fba489 | 3053 | tail +16c stage$$stage/$$file > tmp-foo2 \ |
20becaef | 3054 | && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ |
9771451c | 3055 | done; \ |
3806ffea | 3056 | else true; fi; \ |
73027c94 | 3057 | done |
48c6936b | 3058 | -rm -f tmp-foo* |
77333ad9 | 3059 | case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
20becaef | 3060 | if [ -f .bad_compare ]; then \ |
3061 | echo "Bootstrap comparison failure!"; \ | |
3062 | cat .bad_compare; \ | |
3063 | exit 1; \ | |
d7fba489 | 3064 | else \ |
3065 | case "$@" in \ | |
3066 | *-lean ) rm -rf stage$$stage ;; \ | |
05bdc491 | 3067 | *) ;; \ |
d7fba489 | 3068 | esac; true; \ |
20becaef | 3069 | fi |
48c6936b | 3070 | |
d7fba489 | 3071 | # Compare the object files in the current directory with those in the |
3072 | # stage2 directory. Use gnu cmp (diffutils v2.4 or later) to avoid | |
3073 | # running tail and the overhead of twice copying each object file. | |
3074 | ||
3075 | gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force | |
732395de | 3076 | -rm -f .bad_compare |
d7fba489 | 3077 | case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
732395de | 3078 | for file in *$(objext); do \ |
d7fba489 | 3079 | (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ |
732395de | 3080 | done |
d7fba489 | 3081 | case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
be2828ce | 3082 | for dir in tmp-foo intl $(SUBDIRS); do \ |
732395de | 3083 | if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \ |
3084 | for file in $$dir/*$(objext); do \ | |
d7fba489 | 3085 | (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \ |
732395de | 3086 | done; \ |
3806ffea | 3087 | else true; fi; \ |
732395de | 3088 | done |
77333ad9 | 3089 | case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \ |
732395de | 3090 | if [ -f .bad_compare ]; then \ |
3091 | echo "Bootstrap comparison failure!"; \ | |
3092 | cat .bad_compare; \ | |
3093 | exit 1; \ | |
d7fba489 | 3094 | else \ |
3095 | case "$@" in \ | |
3096 | *-lean ) rm -rf stage$$stage ;; \ | |
3097 | esac; true; \ | |
732395de | 3098 | fi |
3099 | ||
32e6d418 | 3100 | # Copy the object files from a particular stage into a subdirectory. |
73027c94 | 3101 | stage1-start: |
c6396a0b | 3102 | -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi |
be2828ce | 3103 | -for dir in intl $(SUBDIRS) ; \ |
73027c94 | 3104 | do \ |
21fde8a9 | 3105 | if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \ |
73027c94 | 3106 | done |
32e6d418 | 3107 | -mv $(STAGESTUFF) stage1 |
be2828ce | 3108 | -mv intl/*$(objext) stage1/intl |
b541ad9d | 3109 | # Copy as/ld if they exist to stage dir, so that running xgcc from the stage |
3110 | # dir will work properly. | |
ea4a6c81 | 3111 | -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi |
3112 | -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage1 ; else true ; fi | |
3113 | -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi | |
32e6d418 | 3114 | -rm -f stage1/libgcc.a |
3115 | -cp libgcc.a stage1 | |
396c97db | 3116 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
3117 | $(RANLIB_FOR_TARGET) stage1/libgcc.a; \ | |
3118 | else true; fi | |
3efc89f0 | 3119 | -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ |
3120 | cp stage1/$${f} . ; \ | |
7561ae90 | 3121 | else true; \ |
3efc89f0 | 3122 | fi; done |
73027c94 | 3123 | stage1: force stage1-start lang.stage1 |
32e6d418 | 3124 | |
73027c94 | 3125 | stage2-start: |
c6396a0b | 3126 | -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi |
be2828ce | 3127 | -for dir in intl $(SUBDIRS) ; \ |
73027c94 | 3128 | do \ |
21fde8a9 | 3129 | if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \ |
73027c94 | 3130 | done |
32e6d418 | 3131 | -mv $(STAGESTUFF) stage2 |
be2828ce | 3132 | -mv intl/*$(objext) stage2/intl |
b541ad9d | 3133 | # Copy as/ld if they exist to stage dir, so that running xgcc from the stage |
3134 | # dir will work properly. | |
ea4a6c81 | 3135 | -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi |
3136 | -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage2 ; else true ; fi | |
3137 | -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi | |
32e6d418 | 3138 | -rm -f stage2/libgcc.a |
3139 | -cp libgcc.a stage2 | |
396c97db | 3140 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
3141 | $(RANLIB_FOR_TARGET) stage2/libgcc.a; \ | |
3142 | else true; fi | |
3efc89f0 | 3143 | -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ |
3144 | cp stage2/$${f} . ; \ | |
7561ae90 | 3145 | else true; \ |
3efc89f0 | 3146 | fi; done |
73027c94 | 3147 | stage2: force stage2-start lang.stage2 |
32e6d418 | 3148 | |
73027c94 | 3149 | stage3-start: |
2388f67d | 3150 | -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi |
be2828ce | 3151 | -for dir in intl $(SUBDIRS) ; \ |
73027c94 | 3152 | do \ |
21fde8a9 | 3153 | if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \ |
73027c94 | 3154 | done |
32e6d418 | 3155 | -mv $(STAGESTUFF) stage3 |
be2828ce | 3156 | -mv intl/*$(objext) stage3/intl |
b541ad9d | 3157 | # Copy as/ld if they exist to stage dir, so that running xgcc from the stage |
3158 | # dir will work properly. | |
ea4a6c81 | 3159 | -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi |
3160 | -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage3 ; else true ; fi | |
3161 | -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi | |
32e6d418 | 3162 | -rm -f stage3/libgcc.a |
3163 | -cp libgcc.a stage3 | |
396c97db | 3164 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
3165 | $(RANLIB_FOR_TARGET) stage3/libgcc.a; \ | |
3166 | else true; fi | |
3efc89f0 | 3167 | -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ |
3168 | cp stage3/$${f} . ; \ | |
7561ae90 | 3169 | else true; \ |
3efc89f0 | 3170 | fi; done |
73027c94 | 3171 | stage3: force stage3-start lang.stage3 |
32e6d418 | 3172 | |
73027c94 | 3173 | stage4-start: |
2388f67d | 3174 | -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi |
be2828ce | 3175 | -for dir in intl $(SUBDIRS) ; \ |
73027c94 | 3176 | do \ |
21fde8a9 | 3177 | if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \ |
73027c94 | 3178 | done |
32e6d418 | 3179 | -mv $(STAGESTUFF) stage4 |
be2828ce | 3180 | -mv intl/*$(objext) stage4/intl |
b541ad9d | 3181 | # Copy as/ld if they exist to stage dir, so that running xgcc from the stage |
3182 | # dir will work properly. | |
ea4a6c81 | 3183 | -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi |
3184 | -if [ -f ld$(exeext) ] ; then $(LN_S) ../ld$(exeext) stage4 ; else true ; fi | |
3185 | -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi | |
32e6d418 | 3186 | -rm -f stage4/libgcc.a |
3187 | -cp libgcc.a stage4 | |
396c97db | 3188 | -if $(RANLIB_TEST_FOR_TARGET) ; then \ |
3189 | $(RANLIB_FOR_TARGET) stage4/libgcc.a; \ | |
3190 | else true; fi | |
3efc89f0 | 3191 | -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \ |
3192 | cp stage4/$${f} . ; \ | |
7561ae90 | 3193 | else true; \ |
3efc89f0 | 3194 | fi; done |
73027c94 | 3195 | stage4: force stage4-start lang.stage4 |
32e6d418 | 3196 | |
3197 | # Copy just the executable files from a particular stage into a subdirectory, | |
3198 | # and delete the object files. Use this if you're just verifying a version | |
3199 | # that is pretty sure to work, and you are short of disk space. | |
62268150 | 3200 | risky-stage1: stage1 |
7cc2ce68 | 3201 | -make clean |
32e6d418 | 3202 | |
62268150 | 3203 | risky-stage2: stage2 |
32e6d418 | 3204 | -make clean |
3205 | ||
62268150 | 3206 | risky-stage3: stage3 |
32e6d418 | 3207 | -make clean |
3208 | ||
62268150 | 3209 | risky-stage4: stage4 |
32e6d418 | 3210 | -make clean |
3211 | ||
3212 | #In GNU Make, ignore whether `stage*' exists. | |
a8514488 | 3213 | .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap |
32e6d418 | 3214 | .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 |
3215 | ||
3216 | force: | |
d54b81e0 | 3217 | |
3218 | # --- | |
3219 | # The enquire rules are still useful for building new float-anything.h. | |
3220 | # Special flags for compiling enquire. | |
3221 | # We disable optimization to make floating point more reliable. | |
3222 | ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 | |
3223 | ENQUIRE_LDFLAGS = $(LDFLAGS) | |
3224 | ||
3225 | # Enquire target (This is a variable so that a target can choose not to | |
3226 | # build it.) | |
3227 | ENQUIRE = enquire | |
3228 | ||
3229 | # Test to see whether <float.h> exists in the system header files, | |
3230 | # and is not derived from GCC. | |
3231 | FLOAT_H_TEST = \ | |
3232 | [ -f $(SYSTEM_HEADER_DIR)/float.h ] && \ | |
3233 | if grep 'ifndef _FLOAT_H___' $(SYSTEM_HEADER_DIR)/float.h >/dev/null; \ | |
3234 | then false; \ | |
3235 | else :; fi | |
3236 | # We pretend to not having a usable <float.h>, hence disable the FLOAT_H_TEST | |
3237 | # to ensure, we're emitting a full blown <float.h> ourselves. | |
3238 | FLOAT_H_TEST = false | |
3239 | ||
3240 | # Used to compile enquire with standard cc, but have forgotten why. | |
3241 | # Let's try with GCC. | |
3242 | enquire: enquire.o $(GCC_PARTS) | |
3243 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@ | |
3244 | enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs | |
3245 | if $(FLOAT_H_TEST); then \ | |
3246 | rm -f include/float.h; \ | |
3247 | SYS_FLOAT_H_WRAP=1; \ | |
3248 | else :; \ | |
3249 | SYS_FLOAT_H_WRAP=0; \ | |
3250 | fi; \ | |
3251 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \ | |
3252 | -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \ | |
3253 | -I. -c $(srcdir)/enquire.c | |
3254 | ||
3255 | # Create float.h source for the native machine. | |
3256 | # Make it empty if we can use the system float.h without changes. | |
3257 | float.h-nat: enquire | |
3258 | -./enquire -f > tmp-float.h | |
3259 | grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h | |
3260 | mv tmp-float.h float.h-nat | |
3261 | ||
3262 | # Create a dummy float.h source for a cross-compiler. | |
3263 | # ??? This isn't used anymore. Should we create config/float-unkn.h | |
3264 | # and make that the default float_format in configure? | |
3265 | float.h-cross: | |
3266 | echo "#ifndef __GCC_FLOAT_NOT_NEEDED" > t-float.h-cross | |
3267 | echo "#error float.h values not known for cross-compiler" >> t-float.h-cross | |
3268 | echo "#endif" >> t-float.h-cross | |
3269 | mv t-float.h-cross float.h-cross |