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