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 netx) gdb_target=vxworks68 ;;
217 isi) gdb_target=isi ;;
218 sony) gdb_target=news ;;
220 case "${target_os}" in
221 os68k) gdb_target=os68k ;;
226 case "${target_vendor}" in
228 case "${target_os}" in
229 sunos3) gdb_target=sun2os3 ;;
230 sunos4) gdb_target=sun2os4 ;;
231 *) gdb_target=sun2 ;;
234 ericsson) gdb_target=es1800 ;;
235 wrs) gdb_target=vxworks68 ;;
240 case "${target_vendor}" in
241 wrs) gdb_target=vxworks68 ;;
246 case "${target_vendor}" in
247 sony) gdb_target=news1000 ;;
248 wrs) gdb_target=vxworks68 ;;
253 case "${target_vendor}" in
254 tandem) gdb_target=st2000 ;;
258 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
259 gdb_target=${target_cpu} ;;
262 case "${target_vendor}" in
263 motorola) gdb_target=delta88 ;;
264 *) gdb_target=dgux ;;
268 case "${target_os}" in
269 none|aout|coff) gdb_target=a29k ;;
270 sym1) gdb_target=ultra3 ;;
271 kern) gdb_target=a29k-kern ;;
272 ebmon) gdb_target=a29k;;
273 udi) gdb_target=a29k-udi;;
278 case "${target_vendor}" in
279 sony) gdb_target=bigmips ;;
280 big) gdb_target=bigmips ;;
281 dec) gdb_target=decstation ;;
282 little) gdb_target=littlemips ;;
283 sgi) gdb_target=irix3 ;;
287 c1 | c2) gdb_target=convex ;;
290 case "${target_vendor}" in
292 case "${target_os}" in
293 sunos3) gdb_target=sun4os3 ;;
294 sunos4) gdb_target=sun4os4 ;;
295 solaris2*) gdb_target=sun4sol2 ;;
296 *) gdb_target=sun4 ;;
306 i860) gdb_target=stratus
310 case "${target_vendor}" in
311 sco) gdb_target=i386sco ;;
312 sun) gdb_target=sun386 ;;
313 sequent) gdb_target=symmetry ;;
314 ncr) gdb_target=ncr3000 ;;
316 case "${target_os}" in
317 sysv32) gdb_target=i386v32 ;;
318 scosysv3*) gdb_target=i386v32 ;;
319 sysv4*) gdb_target=i386v4 ;;
320 sysv*) gdb_target=i386v ;;
321 mach) gdb_target=i386mach ;;
322 coff) gdb_target=i386v ;;
323 aout) gdb_target=i386aout ;;
324 linux) gdb_target=linux ;;
330 case "${target_vendor}" in
331 bout | wrs) gdb_target=vxworks960 ;;
332 coff | intel) gdb_target=nindy960 ;;
337 case "${target_vendor}" in
338 utek) gdb_target=umax ;;
347 case "${target_vendor}" in
349 case "${target_os}" in
350 hpux) gdb_target=hppahpux ;;
351 bsd) gdb_target=hppabsd ;;
357 ### unhandled targets
364 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
365 echo '***' "Gdb does not support target ${target}" 1>&2
369 if [ -z "${removing}" ] ; then
370 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
374 # We really shouldn't depend on there being a space after TM_FILE= ...
375 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
377 host_makefile_frag=config/${gdb_host}.mh
378 target_makefile_frag=config/${gdb_target}.mt
380 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
381 # ?config/* file, we don't make the corresponding links. But we have
382 # to remove the xm.h files and tm.h files anyway, e.g. when switching
383 # from "configure host" to "configure none".
387 if [ "${hostfile}" != "" ]; then
388 files="${files} ${hostfile}"
389 links="${links} xm.h"
392 if [ "${targetfile}" != "" ]; then
393 files="${files} ${targetfile}"
394 links="${links} tm.h"
403 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
404 echo "source ${srcdir}/.gdbinit" >> .gdbinit
407 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile