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