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 ;;
200 ericsson) gdb_target=es1800 ;;
202 case "${target_os}" in
203 bsd) gdb_target=hp300bsd ;;
204 hpux) gdb_target=hp300hpux ;;
208 case "${target_os}" in
209 sunos3) gdb_target=sun3os3 ;;
210 sunos4) gdb_target=sun3os4 ;;
211 *) gdb_target=sun3 ;;
214 wrs) gdb_target=vxworks68 ;;
215 isi) gdb_target=isi ;;
216 sony) gdb_target=news ;;
218 case "${target_os}" in
219 os68k) gdb_target=os68k ;;
224 case "${target_vendor}" in
226 case "${target_os}" in
227 sunos3) gdb_target=sun2os3 ;;
228 sunos4) gdb_target=sun2os4 ;;
229 *) gdb_target=sun2 ;;
232 ericsson) gdb_target=es1800 ;;
233 wrs) gdb_target=vxworks68 ;;
238 case "${target_vendor}" in
239 wrs) gdb_target=vxworks68 ;;
244 case "${target_vendor}" in
245 sony) gdb_target=news1000 ;;
246 wrs) gdb_target=vxworks68 ;;
251 case "${target_vendor}" in
252 tandem) gdb_target=st2000 ;;
256 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
257 gdb_target=${target_cpu} ;;
260 case "${target_vendor}" in
261 motorola) gdb_target=delta88 ;;
262 *) gdb_target=dgux ;;
266 case "${target_os}" in
267 none|aout|coff) gdb_target=a29k ;;
268 sym1) gdb_target=ultra3 ;;
269 kern) gdb_target=a29k-kern ;;
270 ebmon) gdb_target=a29k;;
271 udi) gdb_target=a29k-udi;;
276 case "${target_vendor}" in
277 sony) gdb_target=bigmips ;;
278 big) gdb_target=bigmips ;;
279 dec) gdb_target=decstation ;;
280 little) gdb_target=littlemips ;;
281 sgi) gdb_target=irix3 ;;
285 c1 | c2) gdb_target=convex ;;
288 case "${target_vendor}" in
290 case "${target_os}" in
291 sunos3) gdb_target=sun4os3 ;;
292 sunos4) gdb_target=sun4os4 ;;
293 solaris2*) gdb_target=sun4sol2 ;;
294 *) gdb_target=sun4 ;;
304 i860) gdb_target=stratus
308 case "${target_vendor}" in
309 sco) gdb_target=i386sco ;;
310 sun) gdb_target=sun386 ;;
311 sequent) gdb_target=symmetry ;;
312 ncr) gdb_target=ncr3000 ;;
314 case "${target_os}" in
315 sysv32) gdb_target=i386v32 ;;
316 scosysv3*) gdb_target=i386v32 ;;
317 sysv4*) gdb_target=i386v4 ;;
318 sysv*) gdb_target=i386v ;;
319 mach) gdb_target=i386mach ;;
320 coff) gdb_target=i386v ;;
321 aout) gdb_target=i386aout ;;
322 linux) gdb_target=linux ;;
328 case "${target_vendor}" in
329 bout | wrs) gdb_target=vxworks960 ;;
330 coff | intel) gdb_target=nindy960 ;;
335 case "${target_vendor}" in
336 utek) gdb_target=umax ;;
345 case "${target_vendor}" in
347 case "${target_os}" in
348 hpux) gdb_target=hppahpux ;;
349 bsd) gdb_target=hppabsd ;;
355 ### unhandled targets
362 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
363 echo '***' "Gdb does not support target ${target}" 1>&2
367 if [ -z "${removing}" ] ; then
368 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
372 # We really shouldn't depend on there being a space after TM_FILE= ...
373 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
375 host_makefile_frag=config/${gdb_host}.mh
376 target_makefile_frag=config/${gdb_target}.mt
378 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
379 # ?config/* file, we don't make the corresponding links. But we have
380 # to remove the xm.h files and tm.h files anyway, e.g. when switching
381 # from "configure host" to "configure none".
385 if [ "${hostfile}" != "" ]; then
386 files="${files} ${hostfile}"
387 links="${links} xm.h"
390 if [ "${targetfile}" != "" ]; then
391 files="${files} ${targetfile}"
392 links="${links} tm.h"
401 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
402 echo "source ${srcdir}/.gdbinit" >> .gdbinit
405 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile