Commit | Line | Data |
---|---|---|
50d2bb5b | 1 | configdirs="doc" |
912e0732 RP |
2 | srcname="GDB" |
3 | srctrigger=main.c | |
bc028766 RP |
4 | target_dependent=true |
5 | ||
0df06ca0 RP |
6 | # per-host: |
7 | ||
6c815bbe RP |
8 | # map host info into gdb names. |
9 | ||
10 | case "${host_cpu}" in | |
11 | ||
12 | m68k) | |
13 | case "${host_vendor}" in | |
b159ce3f SEF |
14 | apollo*) |
15 | case "${host_os}" in | |
16 | sysv*) gdb_host=apollo68v ;; | |
17 | esac | |
18 | ;; | |
6c815bbe RP |
19 | att) gdb_host=3b1 ;; |
20 | altos) | |
21 | case "${host_os}" in | |
22 | gas) gdb_host=altosgas ;; | |
23 | *) gdb_host=altos ;; | |
24 | esac | |
25 | ;; | |
afe4ca15 JG |
26 | |
27 | cbm) | |
28 | case ${host_os} in | |
29 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 30 | sysv4*) gdb_host=amix ;; |
afe4ca15 JG |
31 | esac |
32 | ;; | |
33 | ||
6c815bbe RP |
34 | hp) |
35 | case ${host_os} in | |
36 | hpux) gdb_host=hp300hpux ;; | |
37 | bsd) gdb_host=hp300bsd ;; | |
38 | esac | |
39 | ;; | |
40 | ||
41 | isi) gdb_host=isi ;; | |
42 | sony) gdb_host=news ;; | |
43 | sun) | |
44 | case "${host_os}" in | |
45 | sunos3) gdb_host=sun3os3 ;; | |
46 | sunos4) gdb_host=sun3os4 ;; | |
47 | *) gdb_host=sun3 ;; | |
48 | esac | |
49 | ;; | |
50 | esac | |
51 | ;; | |
52 | ||
53 | m68000) | |
54 | case "${host_vendor}" in | |
55 | sun) | |
56 | case "${host_os}" in | |
57 | sunos3) gdb_host=sun2os3 ;; | |
58 | sunos4) gdb_host=sun2os4 ;; | |
59 | *) gdb_host=sun2 ;; | |
60 | esac | |
61 | esac | |
62 | ;; | |
63 | ||
64 | sparc) | |
65 | case "${host_os}" in | |
66 | sunos3) gdb_host=sun4os3 ;; | |
67 | sunos4) gdb_host=sun4os4 ;; | |
68 | *) gdb_host=sun4 ;; | |
69 | esac | |
70 | ;; | |
71 | ||
72 | m68030) | |
73 | case "${host_vendor}" in | |
74 | sony) gdb_host=news1000 ;; | |
75 | esac | |
76 | ;; | |
77 | ||
78 | mips) | |
79 | case "${host_vendor}" in | |
80 | sony) gdb_host=bigmips ;; | |
5d2cfefe | 81 | dec) gdb_host=decstation ;; |
6c815bbe | 82 | little) gdb_host=littlemips ;; |
407a8389 SG |
83 | sgi) |
84 | case "${host_os}" in | |
85 | sysv) gdb_host=irix3 ;; | |
86 | irix4) gdb_host=irix4 ;; | |
87 | esac | |
88 | ;; | |
6c815bbe RP |
89 | esac |
90 | ;; | |
91 | ||
be9a2362 FF |
92 | i860) |
93 | gdb_host=stratus | |
94 | ;; | |
95 | ||
6c815bbe RP |
96 | i386) |
97 | case "${host_vendor}" in | |
98 | sun) gdb_host=sun386 ;; | |
99 | sco) gdb_host=i386sco ;; | |
100 | sequent) gdb_host=symmetry ;; | |
101 | *) | |
102 | case "${host_os}" in | |
6c815bbe | 103 | sysv32) gdb_host=i386v32 ;; |
ee1ad69c FF |
104 | sysv4*) gdb_host=i386v4 ;; |
105 | sysv*) gdb_host=i386v ;; | |
92732c27 | 106 | scosysv*) gdb_host=i386sco ;; |
6617b94e | 107 | mach) gdb_host=i386mach ;; |
6c815bbe RP |
108 | esac |
109 | ;; | |
110 | esac | |
111 | ;; | |
112 | ||
113 | c1 | c2) gdb_host=convex ;; | |
114 | ||
115 | ns32k) | |
116 | case "${host_vendor}" in | |
117 | umax) gdb_host=umax ;; | |
118 | esac | |
119 | ;; | |
120 | ||
0476df73 | 121 | romp) |
473f3318 JG |
122 | gdb_host=rtbsd |
123 | ;; | |
124 | ||
b90c4f33 JG |
125 | rs6000) |
126 | gdb_host=rs6000 | |
127 | ;; | |
128 | ||
473f3318 JG |
129 | a29k) |
130 | gdb_host=ultra3 | |
131 | ;; | |
132 | ||
8c7ae4a2 SC |
133 | m88k) |
134 | case "${host_vendor}" in | |
135 | motorola) | |
136 | gdb_host=delta88 ;; | |
137 | *) | |
138 | gdb_host=m88k ;; | |
139 | esac | |
140 | ;; | |
141 | ||
9e8bf29a SG |
142 | vax) |
143 | case "${host_os}" in | |
144 | bsd*) | |
145 | gdb_host=vaxbsd ;; | |
146 | ultrix*) | |
147 | gdb_host=vaxult ;; | |
148 | esac | |
149 | ;; | |
150 | ||
151 | arm | merlin | none | np1 | pn | pyramid | tahoe) | |
473f3318 JG |
152 | gdb_host=${host_cpu} |
153 | ;; | |
6c815bbe RP |
154 | |
155 | ### unhandled hosts | |
156 | #altosgas | |
157 | #i386v-g | |
158 | #i386v32-g | |
159 | ||
160 | esac | |
161 | ||
8c7ae4a2 | 162 | |
bc028766 | 163 | if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then |
6c815bbe | 164 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
165 | exit 1 |
166 | fi | |
167 | ||
bdf3621b | 168 | # We really shouldn't depend on there being a space after XM_FILE= ... |
bc028766 | 169 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}` |
912e0732 | 170 | |
0df06ca0 | 171 | # per-target: |
912e0732 | 172 | |
6c815bbe RP |
173 | case "${target_cpu}" in |
174 | ||
175 | m68k) | |
176 | case "${target_vendor}" in | |
177 | att) gdb_target=3b1 ;; | |
178 | altos) gdb_target=altos ;; | |
afe4ca15 JG |
179 | cbm) |
180 | case ${target_os} in | |
181 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 182 | sysv4*) gdb_target=amix ;; |
afe4ca15 JG |
183 | esac |
184 | ;; | |
6c815bbe RP |
185 | hp) |
186 | case "${target_os}" in | |
187 | bsd) gdb_target=hp300bsd ;; | |
188 | hpux) gdb_target=hp300hpux ;; | |
189 | esac | |
190 | ;; | |
191 | sun) | |
192 | case "${target_os}" in | |
193 | sunos3) gdb_target=sun3os3 ;; | |
194 | sunos4) gdb_target=sun3os4 ;; | |
195 | *) gdb_target=sun3 ;; | |
196 | esac | |
197 | ;; | |
198 | wrs) gdb_target=vxworks68 ;; | |
199 | isi) gdb_target=isi ;; | |
200 | sony) gdb_target=news ;; | |
201 | esac | |
b159ce3f SEF |
202 | case "${target_os}" in |
203 | os68k) gdb_target=os68k ;; | |
204 | esac | |
6c815bbe RP |
205 | ;; |
206 | ||
207 | m68000) | |
208 | case "${target_vendor}" in | |
209 | sun) | |
210 | case "${target_os}" in | |
211 | sunos3) gdb_target=sun2os3 ;; | |
212 | sunos4) gdb_target=sun2os4 ;; | |
213 | *) gdb_target=sun2 ;; | |
214 | esac | |
215 | esac | |
216 | ;; | |
217 | ||
218 | m68030) | |
219 | case "${target_vendor}" in | |
220 | sony) gdb_target=news1000 ;; | |
221 | esac | |
222 | ;; | |
223 | ||
8c7ae4a2 | 224 | none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin) |
6c815bbe | 225 | gdb_target=${target_cpu} ;; |
6c815bbe | 226 | |
8c7ae4a2 SC |
227 | m88k) |
228 | case "${target_vendor}" in | |
229 | motorola) gdb_target=delta88 ;; | |
230 | *) gdb_target=dgux ;; | |
231 | esac | |
232 | ;; | |
473f3318 JG |
233 | a29k) |
234 | case "${target_os}" in | |
f74ff50f | 235 | none|aout|coff) gdb_target=a29k ;; |
473f3318 JG |
236 | sym1) gdb_target=ultra3 ;; |
237 | kern) gdb_target=a29k-kern ;; | |
44e4e473 | 238 | ebmon) gdb_target=a29k;; |
473f3318 JG |
239 | esac |
240 | ;; | |
241 | ||
6c815bbe RP |
242 | mips) |
243 | case "${target_vendor}" in | |
244 | sony) gdb_target=bigmips ;; | |
069bc454 | 245 | big) gdb_target=bigmips ;; |
5d2cfefe | 246 | dec) gdb_target=decstation ;; |
6c815bbe | 247 | little) gdb_target=littlemips ;; |
625453dc | 248 | sgi) gdb_target=irix3 ;; |
6c815bbe RP |
249 | esac |
250 | ;; | |
251 | ||
252 | c1 | c2) gdb_target=convex ;; | |
253 | ||
6c815bbe RP |
254 | sparc) |
255 | case "${target_vendor}" in | |
256 | sun) | |
257 | case "${target_os}" in | |
258 | sunos3) gdb_target=sun4os3 ;; | |
259 | sunos4) gdb_target=sun4os4 ;; | |
260 | *) gdb_target=sun4 ;; | |
261 | esac | |
262 | ;; | |
263 | esac | |
264 | ;; | |
265 | ||
ce7730d6 | 266 | h8300) |
8174b2af | 267 | gdb_target=h8300hms |
ce7730d6 | 268 | ;; |
6c815bbe | 269 | |
be9a2362 FF |
270 | i860) gdb_target=stratus |
271 | ;; | |
272 | ||
6c815bbe RP |
273 | i386) |
274 | case "${target_vendor}" in | |
69e87de2 RP |
275 | sco) gdb_target=i386sco ;; |
276 | sun) gdb_target=sun386 ;; | |
6c815bbe RP |
277 | sequent) gdb_target=symmetry ;; |
278 | *) | |
279 | case "${target_os}" in | |
6c815bbe | 280 | sysv32) gdb_target=i386v32 ;; |
92732c27 | 281 | scosysv3*) gdb_target=i386v32 ;; |
ee1ad69c FF |
282 | sysv4*) gdb_target=i386v4 ;; |
283 | sysv*) gdb_target=i386v ;; | |
6617b94e | 284 | mach) gdb_target=i386mach ;; |
2b61280a JG |
285 | coff) gdb_target=i386v ;; |
286 | aout) gdb_target=i386aout ;; | |
6c815bbe RP |
287 | esac |
288 | esac | |
289 | ;; | |
290 | ||
291 | i960) | |
292 | case "${target_vendor}" in | |
69e87de2 RP |
293 | bout | wrs) gdb_target=vxworks960 ;; |
294 | coff | intel) gdb_target=nindy960 ;; | |
6c815bbe RP |
295 | esac |
296 | ;; | |
297 | ||
298 | ns32k) | |
299 | case "${target_vendor}" in | |
300 | utek) gdb_target=umax ;; | |
301 | esac | |
302 | ;; | |
303 | ||
b90c4f33 JG |
304 | rs6000) |
305 | gdb_target=rs6000 | |
306 | ;; | |
307 | ||
6c815bbe RP |
308 | ### unhandled targets |
309 | # altosgas | |
310 | # i386v-g | |
311 | # i386v32-g | |
312 | ||
313 | esac | |
314 | ||
bc028766 | 315 | if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then |
6c815bbe | 316 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
317 | exit 1 |
318 | fi | |
319 | ||
320 | if [ -z "${removing}" ] ; then | |
f7fde1e0 | 321 | cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" { |
912e0732 RP |
322 | print substr($0,6)}' |
323 | fi | |
324 | ||
bdf3621b | 325 | # We really shouldn't depend on there being a space after TM_FILE= ... |
bc028766 | 326 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}` |
912e0732 | 327 | |
bcdbe02f RP |
328 | host_makefile_frag=config/mh-${gdb_host} |
329 | target_makefile_frag=config/mt-${gdb_target} | |
912e0732 | 330 | |
bdf3621b | 331 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the |
dc0c3f64 JG |
332 | # ?config/* file, we don't make the corresponding links. But we have |
333 | # to remove the xm.h files and tm.h files anyway, e.g. when switching | |
334 | # from "configure host" to "configure none". | |
bdf3621b JG |
335 | files= |
336 | links= | |
dc0c3f64 | 337 | rm -f xm.h |
bdf3621b JG |
338 | if [ "${hostfile}" != "" ]; then |
339 | files="${files} ${hostfile}" | |
340 | links="${links} xm.h" | |
341 | fi | |
dc0c3f64 | 342 | rm -f tm.h |
bdf3621b JG |
343 | if [ "${targetfile}" != "" ]; then |
344 | files="${files} ${targetfile}" | |
345 | links="${links} tm.h" | |
346 | fi | |
347 | ||
348 | # post-target: | |
912e0732 | 349 | |
bdf3621b JG |
350 | case ${srcdir} in |
351 | .) | |
352 | ;; | |
353 | *) | |
354 | grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \ | |
355 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
356 | esac | |
357 | ||
dc0c3f64 | 358 | cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile |