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