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