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