Changes to support stabs-in-coff
[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 #
7
8 TREE = devo
9 include $(TREE)/release-info
10
11 TEST_INSTALL_DISK = /tug
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-unknown-sysv4.2)
58 canonhost := i386-sysv4.2
59 endif
60 ifeq ($(canonhost),i386-lynx-lynxos)
61 canonhost := i386-lynxos
62 endif
63 ifeq ($(canonhost),m68k-lynx-lynxos)
64 canonhost := m68k-lynxos
65 endif
66
67 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
68 TARGETS = $(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
80 GCC = gcc -O -pipe
81 all: all-cygnus
82 endif
83
84 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
85 TARGETS = $(NATIVE) \
86 i960-intel-nindy \
87 m68k-aout m68k-vxworks m68k-coff
88 GCC = gcc -O -msoft-float
89 CC = cc -J
90 all: all-cygnus
91 endif
92
93 ifeq ($(canonhost),sparc-sun-solaris2)
94 TARGETS = $(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
103 CC = cc -Xs
104 GCC = gcc -O -pipe
105 all: all-cygnus
106 endif
107
108 ifeq ($(canonhost),mips-dec-ultrix)
109 TARGETS = $(NATIVE) m68k-aout
110 CC = cc -Wf,-XNg1000
111 all: all-cygnus
112 endif
113
114 ifeq ($(canonhost),mips-sgi-irix4)
115 TARGETS = $(NATIVE) \
116 mips-idt-ecoff sh-hms
117 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
118 all: all-cygnus
119 endif
120
121 ifeq ($(canonhost),rs6000-ibm-aix)
122 TARGETS = $(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
134 all: all-cygnus
135 endif
136
137 ifeq ($(canonhost),m68k-hp-hpux)
138 TARGETS = $(NATIVE) m68k-aout
139 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
140 CC = cc -Wp,-P
141 #CFLAGS = +O1000
142 CFLAGS =
143 all: all-cygnus
144 endif
145
146 ifeq ($(canonhost),hppa1.1-hp-hpux)
147 TARGETS = \
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
160 CC = cc
161 #CFLAGS = +Obb2000
162 CFLAGS = -g
163 all: all-native
164 endif
165
166 ifeq ($(canonhost),i386-sco3.2v4)
167 TARGETS = $(NATIVE) i386-aout
168 all: all-cygnus
169 endif
170
171 ifeq ($(canonhost),i386-go32)
172 TARGETS = \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
180 CC = i386-go32-gcc
181 GCC = i386-go32-gcc -O
182 CFLAGS =
183 CXXFLAGS = -O
184 MAKEINFOFLAGS = --no-split
185 all: all-cross
186 endif
187
188 ifeq ($(canonhost),i386-sysv4.2)
189 TARGETS = $(NATIVE)
190 CC = cc
191 all: all-cygnus
192 endif
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
210 ifeq ($(canonhost),i386-lynxos)
211 TARGETS = $(NATIVE)
212 CC = /bin/gcc
213 all: all-cygnus
214 endif
215
216 ifeq ($(canonhost),m68k-lynxos)
217 TARGETS = $(NATIVE)
218 CC = /bin/gcc
219 all: all-cygnus
220 endif
221
222
223 FLAGS_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
232 all-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
241 all-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
262 native:
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
270 build-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
287 all-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
297 all-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
307 config:
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
321 build:
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
334 3build:
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.037981 seconds and 4 git commands to generate.