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