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