Add support for PowerPC embedded ABI.
[deliverable/binutils-gdb.git] / build-all.mk
CommitLineData
87fa4c38 1# Build all of the targets for any given host.....
543cf4ac 2#
87fa4c38
KC
3# This file is going to be ugly. It will be VERY specific to the
4# Cygnus environment and build-process.
543cf4ac 5#
85195426
DE
6# Useful targets (rt = recursion target):
7# (please correct or expand on this)
8# FIXME: Might some of these be superfluous?
543cf4ac 9#
85195426
DE
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)
87fa4c38 18# build-latest - build all supported cross targets
85195426
DE
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)
44c1515d
DE
32# clean - remove objdir directories, stamp files
33# (rt = clean)
85195426
DE
34#
35# To configure/build for fewer targets, specify TARGETS="native cross1 ...".
36
543cf4ac 37TREE = devo
022f8f67 38include $(TREE)/release-info
543cf4ac 39
323f277f 40TEST_INSTALL_DISK = /abc
543cf4ac 41
022f8f67 42INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
543cf4ac 43
12eda620
ILT
44ifndef host
45host := $(shell $(TREE)/config.guess)
46endif
47
022f8f67
DZ
48NATIVE = native
49
a846e83d 50GCC = gcc -O2
e87f9243 51CFLAGS = -g
a846e83d 52CXXFLAGS = -g -O2 -fexternal-templates
9823504d 53MAKEINFOFLAGS =
543cf4ac
DZ
54
55log = 1>$(canonhost)-build-log 2>&1
0689f73a 56clog = 1>$(canonhost)-check-log 2>&1
f74859e4 57cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
39ad69d8 58latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
f74859e4 59natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
543cf4ac
DZ
60
61canonhost := $(shell $(TREE)/config.sub $(host))
12eda620
ILT
62
63# Convert config.guess results to a simpler form.
89da237f
ILT
64ifeq ($(canonhost),sparc-sun-solaris2.1)
65canonhost := sparc-sun-solaris2
66endif
85195426
DE
67ifeq ($(canonhost),sparc-sun-solaris2.3)
68canonhost := sparc-sun-solaris2
69endif
12eda620
ILT
70ifeq ($(canonhost),mips-dec-ultrix4.2)
71canonhost := mips-dec-ultrix
72endif
73ifeq ($(canonhost),mips-sgi-irix4.0.1)
74canonhost := mips-sgi-irix4
75endif
85195426
DE
76ifeq ($(canonhost),mips-sgi-irix4.0.5H)
77canonhost := mips-sgi-irix4
78endif
175e702b
KC
79ifeq ($(canonhost),mips-sgi-irix5.2)
80canonhost := mips-sgi-irix5
81endif
db526bd7
ILT
82ifeq ($(canonhost),rs6000-ibm-aix3.2)
83canonhost := rs6000-ibm-aix
84endif
12eda620 85ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
86canonhost := i386-sco3.2v4
87endif
ec782faa
DZ
88ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
89canonhost := i386-sco3.2v4
90endif
08629ab8
DZ
91ifeq ($(canonhost),i386-unknown-sco3.2v4)
92canonhost := i386-sco3.2v4
93endif
60986901
ILT
94ifeq ($(canonhost),i386-unknown-go32)
95canonhost := i386-go32
96endif
89745e93
DZ
97ifeq ($(canonhost),i386-unknown-sysv4.2)
98canonhost := i386-sysv4.2
99endif
f358c814 100ifeq ($(canonhost),i386-lynx-lynxos)
8456a631 101canonhost := i386-lynx
f358c814
DZ
102endif
103ifeq ($(canonhost),m68k-lynx-lynxos)
8456a631 104canonhost := m68k-lynx
f358c814 105endif
c5a1c226
KC
106ifeq ($(canonhost),sparc-lynx-lynxos)
107canonhost := sparc-lynx
108endif
109ifeq ($(canonhost),rs6000-lynx-lynxos)
055cc3ff
KC
110canonhost := rs6000-lynx
111endif
543cf4ac 112
e3f6f4cf
BC
113#
114# The following TARGETS variable settings probably ought to
115# be made automatically from the
116# /s1/cygnus/progressive/host-target-pairs.tbl file, using
117# the /s1/cygnus/progressive/targets script. But, be sure
118# that the native is spelled 'native'.
119#
120
32480238
DZ
121ifeq ($(canonhost),sparc-sun-sunos4.1.3)
122TARGETS = $(NATIVE) \
d5b2cb76 123 i386-go32 \
32480238 124 a29k-amd-udi \
d5b2cb76
DZ
125 h8300-hms \
126 i386-aout \
127 i386-lynx \
87fa4c38 128 i960-vxworks5.0 i960-vxworks5.1 \
055cc3ff 129 mips-idt-ecoff mips64-elf mips-elf \
32480238 130 m68k-aout m68k-vxworks m68k-coff \
d5b2cb76
DZ
131 m68k-lynx \
132 sh-hms \
055cc3ff 133 sparc-aout sparc-lynx sparc-vxworks \
d5b2cb76 134 sparclite-aout sparclite-vxworks \
e3f6f4cf 135 sparclite-coff z8k-coff \
06a8010d
BC
136 OSE68000 OSE68k mips-ncd-elf
137# The OSE68000 and OSE68k targets are for Ericsson only;
138# the mips-ncd-elf target is for NCD only.
a846e83d 139GCC = gcc -O2 -pipe
543cf4ac
DZ
140all: all-cygnus
141endif
142
143ifeq ($(canonhost),m68k-sun-sunos4.1.1)
32480238 144TARGETS = $(NATIVE) \
a4c50dd0 145 m68k-coff
a846e83d 146GCC = gcc -O2 -msoft-float
7cc2923a 147CC = cc -J
543cf4ac
DZ
148all: all-cygnus
149endif
150
151ifeq ($(canonhost),sparc-sun-solaris2)
32480238 152TARGETS = $(NATIVE) \
d5b2cb76 153 a29k-amd-udi \
87fa4c38 154 i960-vxworks5.0 i960-vxworks5.1 \
8456a631 155 m68k-aout m68k-coff m68k-vxworks \
87fa4c38 156 mipsel-idt-ecoff sparc-lynx \
e3f6f4cf
BC
157 sparclite-aout sparclite-coff m88k-coff z8k-coff \
158 OSE68000 OSE68k \
159 sparc-sun-sunos4.1.3
160# The latter assures that BNR's special build (which they now
161# do for themselves from sources) hasn't developed bit-rot.
162# The OSE68000 and OSE68k targets are for Ericsson only.
163
6d98b3d2 164CC = cc -Xs
a846e83d 165GCC = gcc -O2 -pipe
543cf4ac
DZ
166all: all-cygnus
167endif
168
169ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8 170TARGETS = $(NATIVE) m68k-aout
872ff7ef 171CC = cc -Wf,-XNg1000
543cf4ac
DZ
172all: all-cygnus
173endif
174
87fa4c38
KC
175ifeq ($(canonhost),alpha-dec-osf1.3)
176TARGETS = $(NATIVE)
177CC = cc
178all: all-cygnus
179endif
180
543cf4ac 181ifeq ($(canonhost),mips-sgi-irix4)
89745e93 182TARGETS = $(NATIVE) \
055cc3ff
KC
183 mips-idt-ecoff sh-hms \
184 mips64-elf
fea15001 185CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
543cf4ac
DZ
186all: all-cygnus
187endif
188
175e702b
KC
189ifeq ($(canonhost),mips-sgi-irix5)
190TARGETS = $(NATIVE) \
191 mips-idt-ecoff sh-hms \
192 mips64-elf
193CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
194all: all-cygnus
195endif
196
543cf4ac 197ifeq ($(canonhost),rs6000-ibm-aix)
32480238 198TARGETS = $(NATIVE) \
87fa4c38 199 i960-vxworks5.0 i960-vxworks5.1 \
a4c50dd0 200 m68k-aout
543cf4ac
DZ
201all: all-cygnus
202endif
203
204ifeq ($(canonhost),m68k-hp-hpux)
07be0634 205TARGETS = $(NATIVE) m68k-aout
e37dbf93 206TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
32480238
DZ
207CC = cc -Wp,-P
208#CFLAGS = +O1000
87fa4c38 209CFLAGS = -g
eb0293dc 210all: all-cygnus
543cf4ac
DZ
211endif
212
213ifeq ($(canonhost),hppa1.1-hp-hpux)
32480238 214TARGETS = \
d5b2cb76 215 $(NATIVE) \
87fa4c38
KC
216 i960-vxworks5.0 i960-vxworks5.1 \
217 m68k-aout m68k-coff m68k-vxworks \
218 z8k-coff
055cc3ff 219CC = cc -Wp,-H256000
32480238
DZ
220#CFLAGS = +Obb2000
221CFLAGS = -g
055cc3ff 222all: all-cygnus
543cf4ac
DZ
223endif
224
21412832
ILT
225ifeq ($(canonhost),i386-sco3.2v4)
226TARGETS = $(NATIVE) i386-aout
21412832
ILT
227all: all-cygnus
228endif
229
60986901 230ifeq ($(canonhost),i386-go32)
d5b2cb76 231TARGETS = \
32480238 232 a29k-amd-udi \
d5b2cb76
DZ
233 h8300-hms \
234 i386-aout \
32480238 235 m68k-aout m68k-coff \
d5b2cb76
DZ
236 mips-idt-ecoff \
237 sh-hms \
32480238 238 sparclite-aout
60986901 239CC = i386-go32-gcc
a846e83d 240GCC = i386-go32-gcc -O2
9823504d 241CFLAGS =
a846e83d 242CXXFLAGS = -O2
9823504d 243MAKEINFOFLAGS = --no-split
055cc3ff 244all: all-dos
60986901
ILT
245endif
246
7f82101d 247ifeq ($(canonhost),i386-sysv4.2)
a4c50dd0 248TARGETS = $(NATIVE) i386-netware
32480238
DZ
249CC = cc
250all: all-cygnus
251endif
252
8456a631 253ifeq ($(canonhost),i386-lynx)
f358c814 254TARGETS = $(NATIVE)
756b40d5 255CC = /usr/cygnus/progressive/bin/gcc
f358c814 256all: all-cygnus
fb682d69 257SHELL=/bin/bash
f358c814
DZ
258endif
259
8456a631 260ifeq ($(canonhost),m68k-lynx)
f358c814 261TARGETS = $(NATIVE)
756b40d5 262CC = /usr/cygnus/progressive/bin/gcc
f358c814 263all: all-cygnus
fb682d69 264SHELL=/bin/bash
f358c814
DZ
265endif
266
055cc3ff
KC
267ifeq ($(canonhost),sparc-lynx)
268TARGETS = $(NATIVE)
756b40d5 269CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
270all: all-cygnus
271SHELL=/bin/bash
272endif
273
274ifeq ($(canonhost),rs6000-lynx)
275TARGETS = $(NATIVE)
b5775df3 276CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
277all: all-cygnus
278SHELL=/bin/bash
279endif
280
543cf4ac
DZ
281FLAGS_TO_PASS := \
282 "GCC=$(GCC)" \
7cc2923a 283 "CC=$(CC)" \
543cf4ac 284 "CFLAGS=$(CFLAGS)" \
e87f9243 285 "CXXFLAGS=$(CXXFLAGS)" \
12eda620 286 "host=$(canonhost)" \
9823504d 287 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
fb682d69
ME
288 "RELEASE_TAG=$(RELEASE_TAG)" \
289 "SHELL=$(SHELL)"
543cf4ac 290
7ae68194 291# set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
87fa4c38 292ifeq ($(patsubst %-lynx,lynx,$(canonhost)),lynx)
7ae68194
ME
293FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
294endif
295
57dfb584
DZ
296all-emacs:
297 @echo build started at `date`
298 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
f358c814 299 -rm -f $(ROOTING)/$(RELEASE_TAG)
022f8f67 300 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
08629ab8
DZ
301 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
302 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
57dfb584
DZ
303 @echo done at `date`
304
543cf4ac
DZ
305all-cygnus:
306 @echo build started at `date`
307 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c262769a 308 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
c5a1c226 309#
87fa4c38
KC
310# The following line to be used during regular progressive builds
311# to help developers test, but should be commented out for final
312# progressive build.
c5a1c226 313#
87fa4c38 314# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
543cf4ac
DZ
315 @for i in $(TARGETS) ; do \
316 if [ "$$i" = "native" ] ; then \
75217b36 317 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
543cf4ac 318 echo "3staging $(canonhost) native" ; \
87fa4c38 319 echo Flags passed to make: $(FLAGS_TO_PASS) ; \
21412832 320 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac 321 echo " completed successfully" ; \
75217b36
ILT
322 else \
323 true ; \
1900e815 324 fi ; \
543cf4ac
DZ
325 else \
326 echo "building $(canonhost) cross to $$i" ; \
f74859e4 327 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
543cf4ac
DZ
328 echo " completed successfully" ; \
329 fi ; \
330 done
0689f73a
ME
331 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
332 echo checking $(canonhost) native ; \
333 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
334 touch $(canonhost)-stamp-3stage-checked ; \
335 else \
336 true ; \
337 fi
543cf4ac
DZ
338 @echo done at `date`
339
c676f606
DZ
340native:
341 @echo build started at `date`
342 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c5a1c226
KC
343 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
344# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
21412832 345 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
346 @echo done at `date`
347
5ba00487
DZ
348build-cygnus:
349 @echo build started at `date`
350 @for i in $(TARGETS) ; do \
351 if [ "$$i" = "native" ] ; then \
352 if [ ! -f $(canonhost)-3stage-done ] ; then \
353 echo "3staging $(canonhost) native" ; \
21412832 354 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487 355 echo " completed successfully" ; \
1900e815 356 fi ; \
5ba00487 357 else \
13ec8aad 358 echo "building $(canonhost) cross to $$i:" `date` ; \
f74859e4 359 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
5ba00487
DZ
360 echo " completed successfully" ; \
361 fi ; \
362 done
363 @echo done at `date`
364
39ad69d8
DZ
365build-latest:
366 @echo build started at `date`
367 @for i in $(TARGETS) ; do \
368 if [ "$$i" != "native" ] ; then \
369 echo "building $(canonhost) cross to $$i:" `date` ; \
370 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
371 echo " completed successfully" ; \
372 fi ; \
373 done
374 @echo done at `date`
375
543cf4ac
DZ
376all-native:
377 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
378 rm -f $(ROOTING)/$(RELEASE_TAG)
379 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
380 @for i in $(TARGETS) ; do \
381 echo "building $(canonhost) cross to $$i" ; \
f74859e4 382 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
543cf4ac
DZ
383 echo " completed successfully" ; \
384 done
385
60986901
ILT
386all-cross:
387 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
a9377e86
ILT
388 rm -f $(ROOTING)/$(RELEASE_TAG)
389 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
60986901
ILT
390 @for i in $(TARGETS) ; do \
391 echo "building $(canonhost) cross to $$i" ; \
f74859e4 392 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
60986901
ILT
393 echo " completed successfully" ; \
394 done
395
8456a631
KC
396do-dos:
397 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
398all-dos:
399 @for i in $(TARGETS) ; do \
400 echo "building $(canonhost) cross to $$i" ; \
055cc3ff 401 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
8456a631
KC
402 echo " completed successfully at `date`" ; \
403 done
404
543cf4ac
DZ
405config:
406 @for i in $(TARGETS) ; do \
407 if [ "$$i" = "native" ] ; then \
408 echo "config stage1 for $(canonhost)" ; \
409 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
410 echo " completed successfully" ; \
411 else \
412 echo "config $(canonhost) cross to $$i" ; \
f74859e4 413 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
543cf4ac
DZ
414 echo " completed successfully" ; \
415 fi ; \
416 done
417
418
419build:
420 @for i in $(TARGETS) ; do \
421 if [ "$$i" = "native" ] ; then \
422 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
423 echo " completed successfully" ; \
424 else \
425 echo "building $(canonhost) cross to $$i" ; \
c262769a 426 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
543cf4ac
DZ
427 echo " completed successfully" ; \
428 fi ; \
429 done
430
431
4323build:
433 @for i in $(TARGETS) ; do \
434 if [ "$$i" = "native" ] ; then \
435 echo "building 3stage for $(canonhost)" ; \
436 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
437 echo " completed successfully" ; \
438 else \
439 echo "building $(canonhost) cross to $$i" ; \
f74859e4 440 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
543cf4ac
DZ
441 echo " completed successfully" ; \
442 fi ; \
443 done
444
87c6c079
DZ
445build-all-latest:
446 @for i in $(TARGETS) ; do \
447 if [ "$$i" = "native" ] ; then \
448 echo "building 3stage for $(canonhost)" ; \
449 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
450 echo " completed successfully" ; \
451 else \
452 echo "building $(canonhost) cross to $$i" ; \
453 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
454 echo " completed successfully" ; \
455 fi ; \
456 done
457
44c1515d
DE
458clean:
459 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
460
543cf4ac
DZ
461### Local Variables:
462### fill-column: 131
463### End:
This page took 0.118786 seconds and 4 git commands to generate.