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