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