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