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 ;;
73 case "${host_vendor}" in
74 sony) gdb_host=news1000 ;;
79 case "${host_vendor}" in
80 sony) gdb_host=bigmips ;;
81 dec) gdb_host=decstation ;;
82 little) gdb_host=littlemips ;;
83 sgi) gdb_host=irix3 ;;
92 case "${host_vendor}" in
93 sun) gdb_host=sun386 ;;
94 sco) gdb_host=i386sco ;;
95 sequent) gdb_host=symmetry ;;
98 sysv32) gdb_host=i386v32 ;;
99 sysv4*) gdb_host=i386v4 ;;
100 sysv*) gdb_host=i386v ;;
101 scosysv*) gdb_host=i386sco ;;
102 mach) gdb_host=i386mach ;;
108 c1 | c2) gdb_host=convex ;;
111 case "${host_vendor}" in
112 umax) gdb_host=umax ;;
129 case "${host_vendor}" in
146 arm | merlin | none | np1 | pn | pyramid | tahoe)
158 if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
159 echo '***' "Gdb does not support host ${host}" 1>&2
163 # We really shouldn't depend on there being a space after XM_FILE= ...
164 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
168 case "${target_cpu}" in
171 case "${target_vendor}" in
172 att) gdb_target=3b1 ;;
173 altos) gdb_target=altos ;;
176 amigados) gdb_host=amigados ;;
177 sysv4*) gdb_target=amix ;;
181 case "${target_os}" in
182 bsd) gdb_target=hp300bsd ;;
183 hpux) gdb_target=hp300hpux ;;
187 case "${target_os}" in
188 sunos3) gdb_target=sun3os3 ;;
189 sunos4) gdb_target=sun3os4 ;;
190 *) gdb_target=sun3 ;;
193 wrs) gdb_target=vxworks68 ;;
194 isi) gdb_target=isi ;;
195 sony) gdb_target=news ;;
197 case "${target_os}" in
198 os68k) gdb_target=os68k ;;
203 case "${target_vendor}" in
205 case "${target_os}" in
206 sunos3) gdb_target=sun2os3 ;;
207 sunos4) gdb_target=sun2os4 ;;
208 *) gdb_target=sun2 ;;
214 case "${target_vendor}" in
215 sony) gdb_target=news1000 ;;
219 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
220 gdb_target=${target_cpu} ;;
223 case "${target_vendor}" in
224 motorola) gdb_target=delta88 ;;
225 *) gdb_target=dgux ;;
229 case "${target_os}" in
230 none|aout|coff) gdb_target=a29k ;;
231 sym1) gdb_target=ultra3 ;;
232 kern) gdb_target=a29k-kern ;;
233 ebmon) gdb_target=a29k;;
238 case "${target_vendor}" in
239 sony) gdb_target=bigmips ;;
240 dec) gdb_target=decstation ;;
241 little) gdb_target=littlemips ;;
242 sgi) gdb_target=irix3 ;;
246 c1 | c2) gdb_target=convex ;;
249 case "${target_vendor}" in
251 case "${target_os}" in
252 sunos3) gdb_target=sun4os3 ;;
253 sunos4) gdb_target=sun4os4 ;;
254 *) gdb_target=sun4 ;;
264 i860) gdb_target=stratus
268 case "${target_vendor}" in
269 sco) gdb_target=i386sco ;;
270 sun) gdb_target=sun386 ;;
271 sequent) gdb_target=symmetry ;;
273 case "${target_os}" in
274 sysv32) gdb_target=i386v32 ;;
275 scosysv3*) gdb_target=i386v32 ;;
276 sysv4*) gdb_target=i386v4 ;;
277 sysv*) gdb_target=i386v ;;
278 mach) gdb_target=i386mach ;;
279 coff) gdb_target=i386v ;;
280 aout) gdb_target=i386aout ;;
286 case "${target_vendor}" in
287 bout | wrs) gdb_target=vxworks960 ;;
288 coff | intel) gdb_target=nindy960 ;;
293 case "${target_vendor}" in
294 utek) gdb_target=umax ;;
302 ### unhandled targets
309 if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
310 echo '***' "Gdb does not support target ${target}" 1>&2
314 if [ -z "${removing}" ] ; then
315 cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
319 # We really shouldn't depend on there being a space after TM_FILE= ...
320 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
322 host_makefile_frag=config/mh-${gdb_host}
323 target_makefile_frag=config/mt-${gdb_target}
325 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
326 # ?config/* file, we don't make the corresponding links. But we have
327 # to remove the xm.h files and tm.h files anyway, e.g. when switching
328 # from "configure host" to "configure none".
332 if [ "${hostfile}" != "" ]; then
333 files="${files} ${hostfile}"
334 links="${links} xm.h"
337 if [ "${targetfile}" != "" ]; then
338 files="${files} ${targetfile}"
339 links="${links} tm.h"
348 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
349 echo "source ${srcdir}/.gdbinit" >> .gdbinit
352 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile