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