]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/Makefile.in
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/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; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 printcmds \
103 ptype \
104 recurse \
105 return \
106 run \
107 scope \
108 setvar \
109 sigall \
110 signals \
111 twice \
112 watchpoint \
113 whatis \
114 $(CROSS_EXECUTABLES)
115
116 # List of test executables that we have available. They are kept in
117 # uuencoded format to avoid SCCS/RCS problems with binary files.
118
119 CROSS_EXECUTABLES = \
120 i486-elf \
121 i860-elf \
122 m68k-elf \
123 m68k-aout \
124 m68k-aout2 \
125 mips-ecoff \
126 sparc-aout \
127 sparc-elf
128
129 .c.o:
130 $(CC) -c $(CFLAGS) $<
131 $(CC) -E $(CFLAGS) $(srcdir)/compiler.c >$*.tmp
132 mv $*.tmp $*.ci
133
134 all: $(EXECUTABLES)
135
136 run: run.o
137 $(CC) $(CFLAGS) $(LDFLAGS) -o run run.o $(LIBS)
138
139 whatis: whatis.o
140 $(CC) $(CFLAGS) $(LDFLAGS) -o whatis whatis.o $(LIBS)
141
142 .PRECIOUS: whatis
143
144 ptype: ptype.o
145 $(CC) $(CFLAGS) $(LDFLAGS) -o ptype ptype.o $(LIBS)
146
147 setvar: setvar.o
148 $(CC) $(CFLAGS) $(LDFLAGS) -o setvar setvar.o $(LIBS)
149
150 exprs: exprs.o
151 $(CC) $(CFLAGS) $(LDFLAGS) -o exprs exprs.o $(LIBS)
152
153 break: break.o
154 $(CC) $(CFLAGS) $(LDFLAGS) -o break break.o $(LIBS)
155
156 signals: signals.o
157 $(CC) $(CFLAGS) $(LDFLAGS) -o signals signals.o $(LIBS)
158
159 sigall: sigall.o
160 $(CC) $(CFLAGS) $(LDFLAGS) -o sigall sigall.o $(LIBS)
161
162 twice: twice.c
163 echo '#include "twice.c"' >twice-tmp.c
164 $(CC) $(CFLAGS) $(LDFLAGS) -I$(srcdir) -o twice twice-tmp.c $(LIBS)
165 rm -f twice-tmp.c
166
167 watchpoint: watchpoint.o
168 $(CC) $(CFLAGS) $(LDFLAGS) -o watchpoint watchpoint.o $(LIBS)
169
170 recurse: recurse.o
171 $(CC) $(CFLAGS) $(LDFLAGS) -o recurse recurse.o $(LIBS)
172
173 opaque: opaque0.o opaque1.o
174 $(CC) $(CFLAGS) $(LDFLAGS) -o opaque opaque0.o opaque1.o $(LIBS)
175
176 coremaker: coremaker.o
177 $(CC) $(CFLAGS) $(LDFLAGS) -o coremaker coremaker.o $(LIBS)
178
179 nodebug: nodebug.o
180 $(CC) $(LDFLAGS) $(NODEBUG_FLAGS) -o nodebug nodebug.o $(LIBS)
181
182 # This gets compiled *without* -g, so don't add CFLAGS here.
183
184 nodebug.o: nodebug.c
185 $(CC) -c $(srcdir)/nodebug.c
186 $(CC) -E $(srcdir)/compiler.c >nodebug.tmp
187 mv nodebug.tmp nodebug.ci
188
189 # For VPATH and Sun Make, we have to make explicit dependencies.
190 # DEC make doesn't seem to understand the ".u" dependency w/VPATH either.
191
192 m68k-elf: $(srcdir)/m68k-elf.u
193 uudecode $(srcdir)/m68k-elf.u
194
195 m68k-aout: $(srcdir)/m68k-aout.u
196 uudecode $(srcdir)/m68k-aout.u
197
198 m68k-aout2: $(srcdir)/m68k-aout2.u
199 uudecode $(srcdir)/m68k-aout2.u
200
201 mips-ecoff: $(srcdir)/mips-ecoff.u
202 uudecode $(srcdir)/mips-ecoff.u
203
204 i486-elf: $(srcdir)/i486-elf.u
205 uudecode $(srcdir)/i486-elf.u
206
207 sparc-aout: $(srcdir)/sparc-aout.u
208 uudecode $(srcdir)/sparc-aout.u
209
210 i860-elf: $(srcdir)/i860-elf.u
211 uudecode $(srcdir)/i860-elf.u
212
213 sparc-elf: $(srcdir)/sparc-elf.u
214 uudecode $(srcdir)/sparc-elf.u
215
216 list: list0.o list1.o
217 $(CC) $(CFLAGS) $(LDFLAGS) -o list list0.o list1.o $(LIBS)
218
219 scope: scope0.o scope1.o
220 $(CC) $(CFLAGS) $(LDFLAGS) -o scope scope0.o scope1.o $(LIBS)
221
222 langs: langs0.o langs1.o langs2.o
223 $(CC) $(CFLAGS) $(LDFLAGS) -o langs langs0.o langs1.o langs2.o $(LIBS)
224
225 bitfields: bitfields.o
226 $(CC) $(CFLAGS) $(LDFLAGS) -o bitfields.tmp bitfields.o $(LIBS)
227 mv bitfields.tmp bitfields
228
229 .PRECIOUS: bitfields
230
231 funcargs: funcargs.o
232 $(CC) $(CFLAGS) $(LDFLAGS) -o funcargs funcargs.o $(LIBS)
233
234 return: return.o
235 $(CC) $(CFLAGS) $(LDFLAGS) -o return return.o $(LIBS)
236
237 mips_pro: mips_pro.o
238 $(CC) $(CFLAGS) $(LDFLAGS) -o mips_pro mips_pro.o $(LIBS)
239
240 printcmds: printcmds.o
241 $(CC) $(CFLAGS) $(LDFLAGS) -o printcmds printcmds.o $(LIBS)
242
243 # Try compiling this with prototypes, if that fails maybe the compiler
244 # is a pre-ANSI compiler, in which case don't use prototypes.
245 callfuncs.o: callfuncs.c
246 (echo set prototypes 1 >callfuncs.tmp; \
247 $(CC) -c $(CFLAGS) $(srcdir)/callfuncs.c 2>/dev/null) \
248 || (echo set prototypes 0 >callfuncs.tmp; \
249 $(CC) -c $(CFLAGS) -DNO_PROTOTYPES $(srcdir)/callfuncs.c)
250 $(CC) $(CFLAGS) -E $(srcdir)/compiler.c >>callfuncs.tmp
251 mv callfuncs.tmp callfuncs.ci
252
253 callfuncs: callfuncs.o
254 $(CC) $(CFLAGS) $(LDFLAGS) -o callfuncs callfuncs.o $(LIBS)
255
256 interrupt: interrupt.o
257 $(CC) $(CFLAGS) $(LDFLAGS) -o interrupt interrupt.o $(LIBS)
258
259 .NOEXPORT:
260
261 INFODIRS=doc
262
263 info:
264
265 install-info:
266
267 dvi:
268
269 install:
270
271 uninstall: force
272
273 site.exp: ./config.status Makefile
274 @echo "Making a new config file..."
275 -@rm -f ./tmp?
276 @touch site.exp
277 -@mv site.exp site.bak
278 @echo "## these variables are automatically generated by make ##" > ./tmp0
279 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
280 @echo "# add them to the last section" >> ./tmp0
281 @echo "set host_triplet ${host_canonical}" >> ./tmp0
282 @echo "set target_triplet ${target_canonical}" >> ./tmp0
283 @echo "set srcdir ${srcdir}" >> ./tmp0
284 @echo "set objdir `pwd`" >> ./tmp0
285 @echo "set tool gdb" >> ./tmp0
286 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
287 @cat ./tmp0 > site.exp
288 @cat site.bak | sed \
289 -e '1,/^## All variables above are.*##/ d' >> site.exp
290 -@rm -f ./tmp?
291
292 installcheck:
293 check: site.exp all just-check
294 just-check:
295 rootme=`pwd`; export rootme; \
296 srcdir=${srcdir} ; export srcdir ; \
297 EXPECT=${EXPECT} ; export EXPECT ; \
298 if [ -f $${rootme}/../../expect/expect ] ; then \
299 TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
300 export TCL_LIBRARY ; fi ; \
301 $(RUNTEST) $(RUNTESTFLAGS) --tool gdb --srcdir $(srcdir)
302
303 clean mostlyclean:
304 -rm -f *~ *.o a.out xgdb *.x $(EXECUTABLES) *.ci *.tmp
305 -rm -f core core.coremaker coremaker.core corefile
306
307 distclean realclean: clean
308 -rm -f *~ core *.log *.plog *.sum *.psum site.*
309 -rm -f Makefile config.status *-init.exp
310 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
311
312 Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
313 $(SHELL) ./config.status
314