Tue Sep 14 14:34:45 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
[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#
7
8TREE = devo
9include $(TREE)/release-info
10
11TEST_INSTALL_DISK = /tug
12
13INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
14
15ifndef host
16host := $(shell $(TREE)/config.guess)
17endif
18
19NATIVE = native
20
21GCC = gcc -O
22CFLAGS = -g
23CXXFLAGS = -g -O
24MAKEINFOFLAGS =
25
26log = 1>$(canonhost)-build-log 2>&1
27cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
28natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
29
30canonhost := $(shell $(TREE)/config.sub $(host))
31
32# Convert config.guess results to a simpler form.
33ifeq ($(canonhost),sparc-sun-solaris2.1)
34canonhost := sparc-sun-solaris2
35endif
36ifeq ($(canonhost),mips-dec-ultrix4.2)
37canonhost := mips-dec-ultrix
38endif
39ifeq ($(canonhost),mips-sgi-irix4.0.1)
40canonhost := mips-sgi-irix4
41endif
42ifeq ($(canonhost),rs6000-ibm-aix3.2)
43canonhost := rs6000-ibm-aix
44endif
45ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
46canonhost := i386-sco3.2v4
47endif
48ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
49canonhost := i386-sco3.2v4
50endif
51ifeq ($(canonhost),i386-unknown-sco3.2v4)
52canonhost := i386-sco3.2v4
53endif
54ifeq ($(canonhost),i386-unknown-go32)
55canonhost := i386-go32
56endif
57ifeq ($(canonhost),i386-unknown-sysv4.2)
58canonhost := i386-sysv4.2
59endif
60ifeq ($(canonhost),i386-lynx-lynxos)
61canonhost := i386-lynxos
62endif
63ifeq ($(canonhost),m68k-lynx-lynxos)
64canonhost := m68k-lynxos
65endif
66
67ifeq ($(canonhost),sparc-sun-sunos4.1.3)
68TARGETS = $(NATIVE) \
69 i386-go32 \
70 a29k-amd-udi \
71 h8300-hms h8500-hms \
72 i386-aout i386-coff \
73 i960-intel-nindy i960-vxworks \
74 mips-idt-ecoff \
75 m68k-aout m68k-vxworks m68k-coff \
76 m88k-coff \
77 sh-hms \
78 sparc-aout sparc-vxworks sparclite-aout \
79 z8k-sim z8k-coff
80GCC = gcc -O -pipe
81all: all-cygnus
82endif
83
84ifeq ($(canonhost),m68k-sun-sunos4.1.1)
85TARGETS = $(NATIVE) \
86 i960-intel-nindy \
87 m68k-aout m68k-vxworks m68k-coff
88GCC = gcc -O -msoft-float
89CC = cc -J
90all: all-cygnus
91endif
92
93ifeq ($(canonhost),sparc-sun-solaris2)
94TARGETS = $(NATIVE) \
95 i386-aout \
96 i960-vxworks i960-intel-nindy \
97 m68k-aout m68k-coff m68k-vxworks \
98 mips-idt-ecoff \
99 sparc-aout sparc-vxworks sparclite-aout \
100 h8300-hms h8500-hms \
101 a29k-amd-udi \
102 i386-coff
103CC = cc -Xs
104GCC = gcc -O -pipe
105all: all-cygnus
106endif
107
108ifeq ($(canonhost),mips-dec-ultrix)
109TARGETS = $(NATIVE) m68k-aout
110CC = cc -Wf,-XNg1000
111all: all-cygnus
112endif
113
114ifeq ($(canonhost),mips-sgi-irix4)
115TARGETS = $(NATIVE) \
116 mips-idt-ecoff sh-hms
117CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
118all: all-cygnus
119endif
120
121ifeq ($(canonhost),rs6000-ibm-aix)
122TARGETS = $(NATIVE) \
123 i960-vxworks i960-intel-nindy \
124 m68k-aout m68k-vxworks
125# a29k-amd-udi \
126# h8300-hms h8500-hms \
127# i386-aout i386-coff \
128# mips-idt-ecoff \
129# m68k-coff \
130# m88k-coff \
131# sh-hms \
132# sparc-aout sparc-vxworks sparclite-aout \
133# z8k-sim z8k-coff
134all: all-cygnus
135endif
136
137ifeq ($(canonhost),m68k-hp-hpux)
138TARGETS = $(NATIVE) m68k-aout
139TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
140CC = cc -Wp,-P
141#CFLAGS = +O1000
142CFLAGS =
143all: all-cygnus
144endif
145
146ifeq ($(canonhost),hppa1.1-hp-hpux)
147TARGETS = \
148 i960-vxworks \
149 m68k-aout m68k-vxworks
150# sparc-aout sparc-vxworks sparclite-aout \
151# z8k-coff \
152# m88k-coff \
153# mips-idt-ecoff \
154# h8300-hms h8500-hms \
155# i386-aout i386-coff \
156# i960-intel-nindy \
157# m68k-coff \
158# a29k-amd-udi
159# sh-hms # doesn't work
160CC = cc
161#CFLAGS = +Obb2000
162CFLAGS = -g
163all: all-native
164endif
165
166ifeq ($(canonhost),i386-sco3.2v4)
167TARGETS = $(NATIVE) i386-aout
168all: all-cygnus
169endif
170
171ifeq ($(canonhost),i386-go32)
172TARGETS = \p
173 a29k-amd-udi \
174 h8300-hms h8500-hms \
175 i386-aout \
176 m68k-aout m68k-coff \
177 mips-idt-ecoff \
178 sh-hms \
179 sparclite-aout
180CC = i386-go32-gcc
181GCC = i386-go32-gcc -O
182CFLAGS =
183CXXFLAGS = -O
184MAKEINFOFLAGS = --no-split
185all: all-cross
186endif
187
188ifeq ($(canonhost),i386-sysv4.2)
189TARGETS = $(NATIVE)
190CC = cc
191all: all-cygnus
192endif
193
194#ifeq ($(canonhost),i386-sysv4.2)
195#TARGETS = $(NATIVE) \
196# a29k-amd-udi \
197# h8300-hms h8500-hms \
198# i386-aout i386-coff \
199# i960-intel-nindy i960-vxworks \
200# mips-idt-ecoff \
201# m68k-aout m68k-vxworks m68k-coff \
202# m88k-coff \
203# sh-hms \
204# sparc-aout sparc-vxworks sparclite-aout \
205# z8k-sim z8k-coff
206#CC = cc
207#all: all-cygnus
208#endif
209
210ifeq ($(canonhost),i386-lynxos)
211TARGETS = $(NATIVE)
212CC = /bin/gcc
213all: all-cygnus
214endif
215
216ifeq ($(canonhost),m68k-lynxos)
217TARGETS = $(NATIVE)
218CC = /bin/gcc
219all: all-cygnus
220endif
221
222
223FLAGS_TO_PASS := \
224 "GCC=$(GCC)" \
225 "CC=$(CC)" \
226 "CFLAGS=$(CFLAGS)" \
227 "CXXFLAGS=$(CXXFLAGS)" \
228 "host=$(canonhost)" \
229 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
230 "RELEASE_TAG=$(RELEASE_TAG)"
231
232all-emacs:
233 @echo build started at `date`
234 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
235 -rm -f $(ROOTING)/$(RELEASE_TAG)
236 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
237 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
238 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
239 @echo done at `date`
240
241all-cygnus:
242 @echo build started at `date`
243 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
244 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
245 @for i in $(TARGETS) ; do \
246 if [ "$$i" = "native" ] ; then \
247 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
248 echo "3staging $(canonhost) native" ; \
249 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
250 echo " completed successfully" ; \
251 else \
252 true ; \
253 fi \
254 else \
255 echo "building $(canonhost) cross to $$i" ; \
256 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
257 echo " completed successfully" ; \
258 fi ; \
259 done
260 @echo done at `date`
261
262native:
263 @echo build started at `date`
264 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
265 rm -f $(ROOTING)/$(RELEASE_TAG)
266 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
267 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
268 @echo done at `date`
269
270build-cygnus:
271 @echo build started at `date`
272 @for i in $(TARGETS) ; do \
273 if [ "$$i" = "native" ] ; then \
274 if [ ! -f $(canonhost)-3stage-done ] ; then \
275 echo "3staging $(canonhost) native" ; \
276 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
277 echo " completed successfully" ; \
278 fi \
279 else \
280 echo "building $(canonhost) cross to $$i:" `date` ; \
281 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
282 echo " completed successfully" ; \
283 fi ; \
284 done
285 @echo done at `date`
286
287all-native:
288 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
289 rm -f $(ROOTING)/$(RELEASE_TAG)
290 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
291 @for i in $(TARGETS) ; do \
292 echo "building $(canonhost) cross to $$i" ; \
293 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
294 echo " completed successfully" ; \
295 done
296
297all-cross:
298 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
299 rm -f $(ROOTING)/$(RELEASE_TAG)
300 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
301 @for i in $(TARGETS) ; do \
302 echo "building $(canonhost) cross to $$i" ; \
303 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
304 echo " completed successfully" ; \
305 done
306
307config:
308 @for i in $(TARGETS) ; do \
309 if [ "$$i" = "native" ] ; then \
310 echo "config stage1 for $(canonhost)" ; \
311 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
312 echo " completed successfully" ; \
313 else \
314 echo "config $(canonhost) cross to $$i" ; \
315 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
316 echo " completed successfully" ; \
317 fi ; \
318 done
319
320
321build:
322 @for i in $(TARGETS) ; do \
323 if [ "$$i" = "native" ] ; then \
324 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
325 echo " completed successfully" ; \
326 else \
327 echo "building $(canonhost) cross to $$i" ; \
328 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
329 echo " completed successfully" ; \
330 fi ; \
331 done
332
333
3343build:
335 @for i in $(TARGETS) ; do \
336 if [ "$$i" = "native" ] ; then \
337 echo "building 3stage for $(canonhost)" ; \
338 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
339 echo " completed successfully" ; \
340 else \
341 echo "building $(canonhost) cross to $$i" ; \
342 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
343 echo " completed successfully" ; \
344 fi ; \
345 done
346
347### Local Variables:
348### fill-column: 131
349### End:
This page took 0.022547 seconds and 4 git commands to generate.