* Enable backtracing from inside a SOM shared library back into
[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
BC
135 sparclite-coff z8k-coff \
136 OSE68000 OSE68k
137# The OSE68000 and OSE68k targets are for Ericsson only.
a846e83d 138GCC = gcc -O2 -pipe
543cf4ac
DZ
139all: all-cygnus
140endif
141
142ifeq ($(canonhost),m68k-sun-sunos4.1.1)
32480238 143TARGETS = $(NATIVE) \
a4c50dd0 144 m68k-coff
a846e83d 145GCC = gcc -O2 -msoft-float
7cc2923a 146CC = cc -J
543cf4ac
DZ
147all: all-cygnus
148endif
149
150ifeq ($(canonhost),sparc-sun-solaris2)
32480238 151TARGETS = $(NATIVE) \
d5b2cb76 152 a29k-amd-udi \
87fa4c38 153 i960-vxworks5.0 i960-vxworks5.1 \
8456a631 154 m68k-aout m68k-coff m68k-vxworks \
87fa4c38 155 mipsel-idt-ecoff sparc-lynx \
e3f6f4cf
BC
156 sparclite-aout sparclite-coff m88k-coff z8k-coff \
157 OSE68000 OSE68k \
158 sparc-sun-sunos4.1.3
159# The latter assures that BNR's special build (which they now
160# do for themselves from sources) hasn't developed bit-rot.
161# The OSE68000 and OSE68k targets are for Ericsson only.
162
6d98b3d2 163CC = cc -Xs
a846e83d 164GCC = gcc -O2 -pipe
543cf4ac
DZ
165all: all-cygnus
166endif
167
168ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8 169TARGETS = $(NATIVE) m68k-aout
872ff7ef 170CC = cc -Wf,-XNg1000
543cf4ac
DZ
171all: all-cygnus
172endif
173
87fa4c38
KC
174ifeq ($(canonhost),alpha-dec-osf1.3)
175TARGETS = $(NATIVE)
176CC = cc
177all: all-cygnus
178endif
179
543cf4ac 180ifeq ($(canonhost),mips-sgi-irix4)
89745e93 181TARGETS = $(NATIVE) \
055cc3ff
KC
182 mips-idt-ecoff sh-hms \
183 mips64-elf
fea15001 184CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
543cf4ac
DZ
185all: all-cygnus
186endif
187
175e702b
KC
188ifeq ($(canonhost),mips-sgi-irix5)
189TARGETS = $(NATIVE) \
190 mips-idt-ecoff sh-hms \
191 mips64-elf
192CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
193all: all-cygnus
194endif
195
543cf4ac 196ifeq ($(canonhost),rs6000-ibm-aix)
32480238 197TARGETS = $(NATIVE) \
87fa4c38 198 i960-vxworks5.0 i960-vxworks5.1 \
a4c50dd0 199 m68k-aout
543cf4ac
DZ
200all: all-cygnus
201endif
202
203ifeq ($(canonhost),m68k-hp-hpux)
07be0634 204TARGETS = $(NATIVE) m68k-aout
e37dbf93 205TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
32480238
DZ
206CC = cc -Wp,-P
207#CFLAGS = +O1000
87fa4c38 208CFLAGS = -g
eb0293dc 209all: all-cygnus
543cf4ac
DZ
210endif
211
212ifeq ($(canonhost),hppa1.1-hp-hpux)
32480238 213TARGETS = \
d5b2cb76 214 $(NATIVE) \
87fa4c38
KC
215 i960-vxworks5.0 i960-vxworks5.1 \
216 m68k-aout m68k-coff m68k-vxworks \
217 z8k-coff
055cc3ff 218CC = cc -Wp,-H256000
32480238
DZ
219#CFLAGS = +Obb2000
220CFLAGS = -g
055cc3ff 221all: all-cygnus
543cf4ac
DZ
222endif
223
21412832
ILT
224ifeq ($(canonhost),i386-sco3.2v4)
225TARGETS = $(NATIVE) i386-aout
21412832
ILT
226all: all-cygnus
227endif
228
60986901 229ifeq ($(canonhost),i386-go32)
d5b2cb76 230TARGETS = \
32480238 231 a29k-amd-udi \
d5b2cb76
DZ
232 h8300-hms \
233 i386-aout \
32480238 234 m68k-aout m68k-coff \
d5b2cb76
DZ
235 mips-idt-ecoff \
236 sh-hms \
32480238 237 sparclite-aout
60986901 238CC = i386-go32-gcc
a846e83d 239GCC = i386-go32-gcc -O2
9823504d 240CFLAGS =
a846e83d 241CXXFLAGS = -O2
9823504d 242MAKEINFOFLAGS = --no-split
055cc3ff 243all: all-dos
60986901
ILT
244endif
245
7f82101d 246ifeq ($(canonhost),i386-sysv4.2)
a4c50dd0 247TARGETS = $(NATIVE) i386-netware
32480238
DZ
248CC = cc
249all: all-cygnus
250endif
251
8456a631 252ifeq ($(canonhost),i386-lynx)
f358c814 253TARGETS = $(NATIVE)
756b40d5 254CC = /usr/cygnus/progressive/bin/gcc
f358c814 255all: all-cygnus
fb682d69 256SHELL=/bin/bash
f358c814
DZ
257endif
258
8456a631 259ifeq ($(canonhost),m68k-lynx)
f358c814 260TARGETS = $(NATIVE)
756b40d5 261CC = /usr/cygnus/progressive/bin/gcc
f358c814 262all: all-cygnus
fb682d69 263SHELL=/bin/bash
f358c814
DZ
264endif
265
055cc3ff
KC
266ifeq ($(canonhost),sparc-lynx)
267TARGETS = $(NATIVE)
756b40d5 268CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
269all: all-cygnus
270SHELL=/bin/bash
271endif
272
273ifeq ($(canonhost),rs6000-lynx)
274TARGETS = $(NATIVE)
b5775df3 275CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
276all: all-cygnus
277SHELL=/bin/bash
278endif
279
543cf4ac
DZ
280FLAGS_TO_PASS := \
281 "GCC=$(GCC)" \
7cc2923a 282 "CC=$(CC)" \
543cf4ac 283 "CFLAGS=$(CFLAGS)" \
e87f9243 284 "CXXFLAGS=$(CXXFLAGS)" \
12eda620 285 "host=$(canonhost)" \
9823504d 286 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
fb682d69
ME
287 "RELEASE_TAG=$(RELEASE_TAG)" \
288 "SHELL=$(SHELL)"
543cf4ac 289
7ae68194 290# set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
87fa4c38 291ifeq ($(patsubst %-lynx,lynx,$(canonhost)),lynx)
7ae68194
ME
292FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
293endif
294
57dfb584
DZ
295all-emacs:
296 @echo build started at `date`
297 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
f358c814 298 -rm -f $(ROOTING)/$(RELEASE_TAG)
022f8f67 299 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
08629ab8
DZ
300 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
301 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
57dfb584
DZ
302 @echo done at `date`
303
543cf4ac
DZ
304all-cygnus:
305 @echo build started at `date`
306 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c262769a 307 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
c5a1c226 308#
87fa4c38
KC
309# The following line to be used during regular progressive builds
310# to help developers test, but should be commented out for final
311# progressive build.
c5a1c226 312#
87fa4c38 313# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
543cf4ac
DZ
314 @for i in $(TARGETS) ; do \
315 if [ "$$i" = "native" ] ; then \
75217b36 316 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
543cf4ac 317 echo "3staging $(canonhost) native" ; \
87fa4c38 318 echo Flags passed to make: $(FLAGS_TO_PASS) ; \
21412832 319 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac 320 echo " completed successfully" ; \
75217b36
ILT
321 else \
322 true ; \
1900e815 323 fi ; \
543cf4ac
DZ
324 else \
325 echo "building $(canonhost) cross to $$i" ; \
f74859e4 326 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
543cf4ac
DZ
327 echo " completed successfully" ; \
328 fi ; \
329 done
0689f73a
ME
330 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
331 echo checking $(canonhost) native ; \
332 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
333 touch $(canonhost)-stamp-3stage-checked ; \
334 else \
335 true ; \
336 fi
543cf4ac
DZ
337 @echo done at `date`
338
c676f606
DZ
339native:
340 @echo build started at `date`
341 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c5a1c226
KC
342 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
343# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
21412832 344 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
345 @echo done at `date`
346
5ba00487
DZ
347build-cygnus:
348 @echo build started at `date`
349 @for i in $(TARGETS) ; do \
350 if [ "$$i" = "native" ] ; then \
351 if [ ! -f $(canonhost)-3stage-done ] ; then \
352 echo "3staging $(canonhost) native" ; \
21412832 353 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487 354 echo " completed successfully" ; \
1900e815 355 fi ; \
5ba00487 356 else \
13ec8aad 357 echo "building $(canonhost) cross to $$i:" `date` ; \
f74859e4 358 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
5ba00487
DZ
359 echo " completed successfully" ; \
360 fi ; \
361 done
362 @echo done at `date`
363
39ad69d8
DZ
364build-latest:
365 @echo build started at `date`
366 @for i in $(TARGETS) ; do \
367 if [ "$$i" != "native" ] ; then \
368 echo "building $(canonhost) cross to $$i:" `date` ; \
369 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
370 echo " completed successfully" ; \
371 fi ; \
372 done
373 @echo done at `date`
374
543cf4ac
DZ
375all-native:
376 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
377 rm -f $(ROOTING)/$(RELEASE_TAG)
378 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
379 @for i in $(TARGETS) ; do \
380 echo "building $(canonhost) cross to $$i" ; \
f74859e4 381 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
543cf4ac
DZ
382 echo " completed successfully" ; \
383 done
384
60986901
ILT
385all-cross:
386 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
a9377e86
ILT
387 rm -f $(ROOTING)/$(RELEASE_TAG)
388 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
60986901
ILT
389 @for i in $(TARGETS) ; do \
390 echo "building $(canonhost) cross to $$i" ; \
f74859e4 391 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
60986901
ILT
392 echo " completed successfully" ; \
393 done
394
8456a631
KC
395do-dos:
396 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
397all-dos:
398 @for i in $(TARGETS) ; do \
399 echo "building $(canonhost) cross to $$i" ; \
055cc3ff 400 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
8456a631
KC
401 echo " completed successfully at `date`" ; \
402 done
403
543cf4ac
DZ
404config:
405 @for i in $(TARGETS) ; do \
406 if [ "$$i" = "native" ] ; then \
407 echo "config stage1 for $(canonhost)" ; \
408 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
409 echo " completed successfully" ; \
410 else \
411 echo "config $(canonhost) cross to $$i" ; \
f74859e4 412 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
543cf4ac
DZ
413 echo " completed successfully" ; \
414 fi ; \
415 done
416
417
418build:
419 @for i in $(TARGETS) ; do \
420 if [ "$$i" = "native" ] ; then \
421 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
422 echo " completed successfully" ; \
423 else \
424 echo "building $(canonhost) cross to $$i" ; \
c262769a 425 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
543cf4ac
DZ
426 echo " completed successfully" ; \
427 fi ; \
428 done
429
430
4313build:
432 @for i in $(TARGETS) ; do \
433 if [ "$$i" = "native" ] ; then \
434 echo "building 3stage for $(canonhost)" ; \
435 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
436 echo " completed successfully" ; \
437 else \
438 echo "building $(canonhost) cross to $$i" ; \
f74859e4 439 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
543cf4ac
DZ
440 echo " completed successfully" ; \
441 fi ; \
442 done
443
87c6c079
DZ
444build-all-latest:
445 @for i in $(TARGETS) ; do \
446 if [ "$$i" = "native" ] ; then \
447 echo "building 3stage for $(canonhost)" ; \
448 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
449 echo " completed successfully" ; \
450 else \
451 echo "building $(canonhost) cross to $$i" ; \
452 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
453 echo " completed successfully" ; \
454 fi ; \
455 done
456
44c1515d
DE
457clean:
458 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
459
543cf4ac
DZ
460### Local Variables:
461### fill-column: 131
462### End:
This page took 0.105251 seconds and 4 git commands to generate.