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