* config.guess: For i[34]86-unknown-sysv4 use UNAME_MACHINE for
[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
022f8f67 11TEST_INSTALL_DISK = /cirdan/abc
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
21GCC = gcc -O
22CFLAGS = -g
543cf4ac
DZ
23
24log = 1>$(canonhost)-build-log 2>&1
25tlog = 1> $(canonhost)-x-$$i-build-log 2>&1
26
27canonhost := $(shell $(TREE)/config.sub $(host))
12eda620
ILT
28
29# Convert config.guess results to a simpler form.
30ifeq ($(canonhost),mips-dec-ultrix4.2)
31canonhost := mips-dec-ultrix
32endif
33ifeq ($(canonhost),mips-sgi-irix4.0.1)
34canonhost := mips-sgi-irix4
35endif
db526bd7
ILT
36ifeq ($(canonhost),rs6000-ibm-aix3.2)
37canonhost := rs6000-ibm-aix
38endif
12eda620 39ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
40canonhost := i386-sco3.2v4
41endif
60986901
ILT
42ifeq ($(canonhost),i386-unknown-go32)
43canonhost := i386-go32
44endif
543cf4ac
DZ
45
46ifeq ($(canonhost),sparc-sun-sunos4.1.1)
28fcc54f
ILT
47TARGETS = $(NATIVE) i386-go32 m68k-aout m68k-vxworks \
48 i960-intel-nindy i386-aout a29k-amd-udi \
49 sparc-vxworks m68k-coff i960-vxworks sparc-aout \
50 sparclite-aout sparclitefrwcompat-aout h8300-hms \
51 z8k-sim mips-idt-ecoff
543cf4ac
DZ
52all: all-cygnus
53endif
54
55ifeq ($(canonhost),m68k-sun-sunos4.1.1)
e110c2a8 56TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff
e37dbf93 57GCC = gcc -O -msoft-float
7cc2923a 58CC = cc -J
543cf4ac
DZ
59all: all-cygnus
60endif
61
62ifeq ($(canonhost),sparc-sun-solaris2)
eb0293dc 63TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout mips-idt-ecoff
6d98b3d2 64CC = cc -Xs
543cf4ac
DZ
65all: all-cygnus
66endif
67
68ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8
ILT
69TARGETS = $(NATIVE) m68k-aout
70# TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
71# sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
872ff7ef 72CC = cc -Wf,-XNg1000
543cf4ac
DZ
73all: all-cygnus
74endif
75
76ifeq ($(canonhost),mips-sgi-irix4)
e110c2a8 77TARGETS = $(NATIVE) m68k-vxworks
4cb66853 78CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
543cf4ac
DZ
79all: all-cygnus
80endif
81
82ifeq ($(canonhost),rs6000-ibm-aix)
e110c2a8 83TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks
543cf4ac
DZ
84all: all-cygnus
85endif
86
87ifeq ($(canonhost),m68k-hp-hpux)
eb0293dc 88TARGETS = $(NATIVE) m68k-vxworks
e37dbf93 89TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
543cf4ac 90CC = cc +O1000 -Wp,-P
e37dbf93 91CFLAGS =
eb0293dc 92all: all-cygnus
543cf4ac
DZ
93endif
94
95ifeq ($(canonhost),hppa1.1-hp-hpux)
eb0293dc 96TARGETS = i960-vxworks m68k-aout m68k-vxworks m68k-hp-hpux
b13a565e 97#TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
e110c2a8
ILT
98#TARGETS = m68k-aout i386-aout a29k-amd-udi \
99# i960-vxworks m68k-coff m68k-vxworks \
100# sparc-aout sparc-vxworks \
101# sparclite-aout sparclitefrwcompat-aout
e1b91f0b 102CC = cc
26de3d0c 103all: all-native
543cf4ac
DZ
104endif
105
21412832
ILT
106ifeq ($(canonhost),i386-sco3.2v4)
107TARGETS = $(NATIVE) i386-aout
21412832
ILT
108all: all-cygnus
109endif
110
60986901
ILT
111ifeq ($(canonhost),i386-go32)
112TARGETS = m68k-aout a29k-amd-udi m68k-coff i386-aout sparclite-aout \
113 h8300-sim mips-idt-ecoff
114ifndef build
115build := $(shell $(TREE)/config.guess)
116endif
117CC = i386-go32-gcc
118GCC = i386-go32-gcc -O
119all: all-cross
120endif
121
543cf4ac
DZ
122FLAGS_TO_PASS := \
123 "GCC=$(GCC)" \
7cc2923a 124 "CC=$(CC)" \
543cf4ac 125 "CFLAGS=$(CFLAGS)" \
12eda620 126 "host=$(canonhost)" \
022f8f67 127 "RELEASE_TAG=$(RELEASE_TAG)"
543cf4ac 128
57dfb584
DZ
129all-emacs:
130 @echo build started at `date`
131 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
132 rm -f $(ROOTING)/$(RELEASE_TAG)
133 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
57dfb584
DZ
134 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1
135 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1
136 @echo done at `date`
137
543cf4ac
DZ
138all-cygnus:
139 @echo build started at `date`
140 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
141 rm -f $(ROOTING)/$(RELEASE_TAG)
142 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
143 @for i in $(TARGETS) ; do \
144 if [ "$$i" = "native" ] ; then \
145 if [ ! -f $(canonhost)-3stage-done ] ; then \
146 echo "3staging $(canonhost) native" ; \
21412832 147 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac
DZ
148 echo " completed successfully" ; \
149 fi \
150 else \
151 echo "building $(canonhost) cross to $$i" ; \
152 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
153 echo " completed successfully" ; \
154 fi ; \
155 done
156 @echo done at `date`
157
c676f606
DZ
158native:
159 @echo build started at `date`
160 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
161 rm -f $(ROOTING)/$(RELEASE_TAG)
162 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
21412832 163 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
164 @echo done at `date`
165
5ba00487
DZ
166build-cygnus:
167 @echo build started at `date`
168 @for i in $(TARGETS) ; do \
169 if [ "$$i" = "native" ] ; then \
170 if [ ! -f $(canonhost)-3stage-done ] ; then \
171 echo "3staging $(canonhost) native" ; \
21412832 172 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487
DZ
173 echo " completed successfully" ; \
174 fi \
175 else \
13ec8aad 176 echo "building $(canonhost) cross to $$i:" `date` ; \
5ba00487
DZ
177 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
178 echo " completed successfully" ; \
179 fi ; \
180 done
181 @echo done at `date`
182
543cf4ac
DZ
183all-native:
184 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
185 rm -f $(ROOTING)/$(RELEASE_TAG)
186 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
187 @for i in $(TARGETS) ; do \
188 echo "building $(canonhost) cross to $$i" ; \
189 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
190 echo " completed successfully" ; \
191 done
192
60986901
ILT
193all-cross:
194 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
195 rm -f /usr/cygnus/$(TAG)
196 ln -s $(INSTALLDIR) /usr/cygnus/$(TAG)
197 @for i in $(TARGETS) ; do \
198 echo "building $(canonhost) cross to $$i" ; \
199 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(tlog) && \
200 echo " completed successfully" ; \
201 done
202
543cf4ac
DZ
203config:
204 @for i in $(TARGETS) ; do \
205 if [ "$$i" = "native" ] ; then \
206 echo "config stage1 for $(canonhost)" ; \
207 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
208 echo " completed successfully" ; \
209 else \
210 echo "config $(canonhost) cross to $$i" ; \
211 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
212 echo " completed successfully" ; \
213 fi ; \
214 done
215
216
217build:
218 @for i in $(TARGETS) ; do \
219 if [ "$$i" = "native" ] ; then \
220 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
221 echo " completed successfully" ; \
222 else \
223 echo "building $(canonhost) cross to $$i" ; \
224 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
225 echo " completed successfully" ; \
226 fi ; \
227 done
228
229
2303build:
231 @for i in $(TARGETS) ; do \
232 if [ "$$i" = "native" ] ; then \
233 echo "building 3stage for $(canonhost)" ; \
234 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
235 echo " completed successfully" ; \
236 else \
237 echo "building $(canonhost) cross to $$i" ; \
238 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
239 echo " completed successfully" ; \
240 fi ; \
241 done
242
543cf4ac
DZ
243### Local Variables:
244### fill-column: 131
245### End:
This page took 0.047318 seconds and 4 git commands to generate.