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