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 ;;
111 linux) gdb_host=linux ;;
117 c1 | c2) gdb_host=convex ;;
120 case "${host_vendor}" in
121 umax) gdb_host=umax ;;
138 case "${host_vendor}" in
155 arm | merlin | none | np1 | pn | pyramid | tahoe)
160 case "${host_vendor}" in
163 hpux) gdb_host=hppahpux ;;
164 bsd) gdb_host=hppabsd ;;
178 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
179 echo '***' "Gdb does not support host ${host}" 1>&2
183 # We really shouldn't depend on there being a space after XM_FILE= ...
184 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
188 case "${target_cpu}" in
191 case "${target_vendor}" in
192 att) gdb_target=3b1 ;;
193 altos) gdb_target=altos ;;
196 amigados) gdb_host=amigados ;;
197 sysv4*) gdb_target=amix ;;
201 case "${target_os}" in
202 bsd) gdb_target=hp300bsd ;;
203 hpux) gdb_target=hp300hpux ;;
207 case "${target_os}" in
208 sunos3) gdb_target=sun3os3 ;;
209 sunos4) gdb_target=sun3os4 ;;
210 *) gdb_target=sun3 ;;
213 wrs) gdb_target=vxworks68 ;;
214 isi) gdb_target=isi ;;
215 sony) gdb_target=news ;;
217 case "${target_os}" in
218 os68k) gdb_target=os68k ;;
223 case "${target_vendor}" in
225 case "${target_os}" in
226 sunos3) gdb_target=sun2os3 ;;
227 sunos4) gdb_target=sun2os4 ;;
228 *) gdb_target=sun2 ;;
231 wrs) gdb_target=vxworks68 ;;
236 case "${target_vendor}" in
237 wrs) gdb_target=vxworks68 ;;
242 case "${target_vendor}" in
243 sony) gdb_target=news1000 ;;
244 wrs) gdb_target=vxworks68 ;;
249 case "${target_vendor}" in
250 tandem) gdb_target=st2000 ;;
254 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
255 gdb_target=${target_cpu} ;;
258 case "${target_vendor}" in
259 motorola) gdb_target=delta88 ;;
260 *) gdb_target=dgux ;;
264 case "${target_os}" in
265 none|aout|coff) gdb_target=a29k ;;
266 sym1) gdb_target=ultra3 ;;
267 kern) gdb_target=a29k-kern ;;
268 ebmon) gdb_target=a29k;;
269 udi) gdb_target=a29k-udi;;
274 case "${target_vendor}" in
275 sony) gdb_target=bigmips ;;
276 big) gdb_target=bigmips ;;
277 dec) gdb_target=decstation ;;
278 little) gdb_target=littlemips ;;
279 sgi) gdb_target=irix3 ;;
283 c1 | c2) gdb_target=convex ;;
286 case "${target_vendor}" in
288 case "${target_os}" in
289 sunos3) gdb_target=sun4os3 ;;
290 sunos4) gdb_target=sun4os4 ;;
291 solaris2*) gdb_target=sun4sol2 ;;
292 *) gdb_target=sun4 ;;
302 i860) gdb_target=stratus
306 case "${target_vendor}" in
307 sco) gdb_target=i386sco ;;
308 sun) gdb_target=sun386 ;;
309 sequent) gdb_target=symmetry ;;
310 ncr) gdb_target=ncr3000 ;;
312 case "${target_os}" in
313 sysv32) gdb_target=i386v32 ;;
314 scosysv3*) gdb_target=i386v32 ;;
315 sysv4*) gdb_target=i386v4 ;;
316 sysv*) gdb_target=i386v ;;
317 mach) gdb_target=i386mach ;;
318 coff) gdb_target=i386v ;;
319 aout) gdb_target=i386aout ;;
320 linux) gdb_target=linux ;;
326 case "${target_vendor}" in
327 bout | wrs) gdb_target=vxworks960 ;;
328 coff | intel) gdb_target=nindy960 ;;
333 case "${target_vendor}" in
334 utek) gdb_target=umax ;;
343 case "${target_vendor}" in
345 case "${target_os}" in
346 hpux) gdb_target=hppahpux ;;
347 bsd) gdb_target=hppabsd ;;
353 ### unhandled targets
360 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
361 echo '***' "Gdb does not support target ${target}" 1>&2
365 if [ -z "${removing}" ] ; then
366 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
370 # We really shouldn't depend on there being a space after TM_FILE= ...
371 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
373 host_makefile_frag=config/${gdb_host}.mh
374 target_makefile_frag=config/${gdb_target}.mt
376 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
377 # ?config/* file, we don't make the corresponding links. But we have
378 # to remove the xm.h files and tm.h files anyway, e.g. when switching
379 # from "configure host" to "configure none".
383 if [ "${hostfile}" != "" ]; then
384 files="${files} ${hostfile}"
385 links="${links} xm.h"
388 if [ "${targetfile}" != "" ]; then
389 files="${files} ${targetfile}"
390 links="${links} tm.h"
399 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
400 echo "source ${srcdir}/.gdbinit" >> .gdbinit
403 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile