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