1 # Makefile for the base tests for GDB.
2 # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
4 # This file is part of GDB.
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)
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.
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.
22 program_transform_name
=
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir
= $(libdir)/$(target_alias
)
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
)
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
59 if [ -f $${rootme}/../../../expect/expect ] ; then \
60 echo $${rootme}/../../../expect/expect ; \
66 if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
67 echo $${rootme}/../../dejagnu/runtest ; \
69 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
72 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
77 if [ -f $${rootme}/../../../gcc/xgcc ] ; then \
78 echo $${rootme}/../../../gcc/xgcc -B$${rootme}/../../../gcc/; \
80 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
83 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
87 #### host, target, and site specific Makefile frags come in here.
116 # List of test executables that we have available. They are kept in
117 # uuencoded format to avoid SCCS/RCS problems with binary files.
119 CROSS_EXECUTABLES
= \
130 $(CC
) -c
$(CFLAGS
) $<
131 $(CC
) -E
$(CFLAGS
) $(srcdir)/compiler.c
>$*.tmp
137 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o run run.o
$(LIBS
)
140 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o whatis whatis.o
$(LIBS
)
145 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o ptype ptype.o
$(LIBS
)
148 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o setvar setvar.o
$(LIBS
)
151 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o exprs exprs.o
$(LIBS
)
154 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o break break.o
$(LIBS
)
157 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o signals signals.o
$(LIBS
)
160 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o sigall sigall.o
$(LIBS
)
163 echo
'#include "twice.c"' >twice-tmp.c
164 $(CC
) $(CFLAGS
) $(LDFLAGS
) -I
$(srcdir) -o twice twice-tmp.c
$(LIBS
)
167 watchpoint
: watchpoint.o
168 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o watchpoint watchpoint.o
$(LIBS
)
171 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o recurse recurse.o
$(LIBS
)
173 opaque
: opaque0.o opaque1.o
174 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o opaque opaque0.o opaque1.o
$(LIBS
)
176 coremaker
: coremaker.o
177 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o coremaker coremaker.o
$(LIBS
)
180 $(CC
) $(LDFLAGS
) $(NODEBUG_FLAGS
) -o nodebug nodebug.o
$(LIBS
)
182 # This gets compiled *without* -g, so don't add CFLAGS here.
185 $(CC
) -c
$(srcdir)/nodebug.c
186 $(CC
) -E
$(srcdir)/compiler.c
>nodebug.tmp
187 mv nodebug.tmp nodebug.ci
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.
192 m68k-elf
: $(srcdir)/m68k-elf.u
193 uudecode
$(srcdir)/m68k-elf.u
195 m68k-aout
: $(srcdir)/m68k-aout.u
196 uudecode
$(srcdir)/m68k-aout.u
198 m68k-aout2
: $(srcdir)/m68k-aout2.u
199 uudecode
$(srcdir)/m68k-aout2.u
201 mips-ecoff
: $(srcdir)/mips-ecoff.u
202 uudecode
$(srcdir)/mips-ecoff.u
204 i486-elf
: $(srcdir)/i486-elf.u
205 uudecode
$(srcdir)/i486-elf.u
207 sparc-aout
: $(srcdir)/sparc-aout.u
208 uudecode
$(srcdir)/sparc-aout.u
210 i860-elf
: $(srcdir)/i860-elf.u
211 uudecode
$(srcdir)/i860-elf.u
213 sparc-elf
: $(srcdir)/sparc-elf.u
214 uudecode
$(srcdir)/sparc-elf.u
216 list
: list0.o list1.o
217 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o list list0.o list1.o
$(LIBS
)
219 scope
: scope0.o scope1.o
220 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o scope scope0.o scope1.o
$(LIBS
)
222 langs
: langs0.o langs1.o langs2.o
223 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o langs langs0.o langs1.o langs2.o
$(LIBS
)
225 bitfields
: bitfields.o
226 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bitfields.tmp bitfields.o
$(LIBS
)
227 mv bitfields.tmp bitfields
232 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o funcargs funcargs.o
$(LIBS
)
235 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o return return.o
$(LIBS
)
238 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o mips_pro mips_pro.o
$(LIBS
)
240 printcmds
: printcmds.o
241 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o printcmds printcmds.o
$(LIBS
)
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
253 callfuncs
: callfuncs.o
254 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o callfuncs callfuncs.o
$(LIBS
)
256 interrupt
: interrupt.o
257 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o interrupt interrupt.o
$(LIBS
)
273 site.exp
: .
/config.status Makefile
274 @echo
"Making a new config file..."
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
293 check: site.exp
all 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)
304 -rm -f
*~
*.o a.out xgdb
*.x
$(EXECUTABLES
) *.ci
*.tmp
305 -rm -f core core.coremaker coremaker.core corefile
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.
*
312 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
313 $(SHELL
) .
/config.status