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 sysv32) gdb_host=i386v32 ;;
105 sysv4*) gdb_host=i386v4 ;;
106 sysv*) gdb_host=i386v ;;
107 scosysv*) gdb_host=i386sco ;;
108 mach) gdb_host=i386mach ;;
114 c1 | c2) gdb_host=convex ;;
117 case "${host_vendor}" in
118 umax) gdb_host=umax ;;
135 case "${host_vendor}" in
152 arm | merlin | none | np1 | pn | pyramid | tahoe)
164 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
165 echo '***' "Gdb does not support host ${host}" 1>&2
169 # We really shouldn't depend on there being a space after XM_FILE= ...
170 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
174 case "${target_cpu}" in
177 case "${target_vendor}" in
178 att) gdb_target=3b1 ;;
179 altos) gdb_target=altos ;;
182 amigados) gdb_host=amigados ;;
183 sysv4*) gdb_target=amix ;;
187 case "${target_os}" in
188 bsd) gdb_target=hp300bsd ;;
189 hpux) gdb_target=hp300hpux ;;
193 case "${target_os}" in
194 sunos3) gdb_target=sun3os3 ;;
195 sunos4) gdb_target=sun3os4 ;;
196 *) gdb_target=sun3 ;;
199 wrs) gdb_target=vxworks68 ;;
200 isi) gdb_target=isi ;;
201 sony) gdb_target=news ;;
203 case "${target_os}" in
204 os68k) gdb_target=os68k ;;
209 case "${target_vendor}" in
211 case "${target_os}" in
212 sunos3) gdb_target=sun2os3 ;;
213 sunos4) gdb_target=sun2os4 ;;
214 *) gdb_target=sun2 ;;
220 case "${target_vendor}" in
221 sony) gdb_target=news1000 ;;
225 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
226 gdb_target=${target_cpu} ;;
229 case "${target_vendor}" in
230 motorola) gdb_target=delta88 ;;
231 *) gdb_target=dgux ;;
235 case "${target_os}" in
236 none|aout|coff) gdb_target=a29k ;;
237 sym1) gdb_target=ultra3 ;;
238 kern) gdb_target=a29k-kern ;;
239 ebmon) gdb_target=a29k;;
244 case "${target_vendor}" in
245 sony) gdb_target=bigmips ;;
246 big) gdb_target=bigmips ;;
247 dec) gdb_target=decstation ;;
248 little) gdb_target=littlemips ;;
249 sgi) gdb_target=irix3 ;;
253 c1 | c2) gdb_target=convex ;;
256 case "${target_vendor}" in
258 case "${target_os}" in
259 sunos3) gdb_target=sun4os3 ;;
260 sunos4) gdb_target=sun4os4 ;;
261 sunos5|sysv4*) gdb_target=sun4os5 ;;
262 *) gdb_target=sun4 ;;
272 i860) gdb_target=stratus
276 case "${target_vendor}" in
277 sco) gdb_target=i386sco ;;
278 sun) gdb_target=sun386 ;;
279 sequent) gdb_target=symmetry ;;
281 case "${target_os}" in
282 sysv32) gdb_target=i386v32 ;;
283 scosysv3*) gdb_target=i386v32 ;;
284 sysv4*) gdb_target=i386v4 ;;
285 sysv*) gdb_target=i386v ;;
286 mach) gdb_target=i386mach ;;
287 coff) gdb_target=i386v ;;
288 aout) gdb_target=i386aout ;;
294 case "${target_vendor}" in
295 bout | wrs) gdb_target=vxworks960 ;;
296 coff | intel) gdb_target=nindy960 ;;
301 case "${target_vendor}" in
302 utek) gdb_target=umax ;;
310 ### unhandled targets
317 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
318 echo '***' "Gdb does not support target ${target}" 1>&2
322 if [ -z "${removing}" ] ; then
323 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
327 # We really shouldn't depend on there being a space after TM_FILE= ...
328 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
330 host_makefile_frag=config/${gdb_host}.mh
331 target_makefile_frag=config/${gdb_target}.mt
333 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
334 # ?config/* file, we don't make the corresponding links. But we have
335 # to remove the xm.h files and tm.h files anyway, e.g. when switching
336 # from "configure host" to "configure none".
340 if [ "${hostfile}" != "" ]; then
341 files="${files} ${hostfile}"
342 links="${links} xm.h"
345 if [ "${targetfile}" != "" ]; then
346 files="${files} ${targetfile}"
347 links="${links} tm.h"
356 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
357 echo "source ${srcdir}/.gdbinit" >> .gdbinit
360 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile