Commit | Line | Data |
---|---|---|
50d2bb5b | 1 | configdirs="doc" |
912e0732 RP |
2 | srcname="GDB" |
3 | srctrigger=main.c | |
bc028766 RP |
4 | target_dependent=true |
5 | ||
0df06ca0 RP |
6 | # per-host: |
7 | ||
6c815bbe RP |
8 | # map host info into gdb names. |
9 | ||
10 | case "${host_cpu}" in | |
11 | ||
12 | m68k) | |
13 | case "${host_vendor}" in | |
b159ce3f SEF |
14 | apollo*) |
15 | case "${host_os}" in | |
16 | sysv*) gdb_host=apollo68v ;; | |
17 | esac | |
18 | ;; | |
6c815bbe RP |
19 | att) gdb_host=3b1 ;; |
20 | altos) | |
21 | case "${host_os}" in | |
22 | gas) gdb_host=altosgas ;; | |
23 | *) gdb_host=altos ;; | |
24 | esac | |
25 | ;; | |
afe4ca15 JG |
26 | |
27 | cbm) | |
28 | case ${host_os} in | |
29 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 30 | sysv4*) gdb_host=amix ;; |
afe4ca15 JG |
31 | esac |
32 | ;; | |
33 | ||
6c815bbe RP |
34 | hp) |
35 | case ${host_os} in | |
36 | hpux) gdb_host=hp300hpux ;; | |
37 | bsd) gdb_host=hp300bsd ;; | |
38 | esac | |
39 | ;; | |
40 | ||
41 | isi) gdb_host=isi ;; | |
42 | sony) gdb_host=news ;; | |
43 | sun) | |
44 | case "${host_os}" in | |
45 | sunos3) gdb_host=sun3os3 ;; | |
46 | sunos4) gdb_host=sun3os4 ;; | |
47 | *) gdb_host=sun3 ;; | |
48 | esac | |
49 | ;; | |
50 | esac | |
51 | ;; | |
52 | ||
53 | m68000) | |
54 | case "${host_vendor}" in | |
55 | sun) | |
56 | case "${host_os}" in | |
57 | sunos3) gdb_host=sun2os3 ;; | |
58 | sunos4) gdb_host=sun2os4 ;; | |
59 | *) gdb_host=sun2 ;; | |
60 | esac | |
61 | esac | |
62 | ;; | |
63 | ||
64 | sparc) | |
65 | case "${host_os}" in | |
f9e3b3cc JG |
66 | sunos3) gdb_host=sun4os3 ;; |
67 | sunos4) gdb_host=sun4os4 ;; | |
68 | sunos5*|sysv4*) gdb_host=sun4os5 ;; | |
69 | *) gdb_host=sun4 ;; | |
6c815bbe RP |
70 | esac |
71 | ;; | |
72 | ||
73 | m68030) | |
74 | case "${host_vendor}" in | |
75 | sony) gdb_host=news1000 ;; | |
76 | esac | |
77 | ;; | |
78 | ||
79 | mips) | |
80 | case "${host_vendor}" in | |
81 | sony) gdb_host=bigmips ;; | |
5d2cfefe | 82 | dec) gdb_host=decstation ;; |
6c815bbe | 83 | little) gdb_host=littlemips ;; |
407a8389 SG |
84 | sgi) |
85 | case "${host_os}" in | |
88f36033 | 86 | irix3) gdb_host=irix3 ;; |
407a8389 SG |
87 | irix4) gdb_host=irix4 ;; |
88 | esac | |
89 | ;; | |
6c815bbe RP |
90 | esac |
91 | ;; | |
92 | ||
be9a2362 FF |
93 | i860) |
94 | gdb_host=stratus | |
95 | ;; | |
96 | ||
6c815bbe RP |
97 | i386) |
98 | case "${host_vendor}" in | |
99 | sun) gdb_host=sun386 ;; | |
100 | sco) gdb_host=i386sco ;; | |
101 | sequent) gdb_host=symmetry ;; | |
4db8e515 | 102 | ncr) gdb_host=ncr3000 ;; |
6c815bbe RP |
103 | *) |
104 | case "${host_os}" in | |
6c815bbe | 105 | sysv32) gdb_host=i386v32 ;; |
ee1ad69c FF |
106 | sysv4*) gdb_host=i386v4 ;; |
107 | sysv*) gdb_host=i386v ;; | |
92732c27 | 108 | scosysv*) gdb_host=i386sco ;; |
6617b94e | 109 | mach) gdb_host=i386mach ;; |
6c815bbe RP |
110 | esac |
111 | ;; | |
112 | esac | |
113 | ;; | |
114 | ||
115 | c1 | c2) gdb_host=convex ;; | |
116 | ||
117 | ns32k) | |
118 | case "${host_vendor}" in | |
119 | umax) gdb_host=umax ;; | |
120 | esac | |
121 | ;; | |
122 | ||
0476df73 | 123 | romp) |
473f3318 JG |
124 | gdb_host=rtbsd |
125 | ;; | |
126 | ||
b90c4f33 JG |
127 | rs6000) |
128 | gdb_host=rs6000 | |
129 | ;; | |
130 | ||
473f3318 JG |
131 | a29k) |
132 | gdb_host=ultra3 | |
133 | ;; | |
134 | ||
8c7ae4a2 SC |
135 | m88k) |
136 | case "${host_vendor}" in | |
137 | motorola) | |
138 | gdb_host=delta88 ;; | |
139 | *) | |
140 | gdb_host=m88k ;; | |
141 | esac | |
142 | ;; | |
143 | ||
9e8bf29a SG |
144 | vax) |
145 | case "${host_os}" in | |
146 | bsd*) | |
147 | gdb_host=vaxbsd ;; | |
148 | ultrix*) | |
149 | gdb_host=vaxult ;; | |
150 | esac | |
151 | ;; | |
152 | ||
153 | arm | merlin | none | np1 | pn | pyramid | tahoe) | |
473f3318 JG |
154 | gdb_host=${host_cpu} |
155 | ;; | |
6c815bbe RP |
156 | |
157 | ### unhandled hosts | |
158 | #altosgas | |
159 | #i386v-g | |
160 | #i386v32-g | |
161 | ||
162 | esac | |
163 | ||
8c7ae4a2 | 164 | |
fe7ca711 | 165 | if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then |
6c815bbe | 166 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
167 | exit 1 |
168 | fi | |
169 | ||
bdf3621b | 170 | # We really shouldn't depend on there being a space after XM_FILE= ... |
fe7ca711 | 171 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh` |
912e0732 | 172 | |
0df06ca0 | 173 | # per-target: |
912e0732 | 174 | |
6c815bbe RP |
175 | case "${target_cpu}" in |
176 | ||
177 | m68k) | |
178 | case "${target_vendor}" in | |
179 | att) gdb_target=3b1 ;; | |
180 | altos) gdb_target=altos ;; | |
afe4ca15 JG |
181 | cbm) |
182 | case ${target_os} in | |
183 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 184 | sysv4*) gdb_target=amix ;; |
afe4ca15 JG |
185 | esac |
186 | ;; | |
6c815bbe RP |
187 | hp) |
188 | case "${target_os}" in | |
189 | bsd) gdb_target=hp300bsd ;; | |
190 | hpux) gdb_target=hp300hpux ;; | |
191 | esac | |
192 | ;; | |
193 | sun) | |
194 | case "${target_os}" in | |
195 | sunos3) gdb_target=sun3os3 ;; | |
196 | sunos4) gdb_target=sun3os4 ;; | |
197 | *) gdb_target=sun3 ;; | |
198 | esac | |
199 | ;; | |
200 | wrs) gdb_target=vxworks68 ;; | |
201 | isi) gdb_target=isi ;; | |
202 | sony) gdb_target=news ;; | |
203 | esac | |
b159ce3f SEF |
204 | case "${target_os}" in |
205 | os68k) gdb_target=os68k ;; | |
206 | esac | |
6c815bbe RP |
207 | ;; |
208 | ||
209 | m68000) | |
210 | case "${target_vendor}" in | |
211 | sun) | |
212 | case "${target_os}" in | |
213 | sunos3) gdb_target=sun2os3 ;; | |
214 | sunos4) gdb_target=sun2os4 ;; | |
215 | *) gdb_target=sun2 ;; | |
216 | esac | |
217 | esac | |
218 | ;; | |
219 | ||
220 | m68030) | |
221 | case "${target_vendor}" in | |
222 | sony) gdb_target=news1000 ;; | |
223 | esac | |
224 | ;; | |
225 | ||
8c7ae4a2 | 226 | none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin) |
6c815bbe | 227 | gdb_target=${target_cpu} ;; |
6c815bbe | 228 | |
8c7ae4a2 SC |
229 | m88k) |
230 | case "${target_vendor}" in | |
231 | motorola) gdb_target=delta88 ;; | |
232 | *) gdb_target=dgux ;; | |
233 | esac | |
234 | ;; | |
473f3318 JG |
235 | a29k) |
236 | case "${target_os}" in | |
f74ff50f | 237 | none|aout|coff) gdb_target=a29k ;; |
473f3318 JG |
238 | sym1) gdb_target=ultra3 ;; |
239 | kern) gdb_target=a29k-kern ;; | |
44e4e473 | 240 | ebmon) gdb_target=a29k;; |
0857b46a | 241 | udi) gdb_target=a29k-udi;; |
473f3318 JG |
242 | esac |
243 | ;; | |
244 | ||
6c815bbe RP |
245 | mips) |
246 | case "${target_vendor}" in | |
247 | sony) gdb_target=bigmips ;; | |
069bc454 | 248 | big) gdb_target=bigmips ;; |
5d2cfefe | 249 | dec) gdb_target=decstation ;; |
6c815bbe | 250 | little) gdb_target=littlemips ;; |
625453dc | 251 | sgi) gdb_target=irix3 ;; |
6c815bbe RP |
252 | esac |
253 | ;; | |
254 | ||
255 | c1 | c2) gdb_target=convex ;; | |
256 | ||
6c815bbe RP |
257 | sparc) |
258 | case "${target_vendor}" in | |
259 | sun) | |
260 | case "${target_os}" in | |
f9e3b3cc JG |
261 | sunos3) gdb_target=sun4os3 ;; |
262 | sunos4) gdb_target=sun4os4 ;; | |
263 | sunos5|sysv4*) gdb_target=sun4os5 ;; | |
264 | *) gdb_target=sun4 ;; | |
6c815bbe RP |
265 | esac |
266 | ;; | |
267 | esac | |
268 | ;; | |
269 | ||
ce7730d6 | 270 | h8300) |
8174b2af | 271 | gdb_target=h8300hms |
ce7730d6 | 272 | ;; |
6c815bbe | 273 | |
be9a2362 FF |
274 | i860) gdb_target=stratus |
275 | ;; | |
276 | ||
6c815bbe RP |
277 | i386) |
278 | case "${target_vendor}" in | |
69e87de2 RP |
279 | sco) gdb_target=i386sco ;; |
280 | sun) gdb_target=sun386 ;; | |
6c815bbe | 281 | sequent) gdb_target=symmetry ;; |
4db8e515 | 282 | ncr) gdb_target=ncr3000 ;; |
6c815bbe RP |
283 | *) |
284 | case "${target_os}" in | |
6c815bbe | 285 | sysv32) gdb_target=i386v32 ;; |
92732c27 | 286 | scosysv3*) gdb_target=i386v32 ;; |
ee1ad69c FF |
287 | sysv4*) gdb_target=i386v4 ;; |
288 | sysv*) gdb_target=i386v ;; | |
6617b94e | 289 | mach) gdb_target=i386mach ;; |
2b61280a JG |
290 | coff) gdb_target=i386v ;; |
291 | aout) gdb_target=i386aout ;; | |
6c815bbe RP |
292 | esac |
293 | esac | |
294 | ;; | |
295 | ||
296 | i960) | |
297 | case "${target_vendor}" in | |
69e87de2 RP |
298 | bout | wrs) gdb_target=vxworks960 ;; |
299 | coff | intel) gdb_target=nindy960 ;; | |
6c815bbe RP |
300 | esac |
301 | ;; | |
302 | ||
303 | ns32k) | |
304 | case "${target_vendor}" in | |
305 | utek) gdb_target=umax ;; | |
306 | esac | |
307 | ;; | |
308 | ||
b90c4f33 JG |
309 | rs6000) |
310 | gdb_target=rs6000 | |
311 | ;; | |
312 | ||
6c815bbe RP |
313 | ### unhandled targets |
314 | # altosgas | |
315 | # i386v-g | |
316 | # i386v32-g | |
317 | ||
318 | esac | |
319 | ||
fe7ca711 | 320 | if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then |
6c815bbe | 321 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
322 | exit 1 |
323 | fi | |
324 | ||
325 | if [ -z "${removing}" ] ; then | |
fe7ca711 | 326 | cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" { |
912e0732 RP |
327 | print substr($0,6)}' |
328 | fi | |
329 | ||
bdf3621b | 330 | # We really shouldn't depend on there being a space after TM_FILE= ... |
fe7ca711 | 331 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt` |
912e0732 | 332 | |
fe7ca711 SC |
333 | host_makefile_frag=config/${gdb_host}.mh |
334 | target_makefile_frag=config/${gdb_target}.mt | |
912e0732 | 335 | |
bdf3621b | 336 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the |
dc0c3f64 JG |
337 | # ?config/* file, we don't make the corresponding links. But we have |
338 | # to remove the xm.h files and tm.h files anyway, e.g. when switching | |
339 | # from "configure host" to "configure none". | |
bdf3621b JG |
340 | files= |
341 | links= | |
dc0c3f64 | 342 | rm -f xm.h |
bdf3621b JG |
343 | if [ "${hostfile}" != "" ]; then |
344 | files="${files} ${hostfile}" | |
345 | links="${links} xm.h" | |
346 | fi | |
dc0c3f64 | 347 | rm -f tm.h |
bdf3621b JG |
348 | if [ "${targetfile}" != "" ]; then |
349 | files="${files} ${targetfile}" | |
350 | links="${links} tm.h" | |
351 | fi | |
352 | ||
353 | # post-target: | |
912e0732 | 354 | |
bdf3621b JG |
355 | case ${srcdir} in |
356 | .) | |
357 | ;; | |
358 | *) | |
359 | grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \ | |
360 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
361 | esac | |
362 | ||
dc0c3f64 | 363 | cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile |