* gdb.texinfo (help targets): Changed to `help target', which
[deliverable/binutils-gdb.git] / build-all.mk
1 # Build all of the targets for any given host.....
2 #
3 # This file is going to be ugly. It will be VERY specific to the
4 # Cygnus environment and build-process.
5 #
6 # Useful targets (rt = recursion target):
7 # (please correct or expand on this)
8 # FIXME: Might some of these be superfluous?
9 #
10 # all-emacs
11 # all-cygnus - set up install directories, build 3stage native and all
12 # supported cross targets, then check 3stage'd native
13 # (rt = $(canonhost)-stamp-3stage-done, do-cygnus for cross)
14 # native - set up install directories, build 3stage native
15 # (rt = $(canonhost)-stamp-3stage-1)
16 # build-cygnus - build 3stage native and all supported cross targets
17 # (rt = $(canonhost)-stamp-3stage-done, build-cygnus for cross)
18 # build-latest - build native and all supported cross targets
19 # (rt = build-latest)
20 # all-native - set up install directories, build native
21 # (rt = do-native)
22 # all-cross - set up install directories, build all targets
23 # (rt = do-cygnus)
24 # config - configure native and all supported cross targets
25 # (rt = do1-config, do-native-config for cross)
26 # build - build native and all supported cross targets
27 # (rt = do1-build, build-native for cross)
28 # 3build - build 3stage native and all supported cross targets
29 # (rt = all, build-cygnus for cross)
30 # build-all-latest - build 3stage native and all supported cross targets
31 # (rt = $(canonhost)-stamp-3stage-done, build-latest for cross)
32 # clean - remove objdir directories, stamp files
33 # (rt = clean)
34 #
35 # To configure/build for fewer targets, specify TARGETS="native cross1 ...".
36
37 TREE = devo
38 include $(TREE)/release-info
39
40 TEST_INSTALL_DISK = /galt
41
42 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
43
44 ifndef host
45 host := $(shell $(TREE)/config.guess)
46 endif
47
48 NATIVE = native
49
50 GCC = gcc -O2
51 CFLAGS = -g
52 CXXFLAGS = -g -O2 -fexternal-templates
53 MAKEINFOFLAGS =
54
55 log = 1>$(canonhost)-build-log 2>&1
56 clog = 1>$(canonhost)-check-log 2>&1
57 cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
58 latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
59 natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
60
61 canonhost := $(shell $(TREE)/config.sub $(host))
62
63 # Convert config.guess results to a simpler form.
64 ifeq ($(canonhost),sparc-sun-solaris2.1)
65 canonhost := sparc-sun-solaris2
66 endif
67 ifeq ($(canonhost),sparc-sun-solaris2.3)
68 canonhost := sparc-sun-solaris2
69 endif
70 ifeq ($(canonhost),mips-dec-ultrix4.2)
71 canonhost := mips-dec-ultrix
72 endif
73 ifeq ($(canonhost),mips-sgi-irix4.0.1)
74 canonhost := mips-sgi-irix4
75 endif
76 ifeq ($(canonhost),mips-sgi-irix4.0.5H)
77 canonhost := mips-sgi-irix4
78 endif
79 ifeq ($(canonhost),rs6000-ibm-aix3.2)
80 canonhost := rs6000-ibm-aix
81 endif
82 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
83 canonhost := i386-sco3.2v4
84 endif
85 ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
86 canonhost := i386-sco3.2v4
87 endif
88 ifeq ($(canonhost),i386-unknown-sco3.2v4)
89 canonhost := i386-sco3.2v4
90 endif
91 ifeq ($(canonhost),i386-unknown-go32)
92 canonhost := i386-go32
93 endif
94 ifeq ($(canonhost),i386-unknown-sysv4.2)
95 canonhost := i386-sysv4.2
96 endif
97 ifeq ($(canonhost),i386-lynx-lynxos)
98 canonhost := i386-lynx
99 endif
100 ifeq ($(canonhost),m68k-lynx-lynxos)
101 canonhost := m68k-lynx
102 endif
103 ifeq ($(canonhost),sparc-lynx-lynxos)
104 canonhost := sparc-lynx
105 endif
106 ifeq ($(canonhost),rs6000-lynx-lynxos)
107 canonhost := rs6000-lynx
108 endif
109
110 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
111 TARGETS = $(NATIVE) \
112 i386-go32 \
113 a29k-amd-udi \
114 h8300-hms \
115 i386-aout \
116 i386-lynx \
117 i960-vxworks \
118 mips-idt-ecoff mips64-elf mips-elf \
119 m68k-aout m68k-vxworks m68k-coff \
120 m68k-lynx \
121 sh-hms \
122 sparc-aout sparc-lynx sparc-vxworks \
123 sparclite-aout sparclite-vxworks \
124 sparclite-coff z8k-coff
125 GCC = gcc -O2 -pipe
126 all: all-cygnus
127 endif
128
129 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
130 TARGETS = $(NATIVE) \
131 m68k-coff
132 GCC = gcc -O2 -msoft-float
133 CC = cc -J
134 all: all-cygnus
135 endif
136
137 ifeq ($(canonhost),sparc-sun-solaris2)
138 TARGETS = $(NATIVE) \
139 a29k-amd-udi \
140 i960-vxworks \
141 m68k-aout m68k-coff m68k-vxworks \
142 m88k-coff \
143 mipsel-idt-ecoff sparc-lynx
144 CC = cc -Xs
145 GCC = gcc -O2 -pipe
146 all: all-cygnus
147 endif
148
149 ifeq ($(canonhost),mips-dec-ultrix)
150 TARGETS = $(NATIVE) m68k-aout
151 CC = cc -Wf,-XNg1000
152 all: all-cygnus
153 endif
154
155 ifeq ($(canonhost),mips-sgi-irix4)
156 TARGETS = $(NATIVE) \
157 mips-idt-ecoff sh-hms \
158 mips64-elf
159 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
160 all: all-cygnus
161 endif
162
163 ifeq ($(canonhost),rs6000-ibm-aix)
164 TARGETS = $(NATIVE) \
165 i960-vxworks \
166 m68k-aout
167 all: all-cygnus
168 endif
169
170 ifeq ($(canonhost),m68k-hp-hpux)
171 TARGETS = $(NATIVE) m68k-aout
172 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
173 CC = cc -Wp,-P
174 #CFLAGS = +O1000
175 CFLAGS =
176 all: all-cygnus
177 endif
178
179 ifeq ($(canonhost),hppa1.1-hp-hpux)
180 TARGETS = \
181 $(NATIVE) \
182 i960-vxworks \
183 m68k-aout m68k-vxworks
184 CC = cc -Wp,-H256000
185 #CFLAGS = +Obb2000
186 CFLAGS = -g
187 all: all-cygnus
188 endif
189
190 ifeq ($(canonhost),i386-sco3.2v4)
191 TARGETS = $(NATIVE) i386-aout
192 all: all-cygnus
193 endif
194
195 ifeq ($(canonhost),i386-go32)
196 TARGETS = \
197 a29k-amd-udi \
198 h8300-hms \
199 i386-aout \
200 m68k-aout m68k-coff \
201 mips-idt-ecoff \
202 sh-hms \
203 sparclite-aout
204 CC = i386-go32-gcc
205 GCC = i386-go32-gcc -O2
206 CFLAGS =
207 CXXFLAGS = -O2
208 MAKEINFOFLAGS = --no-split
209 all: all-dos
210 endif
211
212 ifeq ($(canonhost),i386-sysv4.2)
213 TARGETS = $(NATIVE) i386-netware
214 CC = cc
215 all: all-cygnus
216 endif
217
218 ifeq ($(canonhost),i386-lynx)
219 TARGETS = $(NATIVE)
220 CC = /bin/gcc
221 all: all-cygnus
222 SHELL=/bin/bash
223 endif
224
225 ifeq ($(canonhost),m68k-lynx)
226 TARGETS = $(NATIVE)
227 CC = /bin/gcc
228 all: all-cygnus
229 SHELL=/bin/bash
230 endif
231
232 ifeq ($(canonhost),sparc-lynx)
233 TARGETS = $(NATIVE)
234 CC = /bin/gcc
235 all: all-cygnus
236 SHELL=/bin/bash
237 endif
238
239 ifeq ($(canonhost),rs6000-lynx)
240 TARGETS = $(NATIVE)
241 CC = /usr/cygnus/progressive/bin/gcc
242 all: all-cygnus
243 SHELL=/bin/bash
244 endif
245
246 FLAGS_TO_PASS := \
247 "GCC=$(GCC)" \
248 "CC=$(CC)" \
249 "CFLAGS=$(CFLAGS)" \
250 "CXXFLAGS=$(CXXFLAGS)" \
251 "host=$(canonhost)" \
252 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
253 "RELEASE_TAG=$(RELEASE_TAG)" \
254 "SHELL=$(SHELL)"
255
256 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
257 ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos)
258 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
259 endif
260
261 all-emacs:
262 @echo build started at `date`
263 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
264 -rm -f $(ROOTING)/$(RELEASE_TAG)
265 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
266 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
267 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
268 @echo done at `date`
269
270 all-cygnus:
271 @echo build started at `date`
272 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
273 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
274 #
275 # The following line to be used during regular progressive builds
276 # to help developers test, but should be commented out for final
277 # progressive build.
278 #
279 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progres
280 sive-beta
281 @for i in $(TARGETS) ; do \
282 if [ "$$i" = "native" ] ; then \
283 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
284 echo "3staging $(canonhost) native" ; \
285 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
286 echo " completed successfully" ; \
287 else \
288 true ; \
289 fi ; \
290 else \
291 echo "building $(canonhost) cross to $$i" ; \
292 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
293 echo " completed successfully" ; \
294 fi ; \
295 done
296 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
297 echo checking $(canonhost) native ; \
298 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
299 touch $(canonhost)-stamp-3stage-checked ; \
300 else \
301 true ; \
302 fi
303 @echo done at `date`
304
305 native:
306 @echo build started at `date`
307 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
308 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
309 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
310 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
311 @echo done at `date`
312
313 build-cygnus:
314 @echo build started at `date`
315 @for i in $(TARGETS) ; do \
316 if [ "$$i" = "native" ] ; then \
317 if [ ! -f $(canonhost)-3stage-done ] ; then \
318 echo "3staging $(canonhost) native" ; \
319 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
320 echo " completed successfully" ; \
321 fi ; \
322 else \
323 echo "building $(canonhost) cross to $$i:" `date` ; \
324 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
325 echo " completed successfully" ; \
326 fi ; \
327 done
328 @echo done at `date`
329
330 build-latest:
331 @echo build started at `date`
332 @for i in $(TARGETS) ; do \
333 if [ "$$i" != "native" ] ; then \
334 echo "building $(canonhost) cross to $$i:" `date` ; \
335 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
336 echo " completed successfully" ; \
337 fi ; \
338 done
339 @echo done at `date`
340
341 all-native:
342 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
343 rm -f $(ROOTING)/$(RELEASE_TAG)
344 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
345 @for i in $(TARGETS) ; do \
346 echo "building $(canonhost) cross to $$i" ; \
347 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
348 echo " completed successfully" ; \
349 done
350
351 all-cross:
352 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
353 rm -f $(ROOTING)/$(RELEASE_TAG)
354 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
355 @for i in $(TARGETS) ; do \
356 echo "building $(canonhost) cross to $$i" ; \
357 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
358 echo " completed successfully" ; \
359 done
360
361 do-dos:
362 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
363 all-dos:
364 @for i in $(TARGETS) ; do \
365 echo "building $(canonhost) cross to $$i" ; \
366 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
367 echo " completed successfully at `date`" ; \
368 done
369
370 config:
371 @for i in $(TARGETS) ; do \
372 if [ "$$i" = "native" ] ; then \
373 echo "config stage1 for $(canonhost)" ; \
374 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
375 echo " completed successfully" ; \
376 else \
377 echo "config $(canonhost) cross to $$i" ; \
378 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
379 echo " completed successfully" ; \
380 fi ; \
381 done
382
383
384 build:
385 @for i in $(TARGETS) ; do \
386 if [ "$$i" = "native" ] ; then \
387 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
388 echo " completed successfully" ; \
389 else \
390 echo "building $(canonhost) cross to $$i" ; \
391 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
392 echo " completed successfully" ; \
393 fi ; \
394 done
395
396
397 3build:
398 @for i in $(TARGETS) ; do \
399 if [ "$$i" = "native" ] ; then \
400 echo "building 3stage for $(canonhost)" ; \
401 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
402 echo " completed successfully" ; \
403 else \
404 echo "building $(canonhost) cross to $$i" ; \
405 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
406 echo " completed successfully" ; \
407 fi ; \
408 done
409
410 build-all-latest:
411 @for i in $(TARGETS) ; do \
412 if [ "$$i" = "native" ] ; then \
413 echo "building 3stage for $(canonhost)" ; \
414 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
415 echo " completed successfully" ; \
416 else \
417 echo "building $(canonhost) cross to $$i" ; \
418 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
419 echo " completed successfully" ; \
420 fi ; \
421 done
422
423 clean:
424 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
425
426 ### Local Variables:
427 ### fill-column: 131
428 ### End:
This page took 0.040051 seconds and 4 git commands to generate.