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