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