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