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