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