8 # map host info into gdb names.
13 case "${host_vendor}" in
17 gas) gdb_host=altosgas ;;
24 amigados) gdb_host=amigados ;;
25 sysv4*) gdb_host=amix ;;
31 hpux) gdb_host=hp300hpux ;;
32 bsd) gdb_host=hp300bsd ;;
37 sony) gdb_host=news ;;
40 sunos3) gdb_host=sun3os3 ;;
41 sunos4) gdb_host=sun3os4 ;;
49 case "${host_vendor}" in
52 sunos3) gdb_host=sun2os3 ;;
53 sunos4) gdb_host=sun2os4 ;;
61 sunos3) gdb_host=sun4os3 ;;
62 sunos4) gdb_host=sun4os4 ;;
68 case "${host_vendor}" in
69 sony) gdb_host=news1000 ;;
74 case "${host_vendor}" in
75 sony) gdb_host=bigmips ;;
76 dec) gdb_host=decstation ;;
77 little) gdb_host=littlemips ;;
78 sgi) gdb_host=irix3 ;;
87 case "${host_vendor}" in
88 sun) gdb_host=sun386 ;;
89 sco) gdb_host=i386sco ;;
90 sequent) gdb_host=symmetry ;;
93 sysv32) gdb_host=i386v32 ;;
94 sysv4*) gdb_host=i386v4 ;;
95 sysv*) gdb_host=i386v ;;
96 scosysv*) gdb_host=i386sco ;;
97 mach) gdb_host=i386mach ;;
103 c1 | c2) gdb_host=convex ;;
106 case "${host_vendor}" in
107 umax) gdb_host=umax ;;
124 case "${host_vendor}" in
141 arm | merlin | none | np1 | pn | pyramid | tahoe)
153 if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
154 echo '***' "Gdb does not support host ${host}" 1>&2
158 # We really shouldn't depend on there being a space after XM_FILE= ...
159 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
163 case "${target_cpu}" in
166 case "${target_vendor}" in
167 att) gdb_target=3b1 ;;
168 altos) gdb_target=altos ;;
171 amigados) gdb_host=amigados ;;
172 sysv4*) gdb_target=amix ;;
176 case "${target_os}" in
177 bsd) gdb_target=hp300bsd ;;
178 hpux) gdb_target=hp300hpux ;;
182 case "${target_os}" in
183 sunos3) gdb_target=sun3os3 ;;
184 sunos4) gdb_target=sun3os4 ;;
185 *) gdb_target=sun3 ;;
188 wrs) gdb_target=vxworks68 ;;
189 isi) gdb_target=isi ;;
190 sony) gdb_target=news ;;
195 case "${target_vendor}" in
197 case "${target_os}" in
198 sunos3) gdb_target=sun2os3 ;;
199 sunos4) gdb_target=sun2os4 ;;
200 *) gdb_target=sun2 ;;
206 case "${target_vendor}" in
207 sony) gdb_target=news1000 ;;
211 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
212 gdb_target=${target_cpu} ;;
215 case "${target_vendor}" in
216 motorola) gdb_target=delta88 ;;
217 *) gdb_target=dgux ;;
221 case "${target_os}" in
222 none|aout|coff) gdb_target=a29k ;;
223 sym1) gdb_target=ultra3 ;;
224 kern) gdb_target=a29k-kern ;;
225 ebmon) gdb_target=a29k;;
230 case "${target_vendor}" in
231 sony) gdb_target=bigmips ;;
232 dec) gdb_target=decstation ;;
233 little) gdb_target=littlemips ;;
234 sgi) gdb_target=irix3 ;;
238 c1 | c2) gdb_target=convex ;;
241 case "${target_vendor}" in
243 case "${target_os}" in
244 sunos3) gdb_target=sun4os3 ;;
245 sunos4) gdb_target=sun4os4 ;;
246 *) gdb_target=sun4 ;;
256 i860) gdb_target=stratus
260 case "${target_vendor}" in
261 sco) gdb_target=i386sco ;;
262 sun) gdb_target=sun386 ;;
263 sequent) gdb_target=symmetry ;;
265 case "${target_os}" in
266 sysv32) gdb_target=i386v32 ;;
267 scosysv3*) gdb_target=i386v32 ;;
268 sysv4*) gdb_target=i386v4 ;;
269 sysv*) gdb_target=i386v ;;
270 mach) gdb_target=i386mach ;;
271 coff) gdb_target=i386v ;;
272 aout) gdb_target=i386aout ;;
278 case "${target_vendor}" in
279 bout | wrs) gdb_target=vxworks960 ;;
280 coff | intel) gdb_target=nindy960 ;;
285 case "${target_vendor}" in
286 utek) gdb_target=umax ;;
294 ### unhandled targets
301 if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
302 echo '***' "Gdb does not support target ${target}" 1>&2
306 if [ -z "${removing}" ] ; then
307 cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
311 # We really shouldn't depend on there being a space after TM_FILE= ...
312 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
314 host_makefile_frag=config/mh-${gdb_host}
315 target_makefile_frag=config/mt-${gdb_target}
317 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
318 # ?config/* file, we don't make the corresponding links. But we have
319 # to remove the xm.h files and tm.h files anyway, e.g. when switching
320 # from "configure host" to "configure none".
324 if [ "${hostfile}" != "" ]; then
325 files="${files} ${hostfile}"
326 links="${links} xm.h"
329 if [ "${targetfile}" != "" ]; then
330 files="${files} ${targetfile}"
331 links="${links} tm.h"
340 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
341 echo "source ${srcdir}/.gdbinit" >> .gdbinit
344 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile