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 ;; | |
6617b94e | 96 | mach) gdb_host=i386mach ;; |
6c815bbe RP |
97 | esac |
98 | ;; | |
99 | esac | |
100 | ;; | |
101 | ||
102 | c1 | c2) gdb_host=convex ;; | |
103 | ||
104 | ns32k) | |
105 | case "${host_vendor}" in | |
106 | umax) gdb_host=umax ;; | |
107 | esac | |
108 | ;; | |
109 | ||
0476df73 | 110 | romp) |
473f3318 JG |
111 | gdb_host=rtbsd |
112 | ;; | |
113 | ||
b90c4f33 JG |
114 | rs6000) |
115 | gdb_host=rs6000 | |
116 | ;; | |
117 | ||
473f3318 JG |
118 | a29k) |
119 | gdb_host=ultra3 | |
120 | ;; | |
121 | ||
8c7ae4a2 SC |
122 | m88k) |
123 | case "${host_vendor}" in | |
124 | motorola) | |
125 | gdb_host=delta88 ;; | |
126 | *) | |
127 | gdb_host=m88k ;; | |
128 | esac | |
129 | ;; | |
130 | ||
131 | arm | vax | merlin | none | np1 | pn | pyramid | tahoe) | |
473f3318 JG |
132 | gdb_host=${host_cpu} |
133 | ;; | |
6c815bbe RP |
134 | |
135 | ### unhandled hosts | |
136 | #altosgas | |
137 | #i386v-g | |
138 | #i386v32-g | |
139 | ||
140 | esac | |
141 | ||
8c7ae4a2 | 142 | |
bc028766 | 143 | if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then |
6c815bbe | 144 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
145 | exit 1 |
146 | fi | |
147 | ||
bdf3621b | 148 | # We really shouldn't depend on there being a space after XM_FILE= ... |
bc028766 | 149 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}` |
912e0732 | 150 | |
0df06ca0 | 151 | # per-target: |
912e0732 | 152 | |
6c815bbe RP |
153 | case "${target_cpu}" in |
154 | ||
155 | m68k) | |
156 | case "${target_vendor}" in | |
157 | att) gdb_target=3b1 ;; | |
158 | altos) gdb_target=altos ;; | |
afe4ca15 JG |
159 | cbm) |
160 | case ${target_os} in | |
161 | amigados) gdb_host=amigados ;; | |
ee1ad69c | 162 | sysv4*) gdb_target=amix ;; |
afe4ca15 JG |
163 | esac |
164 | ;; | |
6c815bbe RP |
165 | hp) |
166 | case "${target_os}" in | |
167 | bsd) gdb_target=hp300bsd ;; | |
168 | hpux) gdb_target=hp300hpux ;; | |
169 | esac | |
170 | ;; | |
171 | sun) | |
172 | case "${target_os}" in | |
173 | sunos3) gdb_target=sun3os3 ;; | |
174 | sunos4) gdb_target=sun3os4 ;; | |
175 | *) gdb_target=sun3 ;; | |
176 | esac | |
177 | ;; | |
178 | wrs) gdb_target=vxworks68 ;; | |
179 | isi) gdb_target=isi ;; | |
180 | sony) gdb_target=news ;; | |
181 | esac | |
182 | ;; | |
183 | ||
184 | m68000) | |
185 | case "${target_vendor}" in | |
186 | sun) | |
187 | case "${target_os}" in | |
188 | sunos3) gdb_target=sun2os3 ;; | |
189 | sunos4) gdb_target=sun2os4 ;; | |
190 | *) gdb_target=sun2 ;; | |
191 | esac | |
192 | esac | |
193 | ;; | |
194 | ||
195 | m68030) | |
196 | case "${target_vendor}" in | |
197 | sony) gdb_target=news1000 ;; | |
198 | esac | |
199 | ;; | |
200 | ||
8c7ae4a2 | 201 | none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin) |
6c815bbe | 202 | gdb_target=${target_cpu} ;; |
6c815bbe | 203 | |
8c7ae4a2 SC |
204 | m88k) |
205 | case "${target_vendor}" in | |
206 | motorola) gdb_target=delta88 ;; | |
207 | *) gdb_target=dgux ;; | |
208 | esac | |
209 | ;; | |
473f3318 JG |
210 | a29k) |
211 | case "${target_os}" in | |
f74ff50f | 212 | none|aout|coff) gdb_target=a29k ;; |
473f3318 JG |
213 | sym1) gdb_target=ultra3 ;; |
214 | kern) gdb_target=a29k-kern ;; | |
44e4e473 | 215 | ebmon) gdb_target=a29k;; |
473f3318 JG |
216 | esac |
217 | ;; | |
218 | ||
6c815bbe RP |
219 | mips) |
220 | case "${target_vendor}" in | |
221 | sony) gdb_target=bigmips ;; | |
5d2cfefe | 222 | dec) gdb_target=decstation ;; |
6c815bbe | 223 | little) gdb_target=littlemips ;; |
625453dc | 224 | sgi) gdb_target=irix3 ;; |
6c815bbe RP |
225 | esac |
226 | ;; | |
227 | ||
228 | c1 | c2) gdb_target=convex ;; | |
229 | ||
6c815bbe RP |
230 | sparc) |
231 | case "${target_vendor}" in | |
232 | sun) | |
233 | case "${target_os}" in | |
234 | sunos3) gdb_target=sun4os3 ;; | |
235 | sunos4) gdb_target=sun4os4 ;; | |
236 | *) gdb_target=sun4 ;; | |
237 | esac | |
238 | ;; | |
239 | esac | |
240 | ;; | |
241 | ||
ce7730d6 SC |
242 | h8300) |
243 | gdb_target=h8300hds | |
244 | ;; | |
6c815bbe | 245 | |
be9a2362 FF |
246 | i860) gdb_target=stratus |
247 | ;; | |
248 | ||
6c815bbe RP |
249 | i386) |
250 | case "${target_vendor}" in | |
69e87de2 RP |
251 | sco) gdb_target=i386sco ;; |
252 | sun) gdb_target=sun386 ;; | |
6c815bbe RP |
253 | sequent) gdb_target=symmetry ;; |
254 | *) | |
255 | case "${target_os}" in | |
6c815bbe | 256 | sysv32) gdb_target=i386v32 ;; |
ee1ad69c FF |
257 | sysv4*) gdb_target=i386v4 ;; |
258 | sysv*) gdb_target=i386v ;; | |
6617b94e | 259 | mach) gdb_target=i386mach ;; |
2b61280a JG |
260 | coff) gdb_target=i386v ;; |
261 | aout) gdb_target=i386aout ;; | |
6c815bbe RP |
262 | esac |
263 | esac | |
264 | ;; | |
265 | ||
266 | i960) | |
267 | case "${target_vendor}" in | |
69e87de2 RP |
268 | bout | wrs) gdb_target=vxworks960 ;; |
269 | coff | intel) gdb_target=nindy960 ;; | |
6c815bbe RP |
270 | esac |
271 | ;; | |
272 | ||
273 | ns32k) | |
274 | case "${target_vendor}" in | |
275 | utek) gdb_target=umax ;; | |
276 | esac | |
277 | ;; | |
278 | ||
b90c4f33 JG |
279 | rs6000) |
280 | gdb_target=rs6000 | |
281 | ;; | |
282 | ||
6c815bbe RP |
283 | ### unhandled targets |
284 | # altosgas | |
285 | # i386v-g | |
286 | # i386v32-g | |
287 | ||
288 | esac | |
289 | ||
bc028766 | 290 | if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then |
6c815bbe | 291 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
292 | exit 1 |
293 | fi | |
294 | ||
295 | if [ -z "${removing}" ] ; then | |
f7fde1e0 | 296 | cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" { |
912e0732 RP |
297 | print substr($0,6)}' |
298 | fi | |
299 | ||
bdf3621b | 300 | # We really shouldn't depend on there being a space after TM_FILE= ... |
bc028766 | 301 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}` |
912e0732 | 302 | |
3978d059 JG |
303 | host_makefile_frag=config/mh-${gdb_host} |
304 | target_makefile_frag=config/mt-${gdb_target} | |
912e0732 | 305 | |
bdf3621b | 306 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the |
dc0c3f64 JG |
307 | # ?config/* file, we don't make the corresponding links. But we have |
308 | # to remove the xm.h files and tm.h files anyway, e.g. when switching | |
309 | # from "configure host" to "configure none". | |
bdf3621b JG |
310 | files= |
311 | links= | |
dc0c3f64 | 312 | rm -f xm.h |
bdf3621b JG |
313 | if [ "${hostfile}" != "" ]; then |
314 | files="${files} ${hostfile}" | |
315 | links="${links} xm.h" | |
316 | fi | |
dc0c3f64 | 317 | rm -f tm.h |
bdf3621b JG |
318 | if [ "${targetfile}" != "" ]; then |
319 | files="${files} ${targetfile}" | |
320 | links="${links} tm.h" | |
321 | fi | |
322 | ||
323 | # post-target: | |
912e0732 | 324 | |
bdf3621b JG |
325 | case ${srcdir} in |
326 | .) | |
327 | ;; | |
328 | *) | |
329 | grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \ | |
330 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
331 | esac | |
332 | ||
dc0c3f64 | 333 | cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile |