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 sunos5*|sysv4*) gdb_host=sun4os5 ;;
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 ;;
104 sysv4*) gdb_host=ncr3000 ;;
109 sysv32) gdb_host=i386v32 ;;
110 sysv4*) gdb_host=i386v4 ;;
111 sysv*) gdb_host=i386v ;;
112 scosysv*) gdb_host=i386sco ;;
113 mach) gdb_host=i386mach ;;
119 c1 | c2) gdb_host=convex ;;
122 case "${host_vendor}" in
123 umax) gdb_host=umax ;;
140 case "${host_vendor}" in
157 arm | merlin | none | np1 | pn | pyramid | tahoe)
169 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
170 echo '***' "Gdb does not support host ${host}" 1>&2
174 # We really shouldn't depend on there being a space after XM_FILE= ...
175 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
179 case "${target_cpu}" in
182 case "${target_vendor}" in
183 att) gdb_target=3b1 ;;
184 altos) gdb_target=altos ;;
187 amigados) gdb_host=amigados ;;
188 sysv4*) gdb_target=amix ;;
192 case "${target_os}" in
193 bsd) gdb_target=hp300bsd ;;
194 hpux) gdb_target=hp300hpux ;;
198 case "${target_os}" in
199 sunos3) gdb_target=sun3os3 ;;
200 sunos4) gdb_target=sun3os4 ;;
201 *) gdb_target=sun3 ;;
204 wrs) gdb_target=vxworks68 ;;
205 isi) gdb_target=isi ;;
206 sony) gdb_target=news ;;
208 case "${target_os}" in
209 os68k) gdb_target=os68k ;;
214 case "${target_vendor}" in
216 case "${target_os}" in
217 sunos3) gdb_target=sun2os3 ;;
218 sunos4) gdb_target=sun2os4 ;;
219 *) gdb_target=sun2 ;;
225 case "${target_vendor}" in
226 sony) gdb_target=news1000 ;;
230 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
231 gdb_target=${target_cpu} ;;
234 case "${target_vendor}" in
235 motorola) gdb_target=delta88 ;;
236 *) gdb_target=dgux ;;
240 case "${target_os}" in
241 none|aout|coff) gdb_target=a29k ;;
242 sym1) gdb_target=ultra3 ;;
243 kern) gdb_target=a29k-kern ;;
244 ebmon) gdb_target=a29k;;
245 udi) gdb_target=a29k-udi;;
250 case "${target_vendor}" in
251 sony) gdb_target=bigmips ;;
252 big) gdb_target=bigmips ;;
253 dec) gdb_target=decstation ;;
254 little) gdb_target=littlemips ;;
255 sgi) gdb_target=irix3 ;;
259 c1 | c2) gdb_target=convex ;;
262 case "${target_vendor}" in
264 case "${target_os}" in
265 sunos3) gdb_target=sun4os3 ;;
266 sunos4) gdb_target=sun4os4 ;;
267 sunos5|sysv4*) gdb_target=sun4os5 ;;
268 *) gdb_target=sun4 ;;
278 i860) gdb_target=stratus
282 case "${target_vendor}" in
283 sco) gdb_target=i386sco ;;
284 sun) gdb_target=sun386 ;;
285 sequent) gdb_target=symmetry ;;
287 case "${target_os}" in
288 sysv32) gdb_target=i386v32 ;;
289 scosysv3*) gdb_target=i386v32 ;;
290 sysv4*) gdb_target=i386v4 ;;
291 sysv*) gdb_target=i386v ;;
292 mach) gdb_target=i386mach ;;
293 coff) gdb_target=i386v ;;
294 aout) gdb_target=i386aout ;;
300 case "${target_vendor}" in
301 bout | wrs) gdb_target=vxworks960 ;;
302 coff | intel) gdb_target=nindy960 ;;
307 case "${target_vendor}" in
308 utek) gdb_target=umax ;;
316 ### unhandled targets
323 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
324 echo '***' "Gdb does not support target ${target}" 1>&2
328 if [ -z "${removing}" ] ; then
329 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
333 # We really shouldn't depend on there being a space after TM_FILE= ...
334 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
336 host_makefile_frag=config/${gdb_host}.mh
337 target_makefile_frag=config/${gdb_target}.mt
339 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
340 # ?config/* file, we don't make the corresponding links. But we have
341 # to remove the xm.h files and tm.h files anyway, e.g. when switching
342 # from "configure host" to "configure none".
346 if [ "${hostfile}" != "" ]; then
347 files="${files} ${hostfile}"
348 links="${links} xm.h"
351 if [ "${targetfile}" != "" ]; then
352 files="${files} ${targetfile}"
353 links="${links} tm.h"
362 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
363 echo "source ${srcdir}/.gdbinit" >> .gdbinit
366 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile