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