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