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; see the file COPYING. If not, write to
18 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 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.
118 # List of test executables that we have available. They are kept in
119 # uuencoded format to avoid SCCS/RCS problems with binary files.
121 CROSS_EXECUTABLES
= \
132 $(CC
) -c
$(CFLAGS
) $<
138 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o run run.o
$(LIBS
)
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.
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
149 .PRECIOUS
: whatis whatis-info.exp
152 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o ptype ptype.o
$(LIBS
)
155 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o setvar setvar.o
$(LIBS
)
158 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o exprs exprs.o
$(LIBS
)
161 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o break break.o
$(LIBS
)
164 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o signals signals.o
$(LIBS
)
167 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o sigall sigall.o
$(LIBS
)
170 echo
'#include "twice.c"' >twice-tmp.c
171 $(CC
) $(CFLAGS
) $(LDFLAGS
) -I
$(srcdir) -o twice twice-tmp.c
$(LIBS
)
174 watchpoint
: watchpoint.o
175 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o watchpoint watchpoint.o
$(LIBS
)
178 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o recurse recurse.o
$(LIBS
)
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.
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
189 coremaker
: coremaker.o
190 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o coremaker coremaker.o
$(LIBS
)
193 $(CC
) $(LDFLAGS
) $(NODEBUG_FLAGS
) -o nodebug nodebug.o
$(LIBS
)
195 # This gets compiled *without* -g, so don't add CFLAGS here.
198 $(CC
) -c
$(srcdir)/nodebug.c
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.
203 m68k-elf
: $(srcdir)/m68k-elf.u
204 uudecode
$(srcdir)/m68k-elf.u
206 m68k-aout
: $(srcdir)/m68k-aout.u
207 uudecode
$(srcdir)/m68k-aout.u
209 m68k-aout2
: $(srcdir)/m68k-aout2.u
210 uudecode
$(srcdir)/m68k-aout2.u
212 mips-ecoff
: $(srcdir)/mips-ecoff.u
213 uudecode
$(srcdir)/mips-ecoff.u
215 i486-elf
: $(srcdir)/i486-elf.u
216 uudecode
$(srcdir)/i486-elf.u
218 sparc-aout
: $(srcdir)/sparc-aout.u
219 uudecode
$(srcdir)/sparc-aout.u
221 i860-elf
: $(srcdir)/i860-elf.u
222 uudecode
$(srcdir)/i860-elf.u
224 sparc-elf
: $(srcdir)/sparc-elf.u
225 uudecode
$(srcdir)/sparc-elf.u
227 list
: list0.o list1.o
228 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o list list0.o list1.o
$(LIBS
)
230 scope
: scope0.o scope1.o
231 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o scope scope0.o scope1.o
$(LIBS
)
233 langs
: langs0.o langs1.o langs2.o
234 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o langs langs0.o langs1.o langs2.o
$(LIBS
)
236 bitfields
: bitfields.o
237 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bitfields.tmp bitfields.o
$(LIBS
)
238 mv bitfields.tmp bitfields
243 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o funcargs funcargs.o
$(LIBS
)
246 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o return return.o
$(LIBS
)
249 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o mips_pro mips_pro.o
$(LIBS
)
251 printcmds
: printcmds.o
252 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o printcmds printcmds.o
$(LIBS
)
254 callfuncs
: callfuncs.o
255 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o callfuncs callfuncs.o
$(LIBS
)
257 interrupt
: interrupt.o
258 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o interrupt interrupt.o
$(LIBS
)
274 site.exp
: .
/config.status Makefile
275 @echo
"Making a new config file..."
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
294 check: site.exp
all 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)
305 -rm -f
*~
*.o a.out xgdb
*.x
$(EXECUTABLES
)
306 -rm -f core core.coremaker coremaker.core corefile
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.
*
313 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
314 $(SHELL
) .
/config.status