8 # map host info into gdb names.
13 case "${host_vendor}" in
16 sysv*) gdb_host=apollo68v ;;
22 gas) gdb_host=altosgas ;;
29 amigados) gdb_host=amigados ;;
30 sysv4*) gdb_host=amix ;;
36 hpux) gdb_host=hp300hpux ;;
37 bsd) gdb_host=hp300bsd ;;
42 sony) gdb_host=news ;;
45 sunos3) gdb_host=sun3os3 ;;
46 sunos4) gdb_host=sun3os4 ;;
54 case "${host_vendor}" in
57 sunos3) gdb_host=sun2os3 ;;
58 sunos4) gdb_host=sun2os4 ;;
66 sunos3) gdb_host=sun4os3 ;;
67 sunos4) gdb_host=sun4os4 ;;
68 solaris2*) gdb_host=sun4sol2 ;;
74 case "${host_vendor}" in
75 sony) gdb_host=news1000 ;;
80 case "${host_vendor}" in
81 sony) gdb_host=bigmips ;;
82 dec) gdb_host=decstation ;;
83 little) gdb_host=littlemips ;;
86 irix3) gdb_host=irix3 ;;
87 irix4) gdb_host=irix4 ;;
98 case "${host_vendor}" in
99 sun) gdb_host=sun386 ;;
100 sco) gdb_host=i386sco ;;
101 sequent) gdb_host=symmetry ;;
102 ncr) gdb_host=ncr3000 ;;
105 go32) gdb_host=go32 ;;
106 sysv32) gdb_host=i386v32 ;;
107 sysv4*) gdb_host=i386v4 ;;
108 sysv*) gdb_host=i386v ;;
109 scosysv*) gdb_host=i386sco ;;
110 mach) gdb_host=i386mach ;;
116 c1 | c2) gdb_host=convex ;;
119 case "${host_vendor}" in
120 umax) gdb_host=umax ;;
137 case "${host_vendor}" in
154 arm | merlin | none | np1 | pn | pyramid | tahoe)
166 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
167 echo '***' "Gdb does not support host ${host}" 1>&2
171 # We really shouldn't depend on there being a space after XM_FILE= ...
172 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
176 case "${target_cpu}" in
179 case "${target_vendor}" in
180 att) gdb_target=3b1 ;;
181 altos) gdb_target=altos ;;
184 amigados) gdb_host=amigados ;;
185 sysv4*) gdb_target=amix ;;
189 case "${target_os}" in
190 bsd) gdb_target=hp300bsd ;;
191 hpux) gdb_target=hp300hpux ;;
195 case "${target_os}" in
196 sunos3) gdb_target=sun3os3 ;;
197 sunos4) gdb_target=sun3os4 ;;
198 *) gdb_target=sun3 ;;
201 wrs) gdb_target=vxworks68 ;;
202 isi) gdb_target=isi ;;
203 sony) gdb_target=news ;;
205 case "${target_os}" in
206 os68k) gdb_target=os68k ;;
211 case "${target_vendor}" in
213 case "${target_os}" in
214 sunos3) gdb_target=sun2os3 ;;
215 sunos4) gdb_target=sun2os4 ;;
216 *) gdb_target=sun2 ;;
219 wrs) gdb_target=vxworks68 ;;
224 case "${target_vendor}" in
225 wrs) gdb_target=vxworks68 ;;
230 case "${target_vendor}" in
231 sony) gdb_target=news1000 ;;
232 wrs) gdb_target=vxworks68 ;;
237 case "${target_vendor}" in
238 tandem) gdb_target=st2000 ;;
242 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
243 gdb_target=${target_cpu} ;;
246 case "${target_vendor}" in
247 motorola) gdb_target=delta88 ;;
248 *) gdb_target=dgux ;;
252 case "${target_os}" in
253 none|aout|coff) gdb_target=a29k ;;
254 sym1) gdb_target=ultra3 ;;
255 kern) gdb_target=a29k-kern ;;
256 ebmon) gdb_target=a29k;;
257 udi) gdb_target=a29k-udi;;
262 case "${target_vendor}" in
263 sony) gdb_target=bigmips ;;
264 big) gdb_target=bigmips ;;
265 dec) gdb_target=decstation ;;
266 little) gdb_target=littlemips ;;
267 sgi) gdb_target=irix3 ;;
271 c1 | c2) gdb_target=convex ;;
274 case "${target_vendor}" in
276 case "${target_os}" in
277 sunos3) gdb_target=sun4os3 ;;
278 sunos4) gdb_target=sun4os4 ;;
279 solaris2*) gdb_target=sun4sol2 ;;
280 *) gdb_target=sun4 ;;
290 i860) gdb_target=stratus
294 case "${target_vendor}" in
295 sco) gdb_target=i386sco ;;
296 sun) gdb_target=sun386 ;;
297 sequent) gdb_target=symmetry ;;
298 ncr) gdb_target=ncr3000 ;;
300 case "${target_os}" in
301 sysv32) gdb_target=i386v32 ;;
302 scosysv3*) gdb_target=i386v32 ;;
303 sysv4*) gdb_target=i386v4 ;;
304 sysv*) gdb_target=i386v ;;
305 mach) gdb_target=i386mach ;;
306 coff) gdb_target=i386v ;;
307 aout) gdb_target=i386aout ;;
313 case "${target_vendor}" in
314 bout | wrs) gdb_target=vxworks960 ;;
315 coff | intel) gdb_target=nindy960 ;;
320 case "${target_vendor}" in
321 utek) gdb_target=umax ;;
329 ### unhandled targets
336 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
337 echo '***' "Gdb does not support target ${target}" 1>&2
341 if [ -z "${removing}" ] ; then
342 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
346 # We really shouldn't depend on there being a space after TM_FILE= ...
347 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
349 host_makefile_frag=config/${gdb_host}.mh
350 target_makefile_frag=config/${gdb_target}.mt
352 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
353 # ?config/* file, we don't make the corresponding links. But we have
354 # to remove the xm.h files and tm.h files anyway, e.g. when switching
355 # from "configure host" to "configure none".
359 if [ "${hostfile}" != "" ]; then
360 files="${files} ${hostfile}"
361 links="${links} xm.h"
364 if [ "${targetfile}" != "" ]; then
365 files="${files} ${targetfile}"
366 links="${links} tm.h"
375 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
376 echo "source ${srcdir}/.gdbinit" >> .gdbinit
379 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile