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