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