]>
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 | |
543cf4ac DZ |
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)) | |
12eda620 ILT |
29 | |
30 | # Convert config.guess results to a simpler form. | |
89da237f ILT |
31 | ifeq ($(canonhost),sparc-sun-solaris2.1) |
32 | canonhost := sparc-sun-solaris2 | |
33 | endif | |
12eda620 ILT |
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 | |
db526bd7 ILT |
40 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
41 | canonhost := rs6000-ibm-aix | |
42 | endif | |
12eda620 | 43 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
44 | canonhost := i386-sco3.2v4 |
45 | endif | |
60986901 ILT |
46 | ifeq ($(canonhost),i386-unknown-go32) |
47 | canonhost := i386-go32 | |
48 | endif | |
543cf4ac DZ |
49 | |
50 | ifeq ($(canonhost),sparc-sun-sunos4.1.1) | |
28fcc54f ILT |
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 | |
543cf4ac DZ |
56 | all: all-cygnus |
57 | endif | |
58 | ||
59 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
e110c2a8 | 60 | TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff |
e37dbf93 | 61 | GCC = gcc -O -msoft-float |
7cc2923a | 62 | CC = cc -J |
543cf4ac DZ |
63 | all: all-cygnus |
64 | endif | |
65 | ||
66 | ifeq ($(canonhost),sparc-sun-solaris2) | |
eb0293dc | 67 | TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout mips-idt-ecoff |
6d98b3d2 | 68 | CC = cc -Xs |
543cf4ac DZ |
69 | all: all-cygnus |
70 | endif | |
71 | ||
72 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 ILT |
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 | |
872ff7ef | 76 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
77 | all: all-cygnus |
78 | endif | |
79 | ||
80 | ifeq ($(canonhost),mips-sgi-irix4) | |
e110c2a8 | 81 | TARGETS = $(NATIVE) m68k-vxworks |
4cb66853 | 82 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500 |
543cf4ac DZ |
83 | all: all-cygnus |
84 | endif | |
85 | ||
86 | ifeq ($(canonhost),rs6000-ibm-aix) | |
e110c2a8 | 87 | TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks |
543cf4ac DZ |
88 | all: all-cygnus |
89 | endif | |
90 | ||
91 | ifeq ($(canonhost),m68k-hp-hpux) | |
eb0293dc | 92 | TARGETS = $(NATIVE) m68k-vxworks |
e37dbf93 | 93 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
543cf4ac | 94 | CC = cc +O1000 -Wp,-P |
e37dbf93 | 95 | CFLAGS = |
eb0293dc | 96 | all: all-cygnus |
543cf4ac DZ |
97 | endif |
98 | ||
99 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
eb0293dc | 100 | TARGETS = i960-vxworks m68k-aout m68k-vxworks m68k-hp-hpux |
b13a565e | 101 | #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi |
e110c2a8 ILT |
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 | |
e2af3c0a | 106 | CC = cc +Obb2000 |
26de3d0c | 107 | all: all-native |
543cf4ac DZ |
108 | endif |
109 | ||
21412832 ILT |
110 | ifeq ($(canonhost),i386-sco3.2v4) |
111 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
112 | all: all-cygnus |
113 | endif | |
114 | ||
60986901 ILT |
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 | ||
543cf4ac DZ |
126 | FLAGS_TO_PASS := \ |
127 | "GCC=$(GCC)" \ | |
7cc2923a | 128 | "CC=$(CC)" \ |
543cf4ac | 129 | "CFLAGS=$(CFLAGS)" \ |
e87f9243 | 130 | "CXXFLAGS=$(CXXFLAGS)" \ |
12eda620 | 131 | "host=$(canonhost)" \ |
022f8f67 | 132 | "RELEASE_TAG=$(RELEASE_TAG)" |
543cf4ac | 133 | |
57dfb584 DZ |
134 | all-emacs: |
135 | @echo build started at `date` | |
136 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
137 | rm -f $(ROOTING)/$(RELEASE_TAG) |
138 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
57dfb584 DZ |
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 | ||
543cf4ac DZ |
143 | all-cygnus: |
144 | @echo build started at `date` | |
145 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
146 | rm -f $(ROOTING)/$(RELEASE_TAG) |
147 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
148 | @for i in $(TARGETS) ; do \ |
149 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 150 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 151 | echo "3staging $(canonhost) native" ; \ |
21412832 | 152 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 153 | echo " completed successfully" ; \ |
75217b36 ILT |
154 | else \ |
155 | true ; \ | |
543cf4ac DZ |
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 | ||
c676f606 DZ |
165 | native: |
166 | @echo build started at `date` | |
167 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
168 | rm -f $(ROOTING)/$(RELEASE_TAG) |
169 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 170 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
171 | @echo done at `date` |
172 | ||
5ba00487 DZ |
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" ; \ | |
21412832 | 179 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
180 | echo " completed successfully" ; \ |
181 | fi \ | |
182 | else \ | |
13ec8aad | 183 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
5ba00487 DZ |
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 | ||
543cf4ac DZ |
190 | all-native: |
191 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
192 | rm -f $(ROOTING)/$(RELEASE_TAG) |
193 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
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 | ||
60986901 ILT |
200 | all-cross: |
201 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
202 | rm -f $(ROOTING)/$(RELEASE_TAG) |
203 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
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 | ||
543cf4ac DZ |
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 | ||
543cf4ac DZ |
250 | ### Local Variables: |
251 | ### fill-column: 131 | |
252 | ### End: |