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 | |
f74859e4 DZ |
27 | cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1 |
28 | natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1 | |
543cf4ac DZ |
29 | |
30 | canonhost := $(shell $(TREE)/config.sub $(host)) | |
12eda620 ILT |
31 | |
32 | # Convert config.guess results to a simpler form. | |
89da237f ILT |
33 | ifeq ($(canonhost),sparc-sun-solaris2.1) |
34 | canonhost := sparc-sun-solaris2 | |
35 | endif | |
12eda620 ILT |
36 | ifeq ($(canonhost),mips-dec-ultrix4.2) |
37 | canonhost := mips-dec-ultrix | |
38 | endif | |
39 | ifeq ($(canonhost),mips-sgi-irix4.0.1) | |
40 | canonhost := mips-sgi-irix4 | |
41 | endif | |
db526bd7 ILT |
42 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
43 | canonhost := rs6000-ibm-aix | |
44 | endif | |
12eda620 | 45 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
46 | canonhost := i386-sco3.2v4 |
47 | endif | |
ec782faa DZ |
48 | ifeq ($(canonhost),i386-unknown-sco3.2v4.0) |
49 | canonhost := i386-sco3.2v4 | |
50 | endif | |
60986901 ILT |
51 | ifeq ($(canonhost),i386-unknown-go32) |
52 | canonhost := i386-go32 | |
53 | endif | |
f358c814 DZ |
54 | ifeq ($(canonhost),i386-lynx-lynxos) |
55 | canonhost := i386-lynxos | |
56 | endif | |
57 | ifeq ($(canonhost),m68k-lynx-lynxos) | |
58 | canonhost := m68k-lynxos | |
59 | endif | |
543cf4ac | 60 | |
32480238 DZ |
61 | ifeq ($(canonhost),sparc-sun-sunos4.1.3) |
62 | TARGETS = $(NATIVE) \ | |
63 | a29k-amd-udi \ | |
64 | h8300-hms h8500-hms \ | |
65 | i386-aout i386-go32 i386-coff \ | |
07be0634 | 66 | i960-intel-nindy i960-vxworks \ |
32480238 DZ |
67 | mips-idt-ecoff \ |
68 | m68k-aout m68k-vxworks m68k-coff \ | |
69 | m88k-coff \ | |
54278e28 | 70 | sh-hms \ |
07be0634 DZ |
71 | sparc-aout sparc-vxworks sparclite-aout \ |
72 | z8k-sim z8k-coff | |
32480238 | 73 | GCC = gcc -O -pipe |
543cf4ac DZ |
74 | all: all-cygnus |
75 | endif | |
76 | ||
77 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
32480238 DZ |
78 | TARGETS = $(NATIVE) \ |
79 | i960-intel-nindy \ | |
07be0634 | 80 | m68k-aout m68k-vxworks m68k-coff |
e37dbf93 | 81 | GCC = gcc -O -msoft-float |
7cc2923a | 82 | CC = cc -J |
543cf4ac DZ |
83 | all: all-cygnus |
84 | endif | |
85 | ||
86 | ifeq ($(canonhost),sparc-sun-solaris2) | |
32480238 DZ |
87 | TARGETS = $(NATIVE) \ |
88 | a29k-amd-udi \ | |
32480238 DZ |
89 | i386-aout \ |
90 | i960-vxworks i960-intel-nindy \ | |
07be0634 DZ |
91 | m68k-aout m68k-coff m68k-vxworks \ |
92 | mips-idt-ecoff \ | |
32480238 | 93 | sparc-aout sparc-vxworks sparclite-aout |
6d98b3d2 | 94 | CC = cc -Xs |
32480238 | 95 | GCC = gcc -O -pipe |
543cf4ac DZ |
96 | all: all-cygnus |
97 | endif | |
98 | ||
99 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 | 100 | TARGETS = $(NATIVE) m68k-aout |
872ff7ef | 101 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
102 | all: all-cygnus |
103 | endif | |
104 | ||
105 | ifeq ($(canonhost),mips-sgi-irix4) | |
f358c814 | 106 | TARGETS = $(NATIVE) sh-hms |
4cb66853 | 107 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500 |
543cf4ac DZ |
108 | all: all-cygnus |
109 | endif | |
110 | ||
111 | ifeq ($(canonhost),rs6000-ibm-aix) | |
32480238 DZ |
112 | TARGETS = $(NATIVE) \ |
113 | i960-vxworks i960-intel-nindy \ | |
114 | m68k-aout m68k-vxworks | |
543cf4ac DZ |
115 | all: all-cygnus |
116 | endif | |
117 | ||
118 | ifeq ($(canonhost),m68k-hp-hpux) | |
07be0634 | 119 | TARGETS = $(NATIVE) m68k-aout |
e37dbf93 | 120 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
32480238 DZ |
121 | CC = cc -Wp,-P |
122 | #CFLAGS = +O1000 | |
123 | CFLAGS = -g | |
eb0293dc | 124 | all: all-cygnus |
543cf4ac DZ |
125 | endif |
126 | ||
127 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
32480238 DZ |
128 | TARGETS = \ |
129 | i960-vxworks \ | |
130 | m68k-aout m68k-vxworks | |
131 | # a29k-amd-udi \ | |
132 | # h8300-hms h8500-hms \ | |
133 | # i386-aout i386-go32 \ | |
134 | # i960-vxworks i960-intel-nindy \ | |
135 | # mips-idt-ecoff \ | |
136 | # m68k-aout m68k-vxworks m68k-coff \ | |
137 | # m88k-coff \ | |
138 | # sparc-aout sparclite-aout \ | |
139 | # z8k-sim | |
140 | CC = cc | |
141 | #CFLAGS = +Obb2000 | |
142 | CFLAGS = -g | |
26de3d0c | 143 | all: all-native |
543cf4ac DZ |
144 | endif |
145 | ||
21412832 ILT |
146 | ifeq ($(canonhost),i386-sco3.2v4) |
147 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
148 | all: all-cygnus |
149 | endif | |
150 | ||
60986901 | 151 | ifeq ($(canonhost),i386-go32) |
32480238 DZ |
152 | TARGETS = \ |
153 | a29k-amd-udi \ | |
07be0634 | 154 | h8300-hms h8500-hms \ |
32480238 DZ |
155 | i386-aout \ |
156 | m68k-aout m68k-coff \ | |
157 | mips-idt-ecoff \ | |
07be0634 | 158 | sh-hms \ |
32480238 | 159 | sparclite-aout |
60986901 ILT |
160 | CC = i386-go32-gcc |
161 | GCC = i386-go32-gcc -O | |
9823504d ILT |
162 | CFLAGS = |
163 | CXXFLAGS = -O | |
164 | MAKEINFOFLAGS = --no-split | |
60986901 ILT |
165 | all: all-cross |
166 | endif | |
167 | ||
9805e2a6 | 168 | ifeq ($(canonhost),i386-univel-sysv4.2) |
32480238 DZ |
169 | TARGETS = $(NATIVE) |
170 | CC = cc | |
171 | all: all-cygnus | |
172 | endif | |
173 | ||
f358c814 DZ |
174 | ifeq ($(canonhost),i386-lynxos) |
175 | TARGETS = $(NATIVE) | |
176 | CC = /bin/gcc | |
177 | all: all-cygnus | |
178 | endif | |
179 | ||
180 | ifeq ($(canonhost),m68k-lynxos) | |
181 | TARGETS = $(NATIVE) | |
182 | CC = /bin/gcc | |
183 | all: all-cygnus | |
184 | endif | |
185 | ||
186 | ||
543cf4ac DZ |
187 | FLAGS_TO_PASS := \ |
188 | "GCC=$(GCC)" \ | |
7cc2923a | 189 | "CC=$(CC)" \ |
543cf4ac | 190 | "CFLAGS=$(CFLAGS)" \ |
e87f9243 | 191 | "CXXFLAGS=$(CXXFLAGS)" \ |
12eda620 | 192 | "host=$(canonhost)" \ |
9823504d | 193 | "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ |
022f8f67 | 194 | "RELEASE_TAG=$(RELEASE_TAG)" |
543cf4ac | 195 | |
57dfb584 DZ |
196 | all-emacs: |
197 | @echo build started at `date` | |
198 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
f358c814 | 199 | -rm -f $(ROOTING)/$(RELEASE_TAG) |
022f8f67 | 200 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
57dfb584 DZ |
201 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1 |
202 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1 | |
203 | @echo done at `date` | |
204 | ||
543cf4ac DZ |
205 | all-cygnus: |
206 | @echo build started at `date` | |
207 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
208 | rm -f $(ROOTING)/$(RELEASE_TAG) |
209 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
210 | @for i in $(TARGETS) ; do \ |
211 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 212 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 213 | echo "3staging $(canonhost) native" ; \ |
21412832 | 214 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 215 | echo " completed successfully" ; \ |
75217b36 ILT |
216 | else \ |
217 | true ; \ | |
543cf4ac DZ |
218 | fi \ |
219 | else \ | |
220 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 221 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \ |
543cf4ac DZ |
222 | echo " completed successfully" ; \ |
223 | fi ; \ | |
224 | done | |
225 | @echo done at `date` | |
226 | ||
c676f606 DZ |
227 | native: |
228 | @echo build started at `date` | |
229 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
230 | rm -f $(ROOTING)/$(RELEASE_TAG) |
231 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 232 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
233 | @echo done at `date` |
234 | ||
5ba00487 DZ |
235 | build-cygnus: |
236 | @echo build started at `date` | |
237 | @for i in $(TARGETS) ; do \ | |
238 | if [ "$$i" = "native" ] ; then \ | |
239 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
240 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 241 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
242 | echo " completed successfully" ; \ |
243 | fi \ | |
244 | else \ | |
13ec8aad | 245 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
f74859e4 | 246 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
5ba00487 DZ |
247 | echo " completed successfully" ; \ |
248 | fi ; \ | |
249 | done | |
250 | @echo done at `date` | |
251 | ||
543cf4ac DZ |
252 | all-native: |
253 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
254 | rm -f $(ROOTING)/$(RELEASE_TAG) |
255 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
256 | @for i in $(TARGETS) ; do \ |
257 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 258 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \ |
543cf4ac DZ |
259 | echo " completed successfully" ; \ |
260 | done | |
261 | ||
60986901 ILT |
262 | all-cross: |
263 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
264 | rm -f $(ROOTING)/$(RELEASE_TAG) |
265 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
266 | @for i in $(TARGETS) ; do \ |
267 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 268 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \ |
60986901 ILT |
269 | echo " completed successfully" ; \ |
270 | done | |
271 | ||
543cf4ac DZ |
272 | config: |
273 | @for i in $(TARGETS) ; do \ | |
274 | if [ "$$i" = "native" ] ; then \ | |
275 | echo "config stage1 for $(canonhost)" ; \ | |
276 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \ | |
277 | echo " completed successfully" ; \ | |
278 | else \ | |
279 | echo "config $(canonhost) cross to $$i" ; \ | |
f74859e4 | 280 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \ |
543cf4ac DZ |
281 | echo " completed successfully" ; \ |
282 | fi ; \ | |
283 | done | |
284 | ||
285 | ||
286 | build: | |
287 | @for i in $(TARGETS) ; do \ | |
288 | if [ "$$i" = "native" ] ; then \ | |
289 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \ | |
290 | echo " completed successfully" ; \ | |
291 | else \ | |
292 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 293 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(cyglog) && \ |
543cf4ac DZ |
294 | echo " completed successfully" ; \ |
295 | fi ; \ | |
296 | done | |
297 | ||
298 | ||
299 | 3build: | |
300 | @for i in $(TARGETS) ; do \ | |
301 | if [ "$$i" = "native" ] ; then \ | |
302 | echo "building 3stage for $(canonhost)" ; \ | |
303 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \ | |
304 | echo " completed successfully" ; \ | |
305 | else \ | |
306 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 307 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
543cf4ac DZ |
308 | echo " completed successfully" ; \ |
309 | fi ; \ | |
310 | done | |
311 | ||
543cf4ac DZ |
312 | ### Local Variables: |
313 | ### fill-column: 131 | |
314 | ### End: |