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