Add support for setting model name and other things
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
79337c85 3# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation
eb02fd64 4#
4dfe09da
RP
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
81597186 17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
4dfe09da 18#
f149eb99 19
eb02fd64 20srcdir = .
28f3b094 21
4d714963 22prefix = /usr/local
eb02fd64 23
7fcfdcf7
SC
24exec_prefix = $(prefix)
25bindir = $(exec_prefix)/bin
26libdir = $(exec_prefix)/lib
a54e05f6 27tooldir = $(exec_prefix)/$(target)
7fcfdcf7 28
51489233
ILT
29program_transform_name =
30
4d714963 31datadir = $(prefix)/lib
7fcfdcf7 32mandir = $(prefix)/man
4d714963
RP
33man1dir = $(mandir)/man1
34man2dir = $(mandir)/man2
35man3dir = $(mandir)/man3
36man4dir = $(mandir)/man4
37man5dir = $(mandir)/man5
38man6dir = $(mandir)/man6
39man7dir = $(mandir)/man7
40man8dir = $(mandir)/man8
41man9dir = $(mandir)/man9
7fcfdcf7 42infodir = $(prefix)/info
4d714963
RP
43includedir = $(prefix)/include
44docdir = $(datadir)/doc
04103845 45GDB_NLM_DEPS =
4d714963
RP
46
47SHELL = /bin/sh
48
f35c6160 49INSTALL = $${srcroot}/install.sh -c
4d714963 50INSTALL_PROGRAM = $(INSTALL)
5cc73086 51INSTALL_DATA = $(INSTALL) -m 644
fe560b9f 52INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
3c8735af 53
09985c96 54INSTALL_DOSREL = install-dosrel-fake
a987271c 55
440868a0 56AS = as
ec342d7d 57AR = ar
b5329d84 58AR_FLAGS = rc
e85e07cb 59CC = cc
7b636683 60
66957ce4
ILT
61# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
62# here so that they can be overridden by Makefile fragments.
753d5049
SC
63HOST_CC = $(CC_FOR_BUILD)
64HOST_PREFIX =
65HOST_PREFIX_1 = loser-
66
7b636683
JK
67# We don't specify -g -O because many compilers don't support -g -O,
68# and/or -O is broken in and of itself.
f8a6ad66 69CFLAGS = -g
3585593d
BK
70LIBCFLAGS = $(CFLAGS)
71CFLAGS_FOR_TARGET = $(CFLAGS)
72LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
04103845
DE
73PICFLAG =
74PICFLAG_FOR_TARGET =
7b636683 75
a4e879a1 76# start-sanitize-chill
7d9f0c54
MW
77CHILLFLAGS = $(CFLAGS)
78CHILL_LIB = -lchill
a4e879a1 79# end-sanitize-chill
e85e07cb 80CXX = gcc
7b636683 81
1d5fcc66 82# Use -O2 to stress test the compiler.
864a5888
PB
83CXXFLAGS = -g -O2
84LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
3585593d 85CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
2f64ef77 86LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
7b636683 87
4d714963 88RANLIB = ranlib
51489233 89NM = nm
5cc73086
KR
90# Not plain GZIP, since gzip looks there for extra command-line options.
91GZIPPROG = gzip
eb02fd64 92
40e16078 93# BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
5cc73086
KR
94BISON = `if [ -f $$r/byacc/byacc ] ; \
95 then echo $$r/byacc/byacc ; \
378fd382 96 else echo byacc ; \
06a07944 97 fi`
2645fb0c 98
5cc73086
KR
99LEX = `if [ -f $$r/flex/flex ] ; \
100 then echo $$r/flex/flex ; \
2198e4ba
MT
101 else echo flex ; fi`
102
5cc73086
KR
103M4 = `if [ -f $$r/m4/m4 ] ; \
104 then echo $$r/m4/m4 ; \
65e21701
KR
105 else echo m4 ; fi`
106
5cc73086
KR
107MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
108 then echo $$r/texinfo/makeinfo/makeinfo ; \
77806c3e 109 else echo makeinfo ; fi`
484fa12d 110
9823504d
ILT
111# This just becomes part of the MAKEINFO definition passed down to
112# sub-makes. It lets flags be given on the command line while still
113# using the makeinfo from the object tree.
114MAKEINFOFLAGS =
b772d75e 115
5cc73086
KR
116EXPECT = `if [ -f $$r/expect/expect ] ; \
117 then echo $$r/expect/expect ; \
a54e05f6
KR
118 else echo expect ; fi`
119
120RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
121 then echo $${srcroot}/dejagnu/runtest ; \
6a42d184
DZ
122 else echo runtest ; fi`
123
f980fcfb 124
e85e07cb 125# compilers to use to create programs which must be run in the build
440868a0
ILT
126# environment.
127CC_FOR_BUILD = $(CC)
e85e07cb 128CXX_FOR_BUILD = $(CXX)
440868a0 129
9f73dd6a 130SUBDIRS = "this is set via configure, don't edit this"
6a3958b2
RP
131OTHERS =
132
ca2ce3b3
ILT
133# This is set by the configure script to the list of directories which
134# should be built using the target tools.
ab1cbc67 135TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
ca2ce3b3 136
e66eb658
PB
137# Target libraries are put under this directory:
138TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
139
ca2ce3b3
ILT
140# This is set by the configure script to the arguments passed to configure.
141CONFIG_ARGUMENTS =
142
a0f47eb7 143ALL = all.normal
f35c6160
DZ
144INSTALL_TARGET = install-dirs \
145 $(INSTALL_MODULES) \
146 $(INSTALL_TARGET_MODULES) \
147 $(INSTALL_X11_MODULES) \
753d5049 148 install-gcc \
09985c96 149 $(INSTALL_DOSREL)
753d5049 150
fb660409 151
51489233 152CC_FOR_TARGET = ` \
5cc73086 153 if [ -f $$r/gcc/Makefile ] ; then \
e66eb658
PB
154 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
155 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
753d5049
SC
156 else \
157 echo $$r/gcc/xgcc -B$$r/gcc/; \
158 fi; \
51489233 159 else \
378fd382 160 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
161 echo $(CC); \
162 else \
ea6d5817 163 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
51489233
ILT
164 fi; \
165 fi`
166
a4e879a1 167# start-sanitize-chill
7d9f0c54 168CHILL_FOR_TARGET = ` \
5cc73086 169 if [ -f $$r/gcc/Makefile ] ; then \
04103845 170 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
7d9f0c54
MW
171 else \
172 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
173 echo $(CC); \
174 else \
ea6d5817 175 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
7d9f0c54
MW
176 fi; \
177 fi`
34b3298b 178
a4e879a1 179# end-sanitize-chill
7d9f0c54 180
d1bea4c7 181CXX_FOR_TARGET = ` \
5cc73086 182 if [ -f $$r/gcc/Makefile ] ; then \
e66eb658
PB
183 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
184 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
753d5049
SC
185 else \
186 echo $$r/gcc/xgcc -B$$r/gcc/; \
187 fi; \
fca4f908 188 else \
e85e07cb
ILT
189 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
190 echo $(CXX); \
fca4f908 191 else \
ea6d5817 192 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
fca4f908
MW
193 fi; \
194 fi`
195
440868a0 196AS_FOR_TARGET = ` \
ea6d5817 197 if [ -f $$r/gas/as.new ] ; then \
5cc73086 198 echo $$r/gas/as.new ; \
440868a0 199 else \
e85e07cb 200 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
440868a0
ILT
201 echo $(AS); \
202 else \
ea6d5817 203 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
81246025 204 fi; \
440868a0
ILT
205 fi`
206
054f9ada
JM
207LD_FOR_TARGET = ` \
208 if [ -f $$r/ld/ld.new ] ; then \
209 echo $$r/ld/ld.new ; \
210 else \
211 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
212 echo $(LD); \
213 else \
214 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
215 fi; \
216 fi`
217
a220ba0f
SC
218DLLTOOL_FOR_TARGET = ` \
219 if [ -f $$r/binutils/dlltool ] ; then \
220 echo $$r/binutils/dlltool ; \
221 else \
222 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
223 echo $(DLLTOOL); \
224 else \
225 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
226 fi; \
227 fi`
228
51489233 229AR_FOR_TARGET = ` \
5cc73086
KR
230 if [ -f $$r/binutils/ar ] ; then \
231 echo $$r/binutils/ar ; \
51489233 232 else \
378fd382 233 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
234 echo $(AR); \
235 else \
ea6d5817 236 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
81246025 237 fi; \
51489233
ILT
238 fi`
239
240RANLIB_FOR_TARGET = ` \
5cc73086
KR
241 if [ -f $$r/binutils/ranlib ] ; then \
242 echo $$r/binutils/ranlib ; \
51489233 243 else \
378fd382 244 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
245 echo $(RANLIB); \
246 else \
ea6d5817 247 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
81246025 248 fi; \
51489233
ILT
249 fi`
250
251NM_FOR_TARGET = ` \
ea6d5817 252 if [ -f $$r/binutils/nm.new ] ; then \
753d5049 253 echo $$r/binutils/nm.new ; \
51489233 254 else \
378fd382 255 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
51489233
ILT
256 echo $(NM); \
257 else \
ea6d5817 258 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
81246025 259 fi; \
51489233
ILT
260 fi`
261
eb02fd64 262#### host and target specific makefile fragments come in here.
ec342d7d 263###
eb02fd64 264
0ef4728f
ILT
265# Flags to pass down to all sub-makes.
266# Please keep these in alphabetical order.
267BASE_FLAGS_TO_PASS = \
2198e4ba 268 "AR_FLAGS=$(AR_FLAGS)" \
d09de70e 269 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
0ef4728f 270 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
378fd382 271 "BISON=$(BISON)" \
378fd382 272 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
0ef4728f 273 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba 274 "CFLAGS=$(CFLAGS)" \
3585593d 275 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
a4e879a1 276 $(start-sanitize-chill)\
7d9f0c54
MW
277 "CHILLFLAGS=$(CHILLFLAGS)" \
278 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
279 "CHILL_LIB=$(CHILL_LIB)" \
a4e879a1 280 $(end-sanitize-chill)\
0ef4728f
ILT
281 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
282 "CXXFLAGS=$(CXXFLAGS)" \
3585593d 283 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
0ef4728f 284 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
a220ba0f 285 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
a9a2f22f 286 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
2198e4ba
MT
287 "INSTALL=$(INSTALL)" \
288 "INSTALL_DATA=$(INSTALL_DATA)" \
440868a0 289 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
f35c6160 290 "INSTALL_XFORM=$(INSTALL_XFORM)" \
378fd382
DZ
291 "LDFLAGS=$(LDFLAGS)" \
292 "LEX=$(LEX)" \
054f9ada 293 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
3585593d
BK
294 "LIBCFLAGS=$(LIBCFLAGS)" \
295 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
04103845
DE
296 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
297 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
65e21701 298 "M4=$(M4)" \
9823504d 299 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
0ef4728f 300 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
04103845
DE
301 "PICFLAG=$(PICFLAG)" \
302 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
d09de70e 303 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
49dfa984 304 "SHELL=$(SHELL)" \
a54e05f6 305 "EXPECT=$(EXPECT)" \
6a42d184 306 "RUNTEST=$(RUNTEST)" \
86365152 307 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
5cc73086 308 "YACC=$(BISON)" \
378fd382
DZ
309 "exec_prefix=$(exec_prefix)" \
310 "prefix=$(prefix)" \
311 "tooldir=$(tooldir)"
2198e4ba 312
0ef4728f
ILT
313# Flags to pass down to most sub-makes, in which we're building with
314# the host environment.
6d681784 315# If any variables are added here, they must be added to do-*, below.
0ef4728f 316EXTRA_HOST_FLAGS = \
6d681784
JG
317 'AR=$(AR)' \
318 'AS=$(AS)' \
319 'CC=$(CC)' \
320 'CXX=$(CXX)' \
321 'NM=$(NM)' \
753d5049 322 'RANLIB=$(RANLIB)'
0ef4728f
ILT
323
324FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
325
d1bea4c7
DZ
326# Flags that are concerned with the location of the X11 include files
327# and library files
054f9ada
JM
328#
329# NOTE: until the top-level is getting the values via autoconf, it only
330# causes problems to have this top-level Makefile overriding the autoconf-set
331# values in child directories. Only variables that don't conflict with
332# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
333#
d1bea4c7 334X11_FLAGS_TO_PASS = \
054f9ada
JM
335 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
336 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
d1bea4c7 337
0ef4728f
ILT
338# Flags to pass down to makes which are built with the target environment.
339# The double $ decreases the length of the command line; the variables
340# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
6d681784 341# If any variables are added here, they must be added to do-*, below.
0ef4728f
ILT
342EXTRA_TARGET_FLAGS = \
343 'AR=$$(AR_FOR_TARGET)' \
344 'AS=$$(AS_FOR_TARGET)' \
345 'CC=$$(CC_FOR_TARGET)' \
3585593d 346 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
0ef4728f 347 'CXX=$$(CXX_FOR_TARGET)' \
3585593d 348 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
a220ba0f 349 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
054f9ada 350 'LD=$$(LD_FOR_TARGET)' \
3585593d
BK
351 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
352 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
0ef4728f 353 'NM=$$(NM_FOR_TARGET)' \
04103845 354 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
753d5049 355 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f
ILT
356
357TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
51489233 358
f4e414f1
ILT
359# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
360# unfortunately needs the native compiler and the target ar and
0ef4728f 361# ranlib.
66957ce4
ILT
362# If any variables are added here, they must be added to do-*, below.
363# The HOST_* variables are a special case, which are used for the gcc
364# cross-building scheme.
0ef4728f
ILT
365EXTRA_GCC_FLAGS = \
366 'AR=$$(AR_FOR_TARGET)' \
6d681784
JG
367 'AS=$(AS)' \
368 'CC=$(CC)' \
369 'CXX=$(CXX)' \
a54e05f6
KR
370 'HOST_CC=$(CC_FOR_BUILD)' \
371 'HOST_PREFIX=$(HOST_PREFIX)' \
372 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
6d681784 373 'NM=$(NM)' \
753d5049 374 'RANLIB=$$(RANLIB_FOR_TARGET)'
0ef4728f 375
34b3298b 376GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
f4e414f1 377
6a42d184 378# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
379# using $(FLAGS_TO_PASS).
380ALL_MODULES = \
381 all-autoconf \
382 all-bfd \
383 all-binutils \
384 all-byacc \
385 all-cvs \
386 all-dejagnu \
387 all-diff \
ac259c28 388 all-dosutils \
79337c85
ILT
389 all-etc \
390 all-fileutils \
391 all-find \
392 all-flex \
393 all-gas \
394 all-gawk \
79337c85
ILT
395 all-gprof \
396 all-grep \
397 all-gzip \
398 all-hello \
399 all-indent \
400 all-ispell \
401 all-ld \
402 all-libiberty \
403 all-m4 \
404 all-make \
405 all-mmalloc \
406 all-opcodes \
407 all-patch \
408 all-prms \
409 all-rcs \
410 all-readline \
275049c0 411 all-release \
79337c85
ILT
412 all-recode \
413 all-sed \
414 all-send-pr \
415 all-shellutils \
416 all-sim \
417 all-tar \
418 all-tcl \
419 all-texinfo \
420 all-textutils \
421 all-tgas \
422 all-time \
423 all-uudecode \
753d5049
SC
424 all-wdiff
425
6a42d184
DZ
426# This is a list of the check targets for all of the modules which are
427# compiled using $(FLAGS_TO_PASS).
4f0b8f27
TL
428# This is a list of the check targets for all of the modules which are
429# compiled using $(FLAGS_TO_PASS).
430#
d237841c
BC
431# The list is in two parts. The first lists those tools which
432# are tested as part of the host's native tool-chain, and not
433# tested in a cross configuration.
434NATIVE_CHECK_MODULES = \
435 check-byacc \
4f0b8f27
TL
436 check-flex
437
d237841c 438CROSS_CHECK_MODULES = \
6a42d184
DZ
439 check-autoconf \
440 check-bfd \
441 check-binutils \
6a42d184
DZ
442 check-cvs \
443 check-dejagnu \
444 check-diff \
445 check-etc \
446 check-fileutils \
447 check-find \
6a42d184
DZ
448 check-gas \
449 check-gawk \
6a42d184
DZ
450 check-gprof \
451 check-grep \
452 check-gzip \
453 check-hello \
454 check-indent \
455 check-ispell \
456 check-ld \
457 check-libiberty \
458 check-m4 \
459 check-make \
460 check-mmcheckoc \
461 check-opcodes \
462 check-patch \
463 check-prms \
464 check-rcs \
465 check-readline \
466 check-recode \
467 check-sed \
468 check-send-pr \
469 check-shellutils \
470 check-sim \
471 check-tar \
472 check-tcl \
473 check-texinfo \
474 check-textutils \
475 check-tgas \
476 check-time \
477 check-uudecode \
478 check-wdiff
d237841c
BC
479
480CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
6a42d184
DZ
481
482# This is a list of the install targets for all of the modules which are
79337c85
ILT
483# compiled using $(FLAGS_TO_PASS).
484INSTALL_MODULES = \
485 install-autoconf \
486 install-bfd \
487 install-binutils \
488 install-byacc \
489 install-cvs \
490 install-dejagnu \
491 install-diff \
753d5049 492 install-dosutils \
79337c85
ILT
493 install-etc \
494 install-fileutils \
495 install-find \
496 install-flex \
497 install-gas \
498 install-gawk \
79337c85
ILT
499 install-gprof \
500 install-grep \
501 install-gzip \
502 install-hello \
503 install-indent \
504 install-ispell \
505 install-ld \
506 install-libiberty \
507 install-m4 \
508 install-make \
509 install-mmalloc \
510 install-opcodes \
511 install-patch \
512 install-prms \
513 install-rcs \
514 install-readline \
515 install-recode \
516 install-sed \
517 install-send-pr \
518 install-shellutils \
519 install-sim \
520 install-tar \
521 install-tcl \
522 install-texinfo \
523 install-textutils \
524 install-tgas \
525 install-time \
526 install-uudecode \
527 install-wdiff
528
6a42d184 529# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
530# using $(X11_FLAGS_TO_PASS).
531ALL_X11_MODULES = \
532 all-emacs \
4d802af9 533 all-emacs19 \
04103845 534 all-gdb \
79337c85 535 all-expect \
65e21701 536 all-gash \
79337c85
ILT
537 all-tclX \
538 all-tk
539
6a42d184
DZ
540# This is a list of the check targets for all of the modules which are
541# compiled using $(X11_FLAGS_TO_PASS).
542CHECK_X11_MODULES = \
543 check-emacs \
04103845 544 check-gdb \
6a42d184 545 check-expect \
65e21701 546 check-gash \
6a42d184
DZ
547 check-tclX \
548 check-tk
549
79337c85
ILT
550# This is a list of the install targets for all the modules which are
551# compiled using $(X11_FLAGS_TO_PASS).
552INSTALL_X11_MODULES = \
553 install-emacs \
4d802af9 554 install-emacs19 \
04103845 555 install-gdb \
79337c85 556 install-expect \
65e21701 557 install-gash \
79337c85
ILT
558 install-tclX \
559 install-tk
fca4f908 560
6a42d184 561# This is a list of the targets for all of the modules which are compiled
79337c85
ILT
562# using $(TARGET_FLAGS_TO_PASS).
563ALL_TARGET_MODULES = \
ab1cbc67
PB
564 all-target-libio \
565 all-target-libstdc++ \
566 all-target-librx \
567 all-target-libg++ \
568 all-target-newlib \
569 all-target-winsup \
570 all-target-libgloss \
571 all-target-libiberty
79337c85 572
ca2ce3b3
ILT
573# This is a list of the configure targets for all of the modules which
574# are compiled using the target tools.
575CONFIGURE_TARGET_MODULES = \
ab1cbc67
PB
576 configure-target-libio \
577 configure-target-libstdc++ \
578 configure-target-librx \
579 configure-target-libg++ \
580 configure-target-newlib \
581 configure-target-winsup \
582 configure-target-libgloss \
583 configure-target-libiberty
ca2ce3b3 584
6a42d184
DZ
585# This is a list of the check targets for all of the modules which are
586# compiled using $(TARGET_FLAGS_TO_PASS).
587CHECK_TARGET_MODULES = \
ab1cbc67
PB
588 check-target-libio \
589 check-target-libstdc++ \
590 check-target-libg++ \
591 check-target-newlib \
592 check-target-winsup \
593 check-target-libiberty
6a42d184
DZ
594
595# This is a list of the install targets for all of the modules which are
79337c85
ILT
596# compiled using $(TARGET_FLAGS_TO_PASS).
597INSTALL_TARGET_MODULES = \
ab1cbc67
PB
598 install-target-libio \
599 install-target-libstdc++ \
600 install-target-libg++ \
601 install-target-newlib \
602 install-target-winsup \
603 install-target-libgloss \
604 install-target-libiberty
7481617f 605
79337c85 606# The first rule in the file had better be this one. Don't put any above it.
a59b94d2 607all: all.normal
79337c85
ILT
608.PHONY: all
609
610# The target built for a native build.
611.PHONY: all.normal
612all.normal: \
613 $(ALL_MODULES) \
614 $(ALL_TARGET_MODULES) \
46d0ca81 615 $(ALL_X11_MODULES) \
79337c85
ILT
616 all-gcc
617
0ef4728f 618# Do a target for all the subdirectories. A ``make do-X'' will do a
53222cbd
RP
619# ``make X'' in all subdirectories (because, in general, there is a
620# dependency (below) of X upon do-X, a ``make X'' will also do this,
621# but it may do additional work as well).
0ef4728f
ILT
622# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
623# because it is so large that it can easily overflow the command line
624# length limit on some systems.
79337c85 625DO_X = \
79337c85
ILT
626 do-clean \
627 do-distclean \
628 do-dvi \
629 do-info \
630 do-install-info \
631 do-installcheck \
632 do-mostlyclean \
ca2ce3b3 633 do-maintainer-clean \
753d5049 634 do-TAGS
79337c85
ILT
635.PHONY: $(DO_X)
636$(DO_X):
0ef4728f 637 @target=`echo $@ | sed -e 's/^do-//'`; \
5cc73086 638 r=`pwd`; export r; \
0ef4728f 639 srcroot=`cd $(srcdir); pwd`; export srcroot; \
ab1cbc67 640 for i in $(SUBDIRS) -dummy-; do \
36286a3e 641 if [ -f ./$$i/Makefile ]; then \
0ef4728f 642 case $$i in \
0ef4728f 643 gcc) \
6d681784
JG
644 for flag in $(EXTRA_GCC_FLAGS); do \
645 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
646 done; \
0ef4728f
ILT
647 ;; \
648 *) \
6d681784
JG
649 for flag in $(EXTRA_HOST_FLAGS); do \
650 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
651 done; \
0ef4728f
ILT
652 ;; \
653 esac ; \
753d5049 654 export AR AS CC CXX NM RANLIB; \
0ef4728f 655 if (cd ./$$i; \
6d681784
JG
656 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
657 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
753d5049 658 "RANLIB=$${RANLIB}" \
6d681784 659 $${target}); \
0ef4728f
ILT
660 then true; else exit 1; fi; \
661 else true; fi; \
ec7a8792
ILT
662 done
663 @target=`echo $@ | sed -e 's/^do-//'`; \
664 r=`pwd`; export r; \
665 srcroot=`cd $(srcdir); pwd`; export srcroot; \
ab1cbc67
PB
666 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
667 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
668 for flag in $(EXTRA_TARGET_FLAGS); do \
669 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
670 done; \
671 export AR AS CC CXX NM RANLIB; \
672 if (cd $(TARGET_SUBDIR)/$$i; \
673 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
674 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
675 "RANLIB=$${RANLIB}" \
676 $${target}); \
677 then true; else exit 1; fi; \
678 else true; fi; \
0ef4728f 679 done
fb90daeb 680
79337c85
ILT
681# Here are the targets which correspond to the do-X targets.
682
65088029 683.PHONY: info installcheck dvi install-info
ca2ce3b3
ILT
684.PHONY: clean distclean mostlyclean maintainer-clean realclean
685.PHONY: local-clean local-distclean local-maintainer-clean
0ef4728f 686info: do-info
1a14993c 687installcheck: do-installcheck
0ef4728f 688dvi: do-dvi
9a9e8e7f 689
f35c6160
DZ
690install-info: do-install-info dir.info
691 srcroot=`cd $(srcdir); pwd`; export srcroot; \
72c09fbc
SC
692 if [ -f dir.info ] ; then \
693 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
50fbe976 694 else true ; fi
4d714963 695
0ef4728f 696local-clean:
7fed4078 697 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
3b30df82 698
0ef4728f 699local-distclean:
7fed4078 700 -rm -f Makefile config.status
7fcfdcf7 701
ca2ce3b3
ILT
702local-maintainer-clean:
703 @echo "This command is intended for maintainers to use;"
704 @echo "it deletes files that may require special tools to rebuild."
705
0ef4728f
ILT
706clean: do-clean local-clean
707mostlyclean: do-mostlyclean local-clean
708distclean: do-distclean local-clean local-distclean
ca2ce3b3
ILT
709maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
710maintainer-clean: local-distclean
711realclean: maintainer-clean
0ef4728f 712
65088029
ILT
713# Check target.
714
715.PHONY: check
716check: $(CHECK_MODULES) \
717 $(CHECK_TARGET_MODULES) \
718 $(CHECK_X11_MODULES) \
719 check-gcc
720
79337c85 721# Installation targets.
4d714963 722
04103845 723.PHONY: install uninstall source-vault binary-vault vault-install
98a33b6d 724install: $(INSTALL_TARGET)
b26ff9d8 725
79337c85
ILT
726uninstall:
727 @echo "the uninstall target is not supported in this tree"
728
04103845
DE
729source-vault:
730 $(MAKE) -f ./release/Build-A-Release \
731 host=$(host_alias) source-vault
732
733binary-vault:
734 $(MAKE) -f ./release/Build-A-Release \
735 host=$(host_alias) target=$(target_alias)
736
275049c0
JK
737vault-install:
738 @if [ -f ./release/vault-install ] ; then \
739 ./release/vault-install $(host_alias) $(target_alias) ; \
96bfa612
KR
740 else \
741 true ; \
275049c0
JK
742 fi
743
79337c85 744.PHONY: install.all
06a07944
RP
745install.all: install-no-fixedincludes
746 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 747 r=`pwd` ; export r ; \
06a07944
RP
748 (cd ./gcc; \
749 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
750 else \
751 true ; \
752 fi
5a63b336 753
96bfa612 754# install-no-fixedincludes is used because Cygnus can not distribute
79337c85
ILT
755# the fixed header files.
756.PHONY: install-no-fixedincludes
757install-no-fixedincludes: \
758 install-dirs \
79337c85
ILT
759 $(INSTALL_MODULES) \
760 $(INSTALL_TARGET_MODULES) \
96bfa612 761 $(INSTALL_X11_MODULES) \
f35c6160 762 gcc-no-fixedincludes
d1bea4c7 763
5cc24596 764# Install the gcc headers files, but not the fixed include files,
79337c85
ILT
765# which Cygnus is not allowed to distribute. This rule is very
766# dependent on the workings of the gcc Makefile.in.
767.PHONY: gcc-no-fixedincludes
06a07944 768gcc-no-fixedincludes:
5cc24596
PB
769 @if [ -f ./gcc/Makefile ]; then \
770 rm -rf gcc/tmp-include; \
771 mv gcc/include gcc/tmp-include 2>/dev/null; \
772 mkdir gcc/include; \
7f9cb3b2 773 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
753d5049 774 touch gcc/stmp-fixinc gcc/include/fixed; \
a54e05f6 775 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
5cc73086 776 r=`pwd`; export r; \
5cc24596
PB
777 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
778 (cd ./gcc; \
779 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
780 rm -rf gcc/include; \
781 mv gcc/tmp-include gcc/include 2>/dev/null; \
782 else true; fi
dcbfc14d 783
79337c85
ILT
784# This rule is used to build the modules which use FLAGS_TO_PASS. To
785# build a target all-X means to cd to X and make all.
3de70f1d 786#
055cca84 787# all-gui, and all-libproc are handled specially because
4d802af9
MT
788# they are still experimental, and if they fail to build, that
789# shouldn't stop "make all".
04103845
DE
790.PHONY: $(ALL_MODULES) all-gui all-libproc
791$(ALL_MODULES) all-gui all-libproc:
79337c85 792 @dir=`echo $@ | sed -e 's/all-//'`; \
472af17f
ILT
793 if [ -f ./$${dir}/Makefile ] ; then \
794 r=`pwd`; export r; \
795 srcroot=`cd $(srcdir); pwd`; export srcroot; \
796 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
07362bd9 797 else \
79337c85 798 true; \
07362bd9
DZ
799 fi
800
80cbf870
ILT
801# These rules are used to check the modules which use FLAGS_TO_PASS.
802# To build a target check-X means to cd to X and make check. Some
803# modules are only tested in a native toolchain.
4f0b8f27 804
d237841c
BC
805.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
806$(NATIVE_CHECK_MODULES):
39cc6dae
RS
807 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
808 dir=`echo $@ | sed -e 's/check-//'`; \
472af17f
ILT
809 if [ -f ./$${dir}/Makefile ] ; then \
810 r=`pwd`; export r; \
811 srcroot=`cd $(srcdir); pwd`; export srcroot; \
812 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
813 else \
814 true; \
4f0b8f27
TL
815 fi; \
816 fi
817
818$(CROSS_CHECK_MODULES):
6a42d184
DZ
819 @dir=`echo $@ | sed -e 's/check-//'`; \
820 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 821 r=`pwd`; export r; \
6a42d184
DZ
822 srcroot=`cd $(srcdir); pwd`; export srcroot; \
823 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
824 else \
825 true; \
826 fi
827
79337c85
ILT
828# This rule is used to install the modules which use FLAGS_TO_PASS.
829# To build a target install-X means to cd to X and make install.
830.PHONY: $(INSTALL_MODULES)
831$(INSTALL_MODULES): install-dirs
832 @dir=`echo $@ | sed -e 's/install-//'`; \
833 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 834 r=`pwd`; export r; \
79337c85 835 srcroot=`cd $(srcdir); pwd`; export srcroot; \
f35c6160 836 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
07362bd9 837 else \
79337c85 838 true; \
07362bd9
DZ
839 fi
840
ca2ce3b3
ILT
841# This rule is used to configure the modules which are built with the
842# target tools.
843.PHONY: $(CONFIGURE_TARGET_MODULES)
844$(CONFIGURE_TARGET_MODULES):
ab1cbc67
PB
845 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
846 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
ca2ce3b3
ILT
847 true; \
848 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
efd7b806 849 if [ -d $(srcdir)/$${dir} ]; then \
ab1cbc67 850 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
efd7b806
SC
851 r=`pwd`; export r; \
852 srcroot=`cd $(srcdir); pwd`; export srcroot; \
853 AR="$(AR_FOR_TARGET)"; export AR; \
854 AS="$(AS_FOR_TARGET)"; export AS; \
855 CC="$(CC_FOR_TARGET)"; export CC; \
856 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
857 CXX="$(CXX_FOR_TARGET)"; export CXX; \
858 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
054f9ada 859 LD="$(LD_FOR_TARGET)"; export LD; \
efd7b806
SC
860 NM="$(NM_FOR_TARGET)"; export NM; \
861 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
ab1cbc67 862 cd $(TARGET_SUBDIR)/$${dir}; \
efd7b806
SC
863 $${srcroot}/configure $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \
864 else \
865 true; \
866 fi \
ca2ce3b3
ILT
867 else \
868 true; \
869 fi
870
6a42d184
DZ
871# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
872# To build a target all-X means to cd to X and make all.
79337c85
ILT
873.PHONY: $(ALL_TARGET_MODULES)
874$(ALL_TARGET_MODULES):
ab1cbc67
PB
875 @dir=`echo $@ | sed -e 's/all-target-//'`; \
876 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 877 r=`pwd`; export r; \
79337c85 878 srcroot=`cd $(srcdir); pwd`; export srcroot; \
ab1cbc67 879 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
07362bd9 880 else \
79337c85 881 true; \
07362bd9
DZ
882 fi
883
6a42d184
DZ
884# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
885# To build a target install-X means to cd to X and make install.
886.PHONY: $(CHECK_TARGET_MODULES)
887$(CHECK_TARGET_MODULES):
136ca05d 888 @dir=`echo $@ | sed -e 's/check-target-//'`; \
ab1cbc67 889 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 890 r=`pwd`; export r; \
6a42d184 891 srcroot=`cd $(srcdir); pwd`; export srcroot; \
ab1cbc67 892 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
6a42d184
DZ
893 else \
894 true; \
895 fi
896
79337c85
ILT
897# This rule is used to install the modules which use
898# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
899# and make install.
900.PHONY: $(INSTALL_TARGET_MODULES)
901$(INSTALL_TARGET_MODULES): install-dirs
ab1cbc67
PB
902 @dir=`echo $@ | sed -e 's/install-target-//'`; \
903 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
5cc73086 904 r=`pwd`; export r; \
79337c85 905 srcroot=`cd $(srcdir); pwd`; export srcroot; \
ab1cbc67
PB
906 (cd $(TARGET_SUBDIR)/$${dir}; \
907 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
07362bd9 908 else \
79337c85 909 true; \
07362bd9
DZ
910 fi
911
6a42d184 912# This rule is used to build the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
913# To build a target all-X means to cd to X and make all.
914.PHONY: $(ALL_X11_MODULES)
915$(ALL_X11_MODULES):
916 @dir=`echo $@ | sed -e 's/all-//'`; \
917 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 918 r=`pwd`; export r; \
79337c85
ILT
919 srcroot=`cd $(srcdir); pwd`; export srcroot; \
920 (cd $${dir}; \
921 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
07362bd9 922 else \
79337c85 923 true; \
07362bd9
DZ
924 fi
925
6a42d184
DZ
926# This rule is used to check the modules which use X11_FLAGS_TO_PASS.
927# To build a target check-X means to cd to X and make all.
928.PHONY: $(CHECK_X11_MODULES)
929$(CHECK_X11_MODULES):
930 @dir=`echo $@ | sed -e 's/check-//'`; \
931 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 932 r=`pwd`; export r; \
6a42d184
DZ
933 srcroot=`cd $(srcdir); pwd`; export srcroot; \
934 (cd $${dir}; \
935 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
936 else \
937 true; \
938 fi
939
940# This rule is used to install the modules which use X11_FLAGS_TO_PASS.
79337c85
ILT
941# To build a target install-X means to cd to X and make install.
942.PHONY: $(INSTALL_X11_MODULES)
943$(INSTALL_X11_MODULES):
6a42d184 944 @dir=`echo $@ | sed -e 's/install-//'`; \
79337c85 945 if [ -f ./$${dir}/Makefile ] ; then \
5cc73086 946 r=`pwd`; export r; \
79337c85
ILT
947 srcroot=`cd $(srcdir); pwd`; export srcroot; \
948 (cd $${dir}; \
949 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
07362bd9 950 else \
79337c85 951 true; \
07362bd9
DZ
952 fi
953
79337c85
ILT
954# gcc is the only module which uses GCC_FLAGS_TO_PASS.
955.PHONY: all-gcc
956all-gcc:
957 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 958 r=`pwd`; export r; \
79337c85
ILT
959 srcroot=`cd $(srcdir); pwd`; export srcroot; \
960 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
07362bd9 961 else \
79337c85 962 true; \
07362bd9
DZ
963 fi
964
65088029
ILT
965.PHONY: check-gcc
966check-gcc:
967 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 968 r=`pwd`; export r; \
65088029
ILT
969 srcroot=`cd $(srcdir); pwd`; export srcroot; \
970 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
971 else \
972 true; \
973 fi
974
79337c85
ILT
975.PHONY: install-gcc
976install-gcc:
977 @if [ -f ./gcc/Makefile ] ; then \
5cc73086 978 r=`pwd`; export r; \
79337c85
ILT
979 srcroot=`cd $(srcdir); pwd`; export srcroot; \
980 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
07362bd9 981 else \
79337c85 982 true; \
07362bd9
DZ
983 fi
984
753d5049
SC
985
986# EXPERIMENTAL STUFF
987# This rule is used to install the modules which use FLAGS_TO_PASS.
988# To build a target install-X means to cd to X and make install.
09985c96
SC
989.PHONY: install-dosrel
990install-dosrel: install-dirs info
753d5049
SC
991 @dir=`echo $@ | sed -e 's/install-//'`; \
992 if [ -f ./$${dir}/Makefile ] ; then \
993 r=`pwd`; export r; \
994 srcroot=`cd $(srcdir); pwd`; export srcroot; \
995 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
996 else \
997 true; \
998 fi
999
09985c96 1000install-dosrel-fake:
a987271c 1001
753d5049 1002
79337c85 1003# This is a list of inter-dependencies among modules.
65e21701 1004all-autoconf: all-m4
79337c85 1005all-bfd:
dfe44004 1006all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
79337c85 1007all-byacc:
79337c85 1008all-cvs:
4d802af9 1009all-dejagnu: all-tcl all-expect all-tk
79337c85
ILT
1010all-diff: all-libiberty
1011all-emacs:
1d5fcc66 1012all-emacs19: all-byacc
79337c85 1013all-etc:
c6ba9ae0 1014all-expect: all-tcl all-tk
275049c0 1015all-fileutils: all-libiberty
79337c85 1016all-find:
7dcc0664 1017all-flex: all-libiberty all-byacc
79337c85 1018all-gas: all-libiberty all-opcodes all-bfd
65e21701 1019all-gash: all-tcl
79337c85 1020all-gawk:
fc3524a9
DE
1021ALL_GCC = all-gcc
1022all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld
04103845 1023all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
79337c85 1024all-gprof: all-libiberty all-bfd
6214eb23 1025all-grep: all-libiberty
ab1cbc67 1026all-gui: all-gdb all-libproc all-target-librx
79337c85
ILT
1027all-gzip: all-libiberty
1028all-hello: all-libiberty
1029all-indent:
3585593d 1030all-ispell: all-emacs19
79337c85 1031all-ld: all-libiberty all-bfd all-byacc all-flex
ab1cbc67
PB
1032configure-target-libg++: $(ALL_GCC)
1033all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1034configure-target-libgloss: $(ALL_GCC)
1035all-target-libgloss: configure-target-libgloss
1036configure-target-libio: $(ALL_GCC)
1037all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
79337c85 1038all-libiberty:
ab1cbc67
PB
1039configure-target-librx: $(ALL_GCC) configure-target-newlib
1040all-target-librx: configure-target-librx
1041configure-target-libstdc++: $(ALL_GCC)
1042all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
79337c85
ILT
1043all-m4: all-libiberty
1044all-make: all-libiberty
1045all-mmalloc:
ab1cbc67
PB
1046configure-target-newlib: $(ALL_GCC)
1047all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
275049c0 1048all-opcodes: all-bfd
be2c65d3 1049all-patch: all-libiberty
b255ccdb 1050all-prms: all-libiberty
79337c85
ILT
1051all-rcs:
1052all-readline:
1053all-recode: all-libiberty
ac259c28
JM
1054all-sed: all-libiberty
1055all-send-pr: all-prms
79337c85
ILT
1056all-shellutils:
1057all-sim: all-libiberty all-bfd
07362bd9 1058all-tar: all-libiberty
79337c85
ILT
1059all-tcl:
1060all-tclX: all-tcl all-tk
1061all-tk: all-tcl
1062all-texinfo: all-libiberty
1063all-textutils:
1064all-tgas: all-libiberty all-bfd
1065all-time:
1066all-wdiff:
309dca2a 1067all-target-winsup: all-target-newlib configure-target-winsup
ab1cbc67 1068configure-target-winsup: configure-target-newlib
79337c85 1069all-uudecode: all-libiberty
ab1cbc67
PB
1070configure-target-libiberty: $(ALL_GCC)
1071all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
07362bd9 1072
79337c85 1073### other supporting targets
07362bd9 1074
79337c85
ILT
1075MAKEDIRS= \
1076 $(prefix) \
1077 $(exec_prefix) \
1078 $(tooldir)
fca4f908 1079
79337c85
ILT
1080.PHONY: install-dirs
1081install-dirs:
1082 @for i in $(MAKEDIRS) ; do \
1083 echo Making $$i... ; \
62cd4a20 1084 parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
79337c85
ILT
1085 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
1086 if [ ! -d $$i ] ; then \
1087 if mkdir $$i ; then \
1088 true ; \
1089 else \
1090 exit 1 ; \
1091 fi ; \
1092 else \
1093 true ; \
1094 fi ; \
1095 done
23e3e7f9 1096
618f57a9 1097
79337c85
ILT
1098dir.info: do-install-info
1099 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1100 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1101 mv -f dir.info.new dir.info ; \
1102 else true ; \
72c09fbc 1103 fi
6b7e5998 1104
b1cceba2
DZ
1105dist:
1106 @echo "Building a full distribution of this tree isn't done"
1107 @echo "via 'make dist'. Check out the etc/ subdirectory"
1108
eb02fd64
RP
1109etags tags: TAGS
1110
753d5049
SC
1111# Right now this just builds TAGS in each subdirectory. emacs19 has the
1112# ability to use several tags files at once, so there is probably no need
1113# to combine them into one big TAGS file (like CVS 1.3 does). We could
1114# (if we felt like it) have this Makefile write a piece of elisp which
1115# the user could load to tell emacs19 where all the TAGS files we just
1116# built are.
1117TAGS: do-TAGS
eb02fd64 1118
eb02fd64
RP
1119# with the gnu make, this is done automatically.
1120
01ec9588 1121Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
a26878d1 1122 $(SHELL) ./config.status
eb02fd64 1123
11954bf1 1124#
01ec9588 1125# Support for building net releases
11954bf1 1126
01ec9588
JK
1127# Files in devo used in any net release.
1128# ChangeLog omitted because it may refer to files which are not in this
1129# distribution (perhaps it would be better to include it anyway).
d94d255d 1130DEVO_SUPPORT= README Makefile.in configure configure.in \
9823504d 1131 config.guess config.sub config move-if-change \
81597186 1132 mpw-README mpw-build.in mpw-config.in mpw-configure \
ab1cbc67 1133 COPYING COPYING.LIB install.sh cfg-ml-com.in cfg-ml-pos.in
01ec9588
JK
1134
1135# Files in devo/etc used in any net release.
1136# ChangeLog omitted because it may refer to files which are not in this
1137# distribution (perhaps it would be better to include it anyway).
6d681784 1138ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
ab1cbc67
PB
1139 configure.texi standards.texi make-stds.texi \
1140 configure.info* standards.info* cfg-paper.info*
01ec9588 1141
40e16078
KR
1142# When you use `make setup-dirs' or `make taz' you should always redefine
1143# this macro.
1144SUPPORT_FILES = list-of-support-files-for-tool-in-question
65e21701
KR
1145# Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1146DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in
40e16078 1147
a54e05f6
KR
1148.PHONY: taz
1149
484fa12d
JW
1150taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1151 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1152 # Make sure "diststuff" files get built properly.
65e21701
KR
1153 for f in $(DISTBISONFILES) ; do \
1154 if [ -r $$f ]; then \
7b636683 1155 sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \
65e21701
KR
1156 mv -f tmp $$f ; \
1157 else true; fi ; \
1158 done
484fa12d
JW
1159 # Take out texinfo from a few places; make simple BISON=bison line.
1160 sed -e '/^all\.normal: /s/\all-texinfo //' \
1161 -e '/^ install-texinfo /d' \
1162 -e '/^BISON = /,/^$$/d' \
1163 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1164 <Makefile.in >tmp
1165 mv -f tmp Makefile.in
65e21701 1166 #
1d5fcc66
PB
1167 $(start-sanitize-Sanitize)
1168 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1169 $(end-sanitize-Sanitize)
40e16078 1170 ./configure sun4
ab1cbc67
PB
1171 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1172 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1173 CC_FOR_TARGET="$(CC) CXX_FOR_TARGET="$(CXX)"
6b9e3a78 1174 # Make links, and run "make diststuff" or "make info" when needed.
a54e05f6 1175 rm -rf proto-toplev ; mkdir proto-toplev
7f9cb3b2 1176 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
a54e05f6
KR
1177 for d in $$dirs ; do \
1178 if [ -d $$d ]; then \
ab1cbc67
PB
1179 if [ ! -f $$d/Makefile ] ; then true ; \
1180 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1181 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
6b9e3a78 1182 elif grep '^info:' $$d/Makefile >/dev/null ; then \
ab1cbc67 1183 (cd $$d ; $(MAKE) info ) || exit 1 ; \
6b9e3a78 1184 fi ; \
7f9cb3b2
KR
1185 if [ -d $$d/proto-$$d.dir ]; then \
1186 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1187 else \
1188 ln -s ../$$d proto-toplev/$$d ; \
1189 fi ; \
a54e05f6 1190 else ln -s ../$$d proto-toplev/$$d ; fi ; \
40e16078 1191 done
3dbe0fa2 1192 cd etc ; $(MAKE) info
5600fbd2 1193 $(MAKE) distclean
a54e05f6 1194 #
40e16078 1195 mkdir proto-toplev/etc
15408b3b
KR
1196 (cd proto-toplev/etc; \
1197 for i in $(ETC_SUPPORT); do \
40e16078 1198 ln -s ../../etc/$$i . ; \
15408b3b 1199 done)
a54e05f6 1200 #
04103845 1201 # Take out texinfo from configurable dirs
40e16078
KR
1202 rm proto-toplev/configure.in
1203 sed -e '/^host_tools=/s/texinfo //' \
40e16078 1204 <configure.in >proto-toplev/configure.in
a54e05f6 1205 #
40e16078
KR
1206 mkdir proto-toplev/texinfo
1207 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
7f9cb3b2 1208 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
484fa12d 1209 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
40e16078 1210 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
a561909f 1211 chmod og=u `find . -print`
7f9cb3b2 1212 (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1d2bb445 1213 echo "==> Making $(TOOL)-$$VER.tar.gz"; \
a59b94d2 1214 rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \
40e16078 1215 tar cfh - $(TOOL)-$$VER \
5cc73086 1216 | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz )
40e16078 1217
484fa12d 1218TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
7f9cb3b2 1219DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
40e16078 1220
96bfa612 1221.PHONY: gas.tar.gz
7f9cb3b2 1222GAS_SUPPORT_DIRS= bfd include libiberty opcodes
96bfa612 1223gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
484fa12d
JW
1224 $(MAKE) -f Makefile.in taz TOOL=gas \
1225 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
40e16078 1226
7f9cb3b2 1227# The FSF "binutils" release includes gprof and ld.
96bfa612 1228.PHONY: binutils.tar.gz
4be4b991 1229BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof
96bfa612 1230binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
484fa12d 1231 $(MAKE) -f Makefile.in taz TOOL=binutils \
2492f942 1232 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
7f9cb3b2 1233
96bfa612 1234.PHONY: gas+binutils.tar.gz
a54e05f6 1235GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
96bfa612 1236gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
484fa12d 1237 $(MAKE) -f Makefile.in taz TOOL=gas \
2492f942 1238 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
79337c85 1239
5600fbd2 1240.PHONY: libg++.tar.gz
ab1cbc67 1241LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
5600fbd2 1242libg++.tar.gz: $(DIST_SUPPORT) libg++
484fa12d
JW
1243 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1244 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
5600fbd2 1245
49dfa984
JM
1246GNATS_SUPPORT_DIRS=include libiberty send-pr
1247gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
a0bd8e18 1248 $(MAKE) -f Makefile.in taz TOOL=gnats \
49dfa984
JM
1249 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1250
1d5fcc66 1251.PHONY: gdb.tar.gz
81597186 1252GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
ca2ce3b3 1253GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1d5fcc66
PB
1254gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1255 $(MAKE) -f Makefile.in taz TOOL=gdb \
ca2ce3b3 1256 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1d5fcc66 1257
7166a308 1258.PHONY: newlib.tar.gz
a220ba0f 1259NEWLIB_SUPPORT_DIRS=libgloss
04103845 1260# taz configures for the sun4 target which won't configure newlib.
a220ba0f
SC
1261# We need newlib configured so that the .info files are made.
1262# Unfortunately, it is not enough to just configure newlib separately:
1263# taz will build the .info files but since SUBDIRS won't contain newlib,
1264# distclean won't be run (leaving Makefile, config.status, and the tmp files
1265# used in building the .info files, eg: *.def, *.ref).
1266# Compensate here by configuring newlib for a simple (no multilib support)
1267# cross target (sparc64), building the info files, and doing make distclean
1268# ourselves.
7166a308 1269newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
04103845
DE
1270 rootme=`pwd` ; \
1271 cd newlib && ../configure --srcdir $$rootme/newlib \
1272 --host sun4 --target sparc64-elf
a220ba0f
SC
1273 cd newlib ; make info
1274 cd newlib ; make distclean
7166a308
KR
1275 $(MAKE) -f Makefile.in taz TOOL=newlib \
1276 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
6b9e3a78 1277 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
7166a308 1278
79337c85
ILT
1279.NOEXPORT:
1280MAKEOVERRIDES=
1281
1282# start-sanitize-chill
1283## This is ugly, but I don't want GNU make to put these variables in
1284## the environment. Older makes will see this as a set of targets
1285## with no dependencies and no actions.
1286unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1287# end-sanitize-chill
1288
eb02fd64 1289# end of Makefile.in
This page took 0.228269 seconds and 4 git commands to generate.