* srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
[deliverable/binutils-gdb.git] / build-all.mk
... / ...
CommitLineData
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 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
37TREE = devo
38include $(TREE)/release-info
39
40TEST_INSTALL_DISK = /dumbo
41
42INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
43
44ifndef host
45host := $(shell $(TREE)/config.guess)
46endif
47
48NATIVE = native
49
50GCC = gcc
51CFLAGS = -g
52GNUCFLAGS= -g -O2
53CXXFLAGS = -g -O2
54MAKEINFOFLAGS =
55
56log = 1>$(canonhost)-build-log 2>&1
57clog = 1>$(canonhost)-check-log 2>&1
58cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
59latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
60natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
61
62canonhost := $(shell $(TREE)/config.sub $(host))
63
64# Convert config.guess results to a simpler form.
65ifeq ($(canonhost),sparc-sun-solaris2.1)
66canonhost := sparc-sun-solaris2
67endif
68ifeq ($(canonhost),sparc-sun-solaris2.3)
69canonhost := sparc-sun-solaris2
70endif
71ifeq ($(canonhost),mips-dec-ultrix4.2)
72canonhost := mips-dec-ultrix
73endif
74ifeq ($(canonhost),mips-sgi-irix4.0.1)
75canonhost := mips-sgi-irix4
76endif
77ifeq ($(canonhost),mips-sgi-irix4.0.5H)
78canonhost := mips-sgi-irix4
79endif
80ifeq ($(canonhost),mips-sgi-irix5.2)
81canonhost := mips-sgi-irix5
82endif
83ifeq ($(canonhost),rs6000-ibm-aix3.2)
84canonhost := rs6000-ibm-aix
85endif
86ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
87canonhost := i386-sco3.2v4
88endif
89ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
90canonhost := i386-sco3.2v4
91endif
92ifeq ($(canonhost),i386-unknown-sco3.2v4)
93canonhost := i386-sco3.2v4
94endif
95ifeq ($(canonhost),i386-unknown-go32)
96canonhost := i386-go32
97endif
98ifeq ($(canonhost),i386-unknown-sysv4.2)
99canonhost := i386-sysv4.2
100endif
101ifeq ($(canonhost),i386-lynx-lynxos)
102canonhost := i386-lynx
103endif
104ifeq ($(canonhost),m68k-lynx-lynxos)
105canonhost := m68k-lynx
106endif
107ifeq ($(canonhost),sparc-lynx-lynxos)
108canonhost := sparc-lynx
109endif
110ifeq ($(canonhost),rs6000-lynx-lynxos)
111canonhost := rs6000-lynx
112endif
113ifeq ($(canonhost),i386-unknown-linux)
114canonhost := i386-linux
115endif
116ifeq ($(canonhost),i486-unknown-linux)
117canonhost := i486-linux
118endif
119ifeq ($(canonhost),i586-unknown-linux)
120canonhost := i486-linux
121endif
122ifeq ($(canonhost),i386-unknown-linuxaout)
123canonhost := i386-linuxaout
124endif
125ifeq ($(canonhost),i486-unknown-linuxaout)
126canonhost := i486-linuxaout
127endif
128ifeq ($(canonhost),i586-unknown-linuxaout)
129canonhost := i486-linuxaout
130endif
131
132#
133# The following TARGETS variable settings probably ought to
134# be made automatically from the
135# /s1/cygnus/progressive/host-target-pairs.tbl file, using
136# the /s1/cygnus/progressive/targets script. But, be sure
137# that the native is spelled 'native'.
138#
139
140ifeq ($(canonhost),sparc-sun-sunos4.1.3)
141TARGETS = $(NATIVE) \
142 i386-go32 \
143 a29k-amd-udi \
144 h8300-hms h8500-hms \
145 hppa1.1-hp-proelf \
146 i386-aout i386-elf \
147 i960-nindy-coff i960-vxworks5.0 i960-vxworks5.1 \
148 m68k-aout m68k-coff m68k-elf m68k-vxworks5.1 \
149 mips-idt-ecoff mips64-elf mips-elf \
150 sh-hms \
151 sparc-aout sparc64-aout sparc-vxworks \
152 sparclite-aout sparclite-coff sparclite-vxworks \
153 z8k-coff \
154 OSE68000 OSE68k mips-ncd-elf i386-unixware
155# The OSE68000 and OSE68k targets are for Ericsson only.
156GCC = gcc -O2 -pipe
157all: all-cygnus
158endif
159
160ifeq ($(canonhost),m68k-sun-sunos4.1.1)
161TARGETS = $(NATIVE)
162GCC = gcc -O2 -msoft-float
163CC = cc -J
164all: all-cygnus
165endif
166
167ifeq ($(canonhost),sparc-sun-solaris2)
168TARGETS = $(NATIVE) \
169 a29k-amd-udi \
170 h8300-hms h8500-hms \
171 hppa1.1-hp-proelf \
172 i960-vxworks5.0 i960-vxworks5.1 \
173 m68k-aout m68k-coff m68k-vxworks5.1 m88k-coff \
174 mips-idt-ecoff mips-elf \
175 sparc64-elf sparclite-aout sparclite-coff \
176 OSE68000 OSE68k \
177 sparc-sun-sunos4.1.3
178# The latter assures that BNR's special build (which they now
179# do for themselves from sources) hasn't developed bit-rot.
180# The OSE68000 and OSE68k targets are for Ericsson only.
181
182CC = cc
183GCC = gcc -O2 -pipe
184all: all-cygnus
185endif
186
187ifeq ($(canonhost),mips-dec-ultrix)
188TARGETS = $(NATIVE) m68k-aout
189CC = cc -Wf,-XNg1000
190all: all-cygnus
191endif
192
193ifeq ($(patsubst alpha-dec-osf%,alpha,$(canonhost)),alpha)
194TARGETS = $(NATIVE)
195CC = cc
196all: all-cygnus
197endif
198
199ifeq ($(canonhost),mips-sgi-irix4)
200TARGETS = $(NATIVE) \
201 mips-idt-ecoff \
202 mips-elf mips64-elf \
203 sh-hms
204CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
205all: all-cygnus
206endif
207
208ifeq ($(canonhost),mips-sgi-irix5)
209TARGETS = $(NATIVE) \
210 mips-idt-ecoff \
211 mips-elf mips64-elf \
212 sh-hms
213CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
214all: all-cygnus
215endif
216
217ifeq ($(canonhost),powerpc-ibm-aix4.1.1)
218TARGETS = $(NATIVE)
219all: all-cygnus
220endif
221
222ifeq ($(canonhost),rs6000-ibm-aix)
223TARGETS = $(NATIVE) \
224 i960-vxworks5.0 i960-vxworks5.1 \
225 m68k-aout
226all: all-cygnus
227endif
228
229ifeq ($(canonhost),rs6000-ibm-aix3.2.5)
230TARGETS = $(NATIVE) \
231 i960-vxworks5.0 i960-vxworks5.1 \
232 m68k-aout
233all: all-cygnus
234endif
235
236ifeq ($(canonhost),m68k-hp-hpux)
237TARGETS = $(NATIVE) m68k-aout
238TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
239CC = cc -Wp,-P,-H256000
240#CFLAGS = +O1000
241CFLAGS = -g
242all: all-cygnus
243endif
244
245ifeq ($(canonhost),hppa1.1-hp-hpux)
246TARGETS = \
247 $(NATIVE) \
248 h8300-hms \
249 hppa1.1-hp-proelf \
250 i960-vxworks5.0 i960-vxworks5.1 \
251 m68k-aout m68k-coff m68k-vxworks5.1
252CC = cc -Wp,-H256000
253#CFLAGS = +Obb2000
254CFLAGS = -g
255all: all-cygnus
256endif
257
258ifeq ($(canonhost),i386-sco3.2v4)
259TARGETS = $(NATIVE)
260all: all-cygnus
261endif
262
263ifeq ($(canonhost),i386-go32)
264TARGETS = \
265 a29k-amd-udi \
266 h8300-hms hppa1.1-hp-proelf \
267 i386-aout \
268 m68k-aout m68k-coff \
269 mips-elf mips-idt-ecoff mips64-elf \
270 sh-hms \
271 sparc-aout sparclite-aout sparclite-coff
272CC = i386-go32-gcc
273GCC = i386-go32-gcc -O2
274CFLAGS =
275CXXFLAGS = -O2
276MAKEINFOFLAGS = --no-split
277all: all-dos
278endif
279
280ifeq ($(canonhost),i386-sysv4.2)
281TARGETS = $(NATIVE) i386-netware
282CC = cc
283all: all-cygnus
284endif
285
286ifeq ($(canonhost),i386-lynx)
287TARGETS = $(NATIVE)
288CC = /usr/cygnus/progressive/bin/gcc
289all: all-cygnus
290SHELL=/bin/bash
291endif
292
293ifeq ($(canonhost),m68k-lynx)
294TARGETS = $(NATIVE)
295CC = /usr/cygnus/progressive/bin/gcc
296all: all-cygnus
297SHELL=/bin/bash
298endif
299
300ifeq ($(canonhost),sparc-lynx)
301TARGETS = $(NATIVE)
302CC = /usr/cygnus/progressive/bin/gcc
303all: all-cygnus
304SHELL=/bin/bash
305endif
306
307ifeq ($(canonhost),rs6000-lynx)
308TARGETS = $(NATIVE)
309CC = /usr/cygnus/progressive/bin/gcc
310all: all-cygnus
311SHELL=/bin/bash
312endif
313
314ifeq ($(patsubst %-linux,linux,$(patsubst %-linuxaout,linux,$(canonhost))),linux)
315TARGETS = $(NATIVE)
316all: all-cygnus
317endif
318
319FLAGS_TO_PASS := \
320 "GCC=$(GCC)" \
321 "CC=$(CC)" \
322 "CFLAGS=$(CFLAGS)" \
323 "GNUCFLAGS=$(GNUCFLAGS)" \
324 "CXXFLAGS=$(CXXFLAGS)" \
325 "host=$(canonhost)" \
326 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
327 "RELEASE_TAG=$(RELEASE_TAG)" \
328 "SHELL=$(SHELL)"
329
330# set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
331ifeq ($(patsubst %-lynx,lynx,$(canonhost)),lynx)
332FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
333endif
334
335ifeq ($(patsubst %-linux,linux,$(patsubst %-linuxaout,linux,$(canonhost))),linux)
336FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)"
337endif
338
339all-emacs:
340 @echo build started at `date`
341 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
342 -rm -f $(ROOTING)/$(RELEASE_TAG)
343 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
344 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
345 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
346 @echo done at `date`
347
348all-cygnus:
349 @echo build started at `date`
350 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
351 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
352#
353# The following line to be used during regular progressive builds
354# to help developers test, but should be commented out for final
355# progressive build.
356#
357# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
358 @for i in $(TARGETS) ; do \
359 if [ "$$i" = "native" ] ; then \
360 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
361 echo "3staging $(canonhost) native" ; \
362 echo Flags passed to make: $(FLAGS_TO_PASS) ; \
363 if $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log); then \
364 echo " completed successfully" ; \
365 else \
366 exit 1; \
367 fi; \
368 else \
369 true ; \
370 fi ; \
371 else \
372 echo "building $(canonhost) cross to $$i" ; \
373 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
374 echo " completed successfully" ; \
375 fi ; \
376 done
377 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
378 echo checking $(canonhost) native ; \
379 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
380 touch $(canonhost)-stamp-3stage-checked ; \
381 else \
382 true ; \
383 fi
384 @echo done at `date`
385
386native:
387 @echo build started at `date`
388 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
389 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
390# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
391 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
392 @echo done at `date`
393
394build-cygnus:
395 @echo build started at `date`
396 @for i in $(TARGETS) ; do \
397 if [ "$$i" = "native" ] ; then \
398 if [ ! -f $(canonhost)-3stage-done ] ; then \
399 echo "3staging $(canonhost) native" ; \
400 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
401 echo " completed successfully" ; \
402 fi ; \
403 else \
404 echo "building $(canonhost) cross to $$i:" `date` ; \
405 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
406 echo " completed successfully" ; \
407 fi ; \
408 done
409 @echo done at `date`
410
411build-latest:
412 @echo build started at `date`
413 @for i in $(TARGETS) ; do \
414 if [ "$$i" != "native" ] ; then \
415 echo "building $(canonhost) cross to $$i:" `date` ; \
416 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
417 echo " completed successfully" ; \
418 fi ; \
419 done
420 @echo done at `date`
421
422all-native:
423 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
424 rm -f $(ROOTING)/$(RELEASE_TAG)
425 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
426 @for i in $(TARGETS) ; do \
427 echo "building $(canonhost) cross to $$i" ; \
428 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
429 echo " completed successfully" ; \
430 done
431
432all-cross:
433 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
434 rm -f $(ROOTING)/$(RELEASE_TAG)
435 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
436 @for i in $(TARGETS) ; do \
437 echo "building $(canonhost) cross to $$i" ; \
438 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
439 echo " completed successfully" ; \
440 done
441
442do-dos:
443 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
444all-dos:
445 @for i in $(TARGETS) ; do \
446 echo "building $(canonhost) cross to $$i" ; \
447 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
448 echo " completed successfully at `date`" ; \
449 done
450
451config:
452 @for i in $(TARGETS) ; do \
453 if [ "$$i" = "native" ] ; then \
454 echo "config stage1 for $(canonhost)" ; \
455 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
456 echo " completed successfully" ; \
457 else \
458 echo "config $(canonhost) cross to $$i" ; \
459 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
460 echo " completed successfully" ; \
461 fi ; \
462 done
463
464
465build:
466 @for i in $(TARGETS) ; do \
467 if [ "$$i" = "native" ] ; then \
468 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
469 echo " completed successfully" ; \
470 else \
471 echo "building $(canonhost) cross to $$i" ; \
472 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
473 echo " completed successfully" ; \
474 fi ; \
475 done
476
477
4783build:
479 @for i in $(TARGETS) ; do \
480 if [ "$$i" = "native" ] ; then \
481 echo "building 3stage for $(canonhost)" ; \
482 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
483 echo " completed successfully" ; \
484 else \
485 echo "building $(canonhost) cross to $$i" ; \
486 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
487 echo " completed successfully" ; \
488 fi ; \
489 done
490
491build-all-latest:
492 @for i in $(TARGETS) ; do \
493 if [ "$$i" = "native" ] ; then \
494 echo "building 3stage for $(canonhost)" ; \
495 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
496 echo " completed successfully" ; \
497 else \
498 echo "building $(canonhost) cross to $$i" ; \
499 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
500 echo " completed successfully" ; \
501 fi ; \
502 done
503
504clean:
505 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
506
507### Local Variables:
508### fill-column: 131
509### End:
This page took 0.026358 seconds and 4 git commands to generate.