Commit | Line | Data |
---|---|---|
e040b94b | 1 | configdirs="doc" |
912e0732 RP |
2 | srcname="GDB" |
3 | srctrigger=main.c | |
bc028766 | 4 | |
0df06ca0 RP |
5 | # per-host: |
6 | ||
6c815bbe RP |
7 | # map host info into gdb names. |
8 | ||
19758e9e | 9 | case "${host}" in |
6c815bbe | 10 | |
19758e9e JG |
11 | a29k-*-*) gdb_host=ultra3 ;; |
12 | ||
13 | arm-*-*) gdb_host=arm ;; | |
14 | ||
15 | c[12]-*-*) gdb_host=convex ;; | |
16 | ||
19758e9e | 17 | hppa*-hp-bsd) gdb_host=hppabsd ;; |
ef131e13 | 18 | hppa*-hp-hpux) gdb_host=hppahpux ;; |
19758e9e | 19 | |
19758e9e | 20 | i[34]86-ncr-*) gdb_host=ncr3000 ;; |
ef131e13 | 21 | i[34]86-sequent-*) gdb_host=symmetry ;; |
19758e9e | 22 | |
6d685882 | 23 | i[34]86-*-bsd*) gdb_host=i386bsd ;; |
19758e9e | 24 | i[34]86-*-go32) gdb_host=go32 ;; |
ef131e13 JG |
25 | i[34]86-*-linux) gdb_host=linux ;; |
26 | i[34]86-*-mach) gdb_host=i386mach ;; | |
cf57ff2a | 27 | i[34]86-*-sco*) gdb_host=i386sco ;; |
5c820c19 | 28 | i[34]86-*-solaris*) gdb_host=i386sol2 ;; |
b1aa08e2 | 29 | i[34]86-*-sunos*) gdb_host=sun386 ;; |
ef131e13 | 30 | i[34]86-*-sysv32) gdb_host=i386v32 ;; |
19758e9e JG |
31 | i[34]86-*-sysv4*) gdb_host=i386v4 ;; |
32 | i[34]86-*-sysv*) gdb_host=i386v ;; | |
19758e9e JG |
33 | |
34 | i860-*-*) gdb_host=stratus ;; | |
35 | ||
358ca35e JG |
36 | m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;; |
37 | m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;; | |
ef131e13 | 38 | m68030-sony-*) gdb_host=news1000 ;; |
19758e9e | 39 | |
358ca35e JG |
40 | m68*-altos-*) gdb_host=altos ;; |
41 | m68*-apollo*-sysv*) gdb_host=apollo68v ;; | |
42 | m68*-apollo*-bsd*) gdb_host=apollo68b ;; | |
43 | m68*-att-*) gdb_host=3b1 ;; | |
44 | m68*-cbm-sysv4*) gdb_host=amix ;; | |
45 | m68*-hp-bsd) gdb_host=hp300bsd ;; | |
46 | m68*-hp-hpux) gdb_host=hp300hpux ;; | |
47 | m68*-isi-*) gdb_host=isi ;; | |
48 | m68*-sony-*) gdb_host=news ;; | |
49 | m68*-sun-sunos3*) gdb_host=sun3os3 ;; | |
50 | m68*-sun-sunos4*) gdb_host=sun3os4 ;; | |
51 | m68*-sun-*) gdb_host=sun3os4 ;; | |
19758e9e | 52 | |
19758e9e JG |
53 | m88k-motorola-*) gdb_host=delta88 ;; |
54 | m88k-*-*) gdb_host=m88k ;; | |
55 | ||
19758e9e JG |
56 | mips-dec-*) gdb_host=decstation ;; |
57 | mips-little-*) gdb_host=littlemips ;; | |
58 | mips-sgi-irix3) gdb_host=irix3 ;; | |
59 | mips-sgi-irix4) gdb_host=irix4 ;; | |
ef131e13 | 60 | mips-sony-*) gdb_host=bigmips ;; |
19758e9e JG |
61 | |
62 | none-*-*) gdb_host=none ;; | |
ef131e13 | 63 | |
19758e9e JG |
64 | np1-*-*) gdb_host=np1 ;; |
65 | ||
66 | ns32k-umax-*) gdb_host=umax ;; | |
67 | ns32k-utek-sysv) gdb_host=merlin ;; | |
68 | ||
19758e9e JG |
69 | pn-*-*) gdb_host=pn ;; |
70 | ||
71 | pyramid-*-*) gdb_host=pyramid ;; | |
72 | ||
73 | romp-*-*) gdb_host=rtbsd ;; | |
74 | ||
75 | rs6000-*-*) gdb_host=rs6000 ;; | |
76 | ||
ef131e13 | 77 | sparc-*-solaris2*) gdb_host=sun4sol2 ;; |
ebb3a1e5 | 78 | sparc-*-sunos4*) gdb_host=sun4os4 ;; |
b52373a2 | 79 | sparc-*-*) gdb_host=sun4os4 ;; |
19758e9e JG |
80 | |
81 | tahoe-*-*) gdb_host=tahoe ;; | |
82 | ||
83 | vax-*-bsd*) gdb_host=vaxbsd ;; | |
84 | vax-*-ultrix*) gdb_host=vaxult ;; | |
7da1e27d | 85 | |
6c815bbe RP |
86 | esac |
87 | ||
8c7ae4a2 | 88 | |
fe7ca711 | 89 | if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then |
6c815bbe | 90 | echo '***' "Gdb does not support host ${host}" 1>&2 |
912e0732 RP |
91 | exit 1 |
92 | fi | |
93 | ||
bdf3621b | 94 | # We really shouldn't depend on there being a space after XM_FILE= ... |
fe7ca711 | 95 | hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh` |
912e0732 | 96 | |
0df06ca0 | 97 | # per-target: |
912e0732 | 98 | |
ef131e13 JG |
99 | case "${target}" in |
100 | ||
101 | a29k-*-aout) gdb_target=a29k ;; | |
102 | a29k-*-coff) gdb_target=a29k ;; | |
ebb3a1e5 | 103 | a29k-*-elf) gdb_target=a29k ;; |
ef131e13 JG |
104 | a29k-*-ebmon) gdb_target=a29k ;; |
105 | a29k-*-kern) gdb_target=a29k-kern ;; | |
106 | a29k-*-none) gdb_target=a29k ;; | |
107 | a29k-*-sym1) gdb_target=ultra3 ;; | |
108 | a29k-*-udi) gdb_target=a29k-udi ;; | |
109 | ||
110 | arm-*-*) gdb_target=arm ;; | |
111 | ||
112 | c1-*-*) gdb_target=convex ;; | |
113 | c2-*-*) gdb_target=convex ;; | |
114 | ||
115 | h8300-*-*) gdb_target=h8300hms ;; | |
116 | ||
117 | hppa*-*-bsd) gdb_target=hppabsd ;; | |
118 | hppa*-*-hpux) gdb_target=hppahpux ;; | |
119 | ||
120 | i[34]86-sequent-*) gdb_target=symmetry ;; | |
121 | i[34]86-ncr-*) gdb_target=ncr3000 ;; | |
ebb3a1e5 JG |
122 | |
123 | i[34]86-*-aout) gdb_target=i386aout ;; | |
124 | i[34]86-*-coff) gdb_target=i386v ;; | |
125 | i[34]86-*-elf) gdb_target=i386v ;; | |
126 | ||
6d685882 | 127 | i[34]86-*-bsd*) gdb_target=i386bsd ;; |
e633652f | 128 | i[34]86-*-go32) gdb_target=i386aout ;; |
5c820c19 | 129 | i[34]86-*-solaris*) gdb_target=i386sol2 ;; |
ef131e13 JG |
130 | i[34]86-*-sunos*) gdb_target=sun386 ;; |
131 | i[34]86-*-sysv4*) gdb_target=i386v4 ;; | |
cf57ff2a | 132 | i[34]86-*-sco*) gdb_target=i386v ;; |
ef131e13 | 133 | i[34]86-*-sysv*) gdb_target=i386v ;; |
ef131e13 JG |
134 | i[34]86-*-linux) gdb_target=linux ;; |
135 | ||
136 | i860-*-*) gdb_target=stratus ;; | |
137 | ||
138 | i960-*-bout) gdb_target=vxworks960 ;; | |
139 | i960-*-coff) gdb_target=nindy960 ;; | |
ebb3a1e5 JG |
140 | i960-*-elf) gdb_target=nindy960 ;; |
141 | ||
ef131e13 JG |
142 | i960-*-nindy) gdb_target=nindy960 ;; |
143 | i960-*-vxworks) gdb_target=vxworks960 ;; | |
144 | ||
ebb3a1e5 JG |
145 | m68000-*-sunos3*) gdb_target=sun2os3 ;; |
146 | m68000-*-sunos4*) gdb_target=sun2os4 ;; | |
ef131e13 | 147 | |
358ca35e JG |
148 | m68*-cbm-sysv4*) gdb_target=amix ;; |
149 | m68*-hp-bsd) gdb_target=hp300bsd ;; | |
150 | m68*-hp-hpux) gdb_target=hp300hpux ;; | |
151 | ||
152 | m68*-altos-*) gdb_target=altos ;; | |
153 | m68*-att-*) gdb_target=3b1 ;; | |
154 | m68*-ericsson-*) gdb_target=es1800 ;; | |
155 | m68*-isi-*) gdb_target=isi ;; | |
156 | m68*-netx-*) gdb_target=vxworks68 ;; | |
157 | m68*-sony-*) gdb_target=news ;; | |
158 | m68*-tandem-*) gdb_target=st2000 ;; | |
159 | ||
160 | m68*-*-aout) gdb_target=m68k-un ;; | |
161 | m68*-*-coff) gdb_target=m68k-noun ;; | |
162 | m68*-*-elf) gdb_target=m68k-noun ;; | |
163 | m68*-*-os68k) gdb_target=os68k ;; | |
164 | m68*-*-sunos3*) gdb_target=sun3os3 ;; | |
165 | m68*-*-sunos4*) gdb_target=sun3os4 ;; | |
166 | m68*-*-vxworks*) gdb_target=vxworks68 ;; | |
ef131e13 JG |
167 | |
168 | m88k-motorola-*) gdb_target=delta88 ;; | |
169 | m88k-*-*) gdb_target=m88k ;; | |
170 | ||
171 | mips-big-*) gdb_target=bigmips ;; | |
172 | mips-dec-*) gdb_target=decstation ;; | |
173 | mips-little-*) gdb_target=littlemips ;; | |
174 | mips-sgi-*) gdb_target=irix3 ;; | |
175 | mips-sony-*) gdb_target=bigmips ;; | |
176 | ||
177 | none-*-*) gdb_target=none ;; | |
178 | ||
179 | np1-*-*) gdb_target=np1 ;; | |
180 | ||
181 | ns32k-utek-sysv) gdb_target=merlin ;; | |
182 | ns32k-utek-*) gdb_target=umax ;; | |
183 | ||
184 | pn-*-*) gdb_target=pn ;; | |
185 | ||
186 | pyramid-*-*) gdb_target=pyramid ;; | |
187 | ||
188 | rs6000-*-*) gdb_target=rs6000 ;; | |
189 | ||
ebb3a1e5 JG |
190 | sparc-*-aout) gdb_target=sparc-un ;; |
191 | sparc-*-coff) gdb_target=sparc-noun ;; | |
192 | sparc-*-elf) gdb_target=sparc-noun ;; | |
ef131e13 | 193 | sparc-*-solaris2*) gdb_target=sun4sol2 ;; |
ebb3a1e5 JG |
194 | sparc-*-sunos4*) gdb_target=sun4os4 ;; |
195 | sparc-*-vxworks*) gdb_target=sparc-un ;; | |
b52373a2 | 196 | sparc-*-*) gdb_target=sun4os4 ;; |
e633652f | 197 | sparclite-*-*) gdb_target=sun4os4 ;; |
ef131e13 JG |
198 | |
199 | tahoe-*-*) gdb_target=tahoe ;; | |
200 | vax-*-*) gdb_target=vax ;; | |
6c815bbe RP |
201 | |
202 | esac | |
203 | ||
fe7ca711 | 204 | if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then |
6c815bbe | 205 | echo '***' "Gdb does not support target ${target}" 1>&2 |
912e0732 RP |
206 | exit 1 |
207 | fi | |
208 | ||
209 | if [ -z "${removing}" ] ; then | |
fe7ca711 | 210 | cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" { |
912e0732 RP |
211 | print substr($0,6)}' |
212 | fi | |
213 | ||
bdf3621b | 214 | # We really shouldn't depend on there being a space after TM_FILE= ... |
fe7ca711 | 215 | targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt` |
912e0732 | 216 | |
d40309c7 JG |
217 | if [ "${target}" = "${host}" ] ; then |
218 | nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh` | |
219 | fi | |
220 | ||
fe7ca711 SC |
221 | host_makefile_frag=config/${gdb_host}.mh |
222 | target_makefile_frag=config/${gdb_target}.mt | |
912e0732 | 223 | |
d40309c7 JG |
224 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
225 | # (NAT_FILE) is not set in the ?config/* file, we don't make the | |
226 | # corresponding links. But we have to remove the xm.h files and tm.h | |
227 | # files anyway, e.g. when switching from "configure host" to | |
228 | # "configure none". | |
229 | ||
bdf3621b JG |
230 | files= |
231 | links= | |
dc0c3f64 | 232 | rm -f xm.h |
bdf3621b JG |
233 | if [ "${hostfile}" != "" ]; then |
234 | files="${files} ${hostfile}" | |
235 | links="${links} xm.h" | |
236 | fi | |
dc0c3f64 | 237 | rm -f tm.h |
bdf3621b JG |
238 | if [ "${targetfile}" != "" ]; then |
239 | files="${files} ${targetfile}" | |
240 | links="${links} tm.h" | |
241 | fi | |
d40309c7 JG |
242 | rm -f nat.h |
243 | if [ "${nativefile}" != "" ]; then | |
244 | files="${files} ${nativefile}" | |
dfc82617 | 245 | links="${links} nm.h" |
c9c23412 RP |
246 | # temporary scaffolding until all hosts have the host/target/native |
247 | # split in place. | |
248 | else | |
dfc82617 RP |
249 | files="${files} nm-trash.h" |
250 | links="${links} nm.h" | |
d40309c7 | 251 | fi |
bdf3621b JG |
252 | |
253 | # post-target: | |
912e0732 | 254 | |
bdf3621b JG |
255 | case ${srcdir} in |
256 | .) | |
257 | ;; | |
258 | *) | |
259 | grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \ | |
260 | echo "source ${srcdir}/.gdbinit" >> .gdbinit | |
261 | esac | |
262 | ||
c1ab5dba | 263 | if [ "${nativefile}" = "" ] ; then |
41617f8b | 264 | sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \ |
d40309c7 JG |
265 | < Makefile > Makefile.tem |
266 | mv -f Makefile.tem Makefile | |
267 | fi | |
268 | ||
dc0c3f64 | 269 | cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile |