3 # Copyright (C) 1999, 2002, 2006
4 # Free Software Foundation
6 # This file is part of the libiberty library.
7 # Libiberty is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Library General Public
9 # License as published by the Free Software Foundation; either
10 # version 2 of the License, or (at your option) any later version.
12 # Libiberty is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Library General Public License for more details.
17 # You should have received a copy of the GNU Library General Public
18 # License along with libiberty; see the file COPYING.LIB. If not,
19 # write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
23 # This file was written by Tom Tromey <tromey@cygnus.com>.
26 # Makefile for libiberty/testsuite directory
36 LIBCFLAGS
= $(CFLAGS
) $(LDFLAGS
)
38 # Multilib support variables.
41 INCDIR
=$(srcdir)/..
/$(MULTISRCTOP
)..
/include
45 # CHECK is set to "really_check" or the empty string by configure.
48 really-check
: check-cplus-dem check-d-demangle check-rust-demangle \
49 check-pexecute check-expandargv check-strtol
51 # Run some tests of the demangler.
52 check-cplus-dem
: test-demangle
$(srcdir)/demangle-expected
53 .
/test-demangle
< $(srcdir)/demangle-expected
55 check-d-demangle
: test-demangle
$(srcdir)/d-demangle-expected
56 .
/test-demangle
< $(srcdir)/d-demangle-expected
58 check-rust-demangle
: test-demangle
$(srcdir)/rust-demangle-expected
59 .
/test-demangle
< $(srcdir)/rust-demangle-expected
61 # Check the pexecute code.
62 check-pexecute
: test-pexecute
65 # Check the expandargv functionality
66 check-expandargv
: test-expandargv
69 # Check the strtol functionality
70 check-strtol
: test-strtol
73 # Run the demangler fuzzer
74 fuzz-demangler
: demangler-fuzzer
77 TEST_COMPILE
= $(CC
) @DEFS@
$(LIBCFLAGS
) -I..
-I
$(INCDIR
) $(HDEFINES
)
78 test-demangle
: $(srcdir)/test-demangle.c ..
/libiberty.a
79 $(TEST_COMPILE
) -o test-demangle \
80 $(srcdir)/test-demangle.c ..
/libiberty.a
82 test-pexecute
: $(srcdir)/test-pexecute.c ..
/libiberty.a
83 $(TEST_COMPILE
) -DHAVE_CONFIG_H
-I..
-o test-pexecute \
84 $(srcdir)/test-pexecute.c ..
/libiberty.a
86 test-expandargv
: $(srcdir)/test-expandargv.c ..
/libiberty.a
87 $(TEST_COMPILE
) -DHAVE_CONFIG_H
-I..
-o test-expandargv \
88 $(srcdir)/test-expandargv.c ..
/libiberty.a
90 test-strtol
: $(srcdir)/test-strtol.c ..
/libiberty.a
91 $(TEST_COMPILE
) -DHAVE_CONFIG_H
-I..
-o test-strtol \
92 $(srcdir)/test-strtol.c ..
/libiberty.a
94 demangler-fuzzer
: $(srcdir)/demangler-fuzzer.c ..
/libiberty.a
95 $(TEST_COMPILE
) -o demangler-fuzzer \
96 $(srcdir)/demangler-fuzzer.c ..
/libiberty.a
98 # Standard (either GNU or Cygnus) rules we don't use.
99 html install-html
info install-info clean-info
dvi pdf install-pdf \
100 install etags
tags installcheck:
102 # The standard clean rules.
106 rm -f test-expandargv
108 rm -f demangler-fuzzer
113 maintainer-clean
realclean: distclean
115 Makefile
: $(srcdir)/Makefile.in ..
/config.status
116 CONFIG_FILES
=testsuite
/Makefile CONFIG_HEADERS
= \
117 cd ..
&& $(SHELL
) .
/config.status