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