* Makefile.in, gdb.{base,c++,chill}/Makefile.in (GDB, GDBFLAGS):
[binutils-gdb.git] / gdb / testsuite / gdb.base / Makefile.in
1 # Makefile for the base tests for GDB.
2 # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3
4 # This file is part of GDB.
5
6 # GDB is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # GDB is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; see the file COPYING. If not, write to
18 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 srcdir = .
21 prefix = /usr/local
22 program_transform_name =
23
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(libdir)/$(target_alias)
28
29 datadir = $(exec_prefix)/lib/dejagnu
30 mandir = $(prefix)/man
31 man1dir = $(mandir)/man1
32 man2dir = $(mandir)/man2
33 man3dir = $(mandir)/man3
34 man4dir = $(mandir)/man4
35 man5dir = $(mandir)/man5
36 man6dir = $(mandir)/man6
37 man7dir = $(mandir)/man7
38 man8dir = $(mandir)/man8
39 man9dir = $(mandir)/man9
40 infodir = $(prefix)/info
41 includedir = $(prefix)/include
42 gxx_includedir = $(tooldir)/g++-include
43 docdir = $(datadir)/doc
44 targetdir = $(datadir)/$(target_alias)
45
46 SHELL = /bin/sh
47
48 INSTALL = install -c
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL)
51
52 CFLAGS = -g
53
54 RUNTESTFLAGS =
55
56 LINK= ln -s
57
58 EXPECT = ` \
59 if [ -f $${rootme}/../../../expect/expect ] ; then \
60 echo $${rootme}/../../../expect/expect ; \
61 else \
62 echo expect ; \
63 fi`
64
65 RUNTEST = ` \
66 if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
67 echo $${rootme}/../../dejagnu/runtest ; \
68 else \
69 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
70 echo runtest; \
71 else \
72 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
73 fi; \
74 fi`
75
76 CC = ` \
77 if [ -f $${rootme}/../../../gcc/xgcc ] ; then \
78 echo $${rootme}/../../../gcc/xgcc -B$${rootme}/../../../gcc/; \
79 else \
80 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
81 echo gcc; \
82 else \
83 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
84 fi; \
85 fi`
86
87 #### host, target, and site specific Makefile frags come in here.
88
89 EXECUTABLES = \
90 bitfields \
91 break \
92 callfuncs \
93 coremaker \
94 exprs \
95 funcargs \
96 interrupt \
97 langs \
98 list \
99 mips_pro \
100 nodebug \
101 opaque \
102 opaque-info.exp \
103 printcmds \
104 ptype \
105 recurse \
106 return \
107 run \
108 scope \
109 setvar \
110 sigall \
111 signals \
112 twice \
113 watchpoint \
114 whatis \
115 whatis-info.exp \
116 $(CROSS_EXECUTABLES)
117
118 # List of test executables that we have available. They are kept in
119 # uuencoded format to avoid SCCS/RCS problems with binary files.
120
121 CROSS_EXECUTABLES = \
122 i486-elf \
123 i860-elf \
124 m68k-elf \
125 m68k-aout \
126 m68k-aout2 \
127 mips-ecoff \
128 sparc-aout \
129 sparc-elf
130
131 .c.o:
132 $(CC) -c $(CFLAGS) $<
133
134
135 all: $(EXECUTABLES)
136
137 run: run.o
138 $(CC) $(CFLAGS) $(LDFLAGS) -o run run.o $(LIBS)
139
140 # We want to make sure comp-info.exp reflects the way that whatis was compiled;
141 # that's why this isn't a separate rule.
142
143 whatis whatis-info.exp: whatis.o
144 $(CC) $(CFLAGS) $(LDFLAGS) -o whatis.tmp whatis.o $(LIBS)
145 $(CC) $(CFLAGS) -E $(srcdir)/whatis-info.c >whatis-info.tmp
146 mv whatis-info.tmp whatis-info.exp
147 mv whatis.tmp whatis
148
149 .PRECIOUS: whatis whatis-info.exp
150
151 ptype: ptype.o
152 $(CC) $(CFLAGS) $(LDFLAGS) -o ptype ptype.o $(LIBS)
153
154 setvar: setvar.o
155 $(CC) $(CFLAGS) $(LDFLAGS) -o setvar setvar.o $(LIBS)
156
157 exprs: exprs.o
158 $(CC) $(CFLAGS) $(LDFLAGS) -o exprs exprs.o $(LIBS)
159
160 break: break.o
161 $(CC) $(CFLAGS) $(LDFLAGS) -o break break.o $(LIBS)
162
163 signals: signals.o
164 $(CC) $(CFLAGS) $(LDFLAGS) -o signals signals.o $(LIBS)
165
166 sigall: sigall.o
167 $(CC) $(CFLAGS) $(LDFLAGS) -o sigall sigall.o $(LIBS)
168
169 twice: twice.c
170 echo '#include "twice.c"' >twice-tmp.c
171 $(CC) $(CFLAGS) $(LDFLAGS) -I$(srcdir) -o twice twice-tmp.c $(LIBS)
172 rm -f twice-tmp.c
173
174 watchpoint: watchpoint.o
175 $(CC) $(CFLAGS) $(LDFLAGS) -o watchpoint watchpoint.o $(LIBS)
176
177 recurse: recurse.o
178 $(CC) $(CFLAGS) $(LDFLAGS) -o recurse recurse.o $(LIBS)
179
180 # We want to make sure opaque-info.exp reflects the way that opaque
181 # was compiled; that's why this isn't a separate rule.
182
183 opaque opaque-info.exp: opaque0.o opaque1.o
184 $(CC) $(CFLAGS) $(LDFLAGS) -o opaque.tmp opaque0.o opaque1.o $(LIBS)
185 $(CC) $(CFLAGS) -E $(srcdir)/opaque-info.c >opaque-info.tmp
186 mv opaque-info.tmp opaque-info.exp
187 mv opaque.tmp opaque
188
189 coremaker: coremaker.o
190 $(CC) $(CFLAGS) $(LDFLAGS) -o coremaker coremaker.o $(LIBS)
191
192 nodebug: nodebug.o
193 $(CC) $(LDFLAGS) $(NODEBUG_FLAGS) -o nodebug nodebug.o $(LIBS)
194
195 # This gets compiled *without* -g, so don't add CFLAGS here.
196
197 nodebug.o: nodebug.c
198 $(CC) -c $(srcdir)/nodebug.c
199
200 # For VPATH and Sun Make, we have to make explicit dependencies.
201 # DEC make doesn't seem to understand the ".u" dependency w/VPATH either.
202
203 m68k-elf: $(srcdir)/m68k-elf.u
204 uudecode $(srcdir)/m68k-elf.u
205
206 m68k-aout: $(srcdir)/m68k-aout.u
207 uudecode $(srcdir)/m68k-aout.u
208
209 m68k-aout2: $(srcdir)/m68k-aout2.u
210 uudecode $(srcdir)/m68k-aout2.u
211
212 mips-ecoff: $(srcdir)/mips-ecoff.u
213 uudecode $(srcdir)/mips-ecoff.u
214
215 i486-elf: $(srcdir)/i486-elf.u
216 uudecode $(srcdir)/i486-elf.u
217
218 sparc-aout: $(srcdir)/sparc-aout.u
219 uudecode $(srcdir)/sparc-aout.u
220
221 i860-elf: $(srcdir)/i860-elf.u
222 uudecode $(srcdir)/i860-elf.u
223
224 sparc-elf: $(srcdir)/sparc-elf.u
225 uudecode $(srcdir)/sparc-elf.u
226
227 list: list0.o list1.o
228 $(CC) $(CFLAGS) $(LDFLAGS) -o list list0.o list1.o $(LIBS)
229
230 scope: scope0.o scope1.o
231 $(CC) $(CFLAGS) $(LDFLAGS) -o scope scope0.o scope1.o $(LIBS)
232
233 langs: langs0.o langs1.o langs2.o
234 $(CC) $(CFLAGS) $(LDFLAGS) -o langs langs0.o langs1.o langs2.o $(LIBS)
235
236 bitfields: bitfields.o
237 $(CC) $(CFLAGS) $(LDFLAGS) -o bitfields.tmp bitfields.o $(LIBS)
238 mv bitfields.tmp bitfields
239
240 .PRECIOUS: bitfields
241
242 funcargs: funcargs.o
243 $(CC) $(CFLAGS) $(LDFLAGS) -o funcargs funcargs.o $(LIBS)
244
245 return: return.o
246 $(CC) $(CFLAGS) $(LDFLAGS) -o return return.o $(LIBS)
247
248 mips_pro: mips_pro.o
249 $(CC) $(CFLAGS) $(LDFLAGS) -o mips_pro mips_pro.o $(LIBS)
250
251 printcmds: printcmds.o
252 $(CC) $(CFLAGS) $(LDFLAGS) -o printcmds printcmds.o $(LIBS)
253
254 callfuncs: callfuncs.o
255 $(CC) $(CFLAGS) $(LDFLAGS) -o callfuncs callfuncs.o $(LIBS)
256
257 interrupt: interrupt.o
258 $(CC) $(CFLAGS) $(LDFLAGS) -o interrupt interrupt.o $(LIBS)
259
260 .NOEXPORT:
261
262 INFODIRS=doc
263
264 info:
265
266 install-info:
267
268 dvi:
269
270 install:
271
272 uninstall: force
273
274 site.exp: ./config.status Makefile
275 @echo "Making a new config file..."
276 -@rm -f ./tmp?
277 @touch site.exp
278 -@mv site.exp site.bak
279 @echo "## these variables are automatically generated by make ##" > ./tmp0
280 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
281 @echo "# add them to the last section" >> ./tmp0
282 @echo "set host_triplet ${host_canonical}" >> ./tmp0
283 @echo "set target_triplet ${target_canonical}" >> ./tmp0
284 @echo "set srcdir ${srcdir}" >> ./tmp0
285 @echo "set objdir `pwd`" >> ./tmp0
286 @echo "set tool gdb" >> ./tmp0
287 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
288 @cat ./tmp0 > site.exp
289 @cat site.bak | sed \
290 -e '1,/^## All variables above are.*##/ d' >> site.exp
291 -@rm -f ./tmp?
292
293 installcheck:
294 check: site.exp all just-check
295 just-check:
296 rootme=`pwd`; export rootme; \
297 srcdir=${srcdir} ; export srcdir ; \
298 EXPECT=${EXPECT} ; export EXPECT ; \
299 if [ -f $${rootme}/../../expect/expect ] ; then \
300 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
301 export TCL_LIBRARY ; fi ; \
302 $(RUNTEST) $(RUNTESTFLAGS) --tool gdb --srcdir $(srcdir)
303
304 clean mostlyclean:
305 -rm -f *~ *.o a.out xgdb *.x $(EXECUTABLES)
306 -rm -f core core.coremaker coremaker.core corefile
307
308 distclean realclean: clean
309 -rm -f *~ core *.log *.plog *.sum *.psum site.*
310 -rm -f Makefile config.status *-init.exp
311 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
312
313 Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
314 $(SHELL) ./config.status
315