8 # map host info into gdb names.
13 case "${host_vendor}" in
16 sysv*) gdb_host=apollo68v ;;
17 bsd*) gdb_host=apollo68b ;;
23 gas) gdb_host=altosgas ;;
30 amigados) gdb_host=amigados ;;
31 sysv4*) gdb_host=amix ;;
37 hpux) gdb_host=hp300hpux ;;
38 bsd) gdb_host=hp300bsd ;;
43 sony) gdb_host=news ;;
46 sunos3) gdb_host=sun3os3 ;;
47 sunos4) gdb_host=sun3os4 ;;
55 case "${host_vendor}" in
58 sunos3) gdb_host=sun2os3 ;;
59 sunos4) gdb_host=sun2os4 ;;
67 sunos3) gdb_host=sun4os3 ;;
68 sunos4) gdb_host=sun4os4 ;;
69 solaris2*) gdb_host=sun4sol2 ;;
75 case "${host_vendor}" in
76 sony) gdb_host=news1000 ;;
81 case "${host_vendor}" in
82 sony) gdb_host=bigmips ;;
83 dec) gdb_host=decstation ;;
84 little) gdb_host=littlemips ;;
87 irix3) gdb_host=irix3 ;;
88 irix4) gdb_host=irix4 ;;
99 case "${host_vendor}" in
100 sun) gdb_host=sun386 ;;
101 sco) gdb_host=i386sco ;;
102 sequent) gdb_host=symmetry ;;
103 ncr) gdb_host=ncr3000 ;;
106 go32) gdb_host=go32 ;;
107 sysv32) gdb_host=i386v32 ;;
108 sysv4*) gdb_host=i386v4 ;;
109 sysv*) gdb_host=i386v ;;
110 scosysv*) gdb_host=i386sco ;;
111 mach) gdb_host=i386mach ;;
112 linux) gdb_host=linux ;;
118 c1 | c2) gdb_host=convex ;;
121 case "${host_vendor}" in
122 umax) gdb_host=umax ;;
139 case "${host_vendor}" in
156 arm | merlin | none | np1 | pn | pyramid | tahoe)
161 case "${host_vendor}" in
164 hpux) gdb_host=hppahpux ;;
165 bsd) gdb_host=hppabsd ;;
179 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
180 echo '***' "Gdb does not support host ${host}" 1>&2
184 # We really shouldn't depend on there being a space after XM_FILE= ...
185 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
189 case "${target_cpu}" in
192 case "${target_vendor}" in
193 att) gdb_target=3b1 ;;
194 altos) gdb_target=altos ;;
197 amigados) gdb_host=amigados ;;
198 sysv4*) gdb_target=amix ;;
201 ericsson) gdb_target=es1800 ;;
203 case "${target_os}" in
204 bsd) gdb_target=hp300bsd ;;
205 hpux) gdb_target=hp300hpux ;;
209 case "${target_os}" in
210 sunos3) gdb_target=sun3os3 ;;
211 sunos4) gdb_target=sun3os4 ;;
212 *) gdb_target=sun3 ;;
215 wrs) gdb_target=vxworks68 ;;
216 isi) gdb_target=isi ;;
217 sony) gdb_target=news ;;
219 case "${target_os}" in
220 os68k) gdb_target=os68k ;;
225 case "${target_vendor}" in
227 case "${target_os}" in
228 sunos3) gdb_target=sun2os3 ;;
229 sunos4) gdb_target=sun2os4 ;;
230 *) gdb_target=sun2 ;;
233 ericsson) gdb_target=es1800 ;;
234 wrs) gdb_target=vxworks68 ;;
239 case "${target_vendor}" in
240 wrs) gdb_target=vxworks68 ;;
245 case "${target_vendor}" in
246 sony) gdb_target=news1000 ;;
247 wrs) gdb_target=vxworks68 ;;
252 case "${target_vendor}" in
253 tandem) gdb_target=st2000 ;;
257 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
258 gdb_target=${target_cpu} ;;
261 case "${target_vendor}" in
262 motorola) gdb_target=delta88 ;;
263 *) gdb_target=dgux ;;
267 case "${target_os}" in
268 none|aout|coff) gdb_target=a29k ;;
269 sym1) gdb_target=ultra3 ;;
270 kern) gdb_target=a29k-kern ;;
271 ebmon) gdb_target=a29k;;
272 udi) gdb_target=a29k-udi;;
277 case "${target_vendor}" in
278 sony) gdb_target=bigmips ;;
279 big) gdb_target=bigmips ;;
280 dec) gdb_target=decstation ;;
281 little) gdb_target=littlemips ;;
282 sgi) gdb_target=irix3 ;;
286 c1 | c2) gdb_target=convex ;;
289 case "${target_vendor}" in
291 case "${target_os}" in
292 sunos3) gdb_target=sun4os3 ;;
293 sunos4) gdb_target=sun4os4 ;;
294 solaris2*) gdb_target=sun4sol2 ;;
295 *) gdb_target=sun4 ;;
305 i860) gdb_target=stratus
309 case "${target_vendor}" in
310 sco) gdb_target=i386sco ;;
311 sun) gdb_target=sun386 ;;
312 sequent) gdb_target=symmetry ;;
313 ncr) gdb_target=ncr3000 ;;
315 case "${target_os}" in
316 sysv32) gdb_target=i386v32 ;;
317 scosysv3*) gdb_target=i386v32 ;;
318 sysv4*) gdb_target=i386v4 ;;
319 sysv*) gdb_target=i386v ;;
320 mach) gdb_target=i386mach ;;
321 coff) gdb_target=i386v ;;
322 aout) gdb_target=i386aout ;;
323 linux) gdb_target=linux ;;
329 case "${target_vendor}" in
330 bout | wrs) gdb_target=vxworks960 ;;
331 coff | intel) gdb_target=nindy960 ;;
336 case "${target_vendor}" in
337 utek) gdb_target=umax ;;
346 case "${target_vendor}" in
348 case "${target_os}" in
349 hpux) gdb_target=hppahpux ;;
350 bsd) gdb_target=hppabsd ;;
356 ### unhandled targets
363 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
364 echo '***' "Gdb does not support target ${target}" 1>&2
368 if [ -z "${removing}" ] ; then
369 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
373 # We really shouldn't depend on there being a space after TM_FILE= ...
374 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
376 host_makefile_frag=config/${gdb_host}.mh
377 target_makefile_frag=config/${gdb_target}.mt
379 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
380 # ?config/* file, we don't make the corresponding links. But we have
381 # to remove the xm.h files and tm.h files anyway, e.g. when switching
382 # from "configure host" to "configure none".
386 if [ "${hostfile}" != "" ]; then
387 files="${files} ${hostfile}"
388 links="${links} xm.h"
391 if [ "${targetfile}" != "" ]; then
392 files="${files} ${targetfile}"
393 links="${links} tm.h"
402 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
403 echo "source ${srcdir}/.gdbinit" >> .gdbinit
406 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile