Commit | Line | Data |
---|---|---|
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 | 8 | TREE = devo |
022f8f67 | 9 | include $(TREE)/release-info |
543cf4ac | 10 | |
32480238 | 11 | TEST_INSTALL_DISK = /big |
543cf4ac | 12 | |
022f8f67 | 13 | INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG) |
543cf4ac | 14 | |
12eda620 ILT |
15 | ifndef host |
16 | host := $(shell $(TREE)/config.guess) | |
17 | endif | |
18 | ||
022f8f67 DZ |
19 | NATIVE = native |
20 | ||
e87f9243 ILT |
21 | GCC = gcc -O |
22 | CFLAGS = -g | |
23 | CXXFLAGS = -g -O | |
9823504d | 24 | MAKEINFOFLAGS = |
543cf4ac DZ |
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)) | |
12eda620 ILT |
30 | |
31 | # Convert config.guess results to a simpler form. | |
89da237f ILT |
32 | ifeq ($(canonhost),sparc-sun-solaris2.1) |
33 | canonhost := sparc-sun-solaris2 | |
34 | endif | |
12eda620 ILT |
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 | |
db526bd7 ILT |
41 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
42 | canonhost := rs6000-ibm-aix | |
43 | endif | |
12eda620 | 44 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
45 | canonhost := i386-sco3.2v4 |
46 | endif | |
60986901 ILT |
47 | ifeq ($(canonhost),i386-unknown-go32) |
48 | canonhost := i386-go32 | |
49 | endif | |
543cf4ac | 50 | |
32480238 DZ |
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 \ | |
54278e28 | 60 | sh-hms \ |
32480238 DZ |
61 | sparc-aout sparc-vxworks sparclitefrwcompat-aout sparclite-aout \ |
62 | z8k-sim | |
63 | GCC = gcc -O -pipe | |
543cf4ac DZ |
64 | all: all-cygnus |
65 | endif | |
66 | ||
67 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
32480238 DZ |
68 | TARGETS = $(NATIVE) \ |
69 | i960-intel-nindy \ | |
70 | m68k-aout m68k-vxworks m68k-coff i960 | |
e37dbf93 | 71 | GCC = gcc -O -msoft-float |
7cc2923a | 72 | CC = cc -J |
543cf4ac DZ |
73 | all: all-cygnus |
74 | endif | |
75 | ||
76 | ifeq ($(canonhost),sparc-sun-solaris2) | |
32480238 DZ |
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 | |
6d98b3d2 | 84 | CC = cc -Xs |
32480238 | 85 | GCC = gcc -O -pipe |
543cf4ac DZ |
86 | all: all-cygnus |
87 | endif | |
88 | ||
89 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 | 90 | TARGETS = $(NATIVE) m68k-aout |
872ff7ef | 91 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
92 | all: all-cygnus |
93 | endif | |
94 | ||
95 | ifeq ($(canonhost),mips-sgi-irix4) | |
32480238 | 96 | TARGETS = $(NATIVE) |
4cb66853 | 97 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500 |
543cf4ac DZ |
98 | all: all-cygnus |
99 | endif | |
100 | ||
101 | ifeq ($(canonhost),rs6000-ibm-aix) | |
32480238 DZ |
102 | TARGETS = $(NATIVE) \ |
103 | i960-vxworks i960-intel-nindy \ | |
104 | m68k-aout m68k-vxworks | |
543cf4ac DZ |
105 | all: all-cygnus |
106 | endif | |
107 | ||
108 | ifeq ($(canonhost),m68k-hp-hpux) | |
32480238 | 109 | TARGETS = $(NATIVE) |
e37dbf93 | 110 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
32480238 DZ |
111 | CC = cc -Wp,-P |
112 | #CFLAGS = +O1000 | |
113 | CFLAGS = -g | |
eb0293dc | 114 | all: all-cygnus |
543cf4ac DZ |
115 | endif |
116 | ||
117 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
32480238 DZ |
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 | |
26de3d0c | 133 | all: all-native |
543cf4ac DZ |
134 | endif |
135 | ||
21412832 ILT |
136 | ifeq ($(canonhost),i386-sco3.2v4) |
137 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
138 | all: all-cygnus |
139 | endif | |
140 | ||
60986901 | 141 | ifeq ($(canonhost),i386-go32) |
32480238 DZ |
142 | TARGETS = \ |
143 | a29k-amd-udi \ | |
144 | h8300-hms \ | |
145 | i386-aout \ | |
146 | m68k-aout m68k-coff \ | |
147 | mips-idt-ecoff \ | |
148 | sparclite-aout | |
60986901 ILT |
149 | CC = i386-go32-gcc |
150 | GCC = i386-go32-gcc -O | |
9823504d ILT |
151 | CFLAGS = |
152 | CXXFLAGS = -O | |
153 | MAKEINFOFLAGS = --no-split | |
60986901 ILT |
154 | all: all-cross |
155 | endif | |
156 | ||
32480238 DZ |
157 | ifeq ($(canonhost),i386-univel-sysv4) |
158 | TARGETS = $(NATIVE) | |
159 | CC = cc | |
160 | all: all-cygnus | |
161 | endif | |
162 | ||
543cf4ac DZ |
163 | FLAGS_TO_PASS := \ |
164 | "GCC=$(GCC)" \ | |
7cc2923a | 165 | "CC=$(CC)" \ |
543cf4ac | 166 | "CFLAGS=$(CFLAGS)" \ |
e87f9243 | 167 | "CXXFLAGS=$(CXXFLAGS)" \ |
12eda620 | 168 | "host=$(canonhost)" \ |
9823504d | 169 | "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ |
022f8f67 | 170 | "RELEASE_TAG=$(RELEASE_TAG)" |
543cf4ac | 171 | |
57dfb584 DZ |
172 | all-emacs: |
173 | @echo build started at `date` | |
174 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
175 | rm -f $(ROOTING)/$(RELEASE_TAG) |
176 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
57dfb584 DZ |
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 | ||
543cf4ac DZ |
181 | all-cygnus: |
182 | @echo build started at `date` | |
183 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
184 | rm -f $(ROOTING)/$(RELEASE_TAG) |
185 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
186 | @for i in $(TARGETS) ; do \ |
187 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 188 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 189 | echo "3staging $(canonhost) native" ; \ |
21412832 | 190 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 191 | echo " completed successfully" ; \ |
75217b36 ILT |
192 | else \ |
193 | true ; \ | |
543cf4ac DZ |
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 | ||
c676f606 DZ |
203 | native: |
204 | @echo build started at `date` | |
205 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
206 | rm -f $(ROOTING)/$(RELEASE_TAG) |
207 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 208 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
209 | @echo done at `date` |
210 | ||
5ba00487 DZ |
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" ; \ | |
21412832 | 217 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
218 | echo " completed successfully" ; \ |
219 | fi \ | |
220 | else \ | |
13ec8aad | 221 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
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 | ||
543cf4ac DZ |
228 | all-native: |
229 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
230 | rm -f $(ROOTING)/$(RELEASE_TAG) |
231 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
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 | ||
60986901 ILT |
238 | all-cross: |
239 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
240 | rm -f $(ROOTING)/$(RELEASE_TAG) |
241 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
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 | ||
543cf4ac DZ |
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 | ||
543cf4ac DZ |
288 | ### Local Variables: |
289 | ### fill-column: 131 | |
290 | ### End: |