Commit | Line | Data |
---|---|---|
e2eaf477 ILT |
1 | # |
2 | # Makefile | |
545c9aee | 3 | # Copyright (C) 1999, 2002, 2006 |
e2eaf477 ILT |
4 | # Free Software Foundation |
5 | # | |
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. | |
11 | # | |
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. | |
16 | # | |
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, | |
a9479c3f KC |
19 | # write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 | # Boston, MA 02110-1301, USA. | |
e2eaf477 ILT |
21 | # |
22 | ||
23 | # This file was written by Tom Tromey <tromey@cygnus.com>. | |
24 | ||
25 | # | |
26 | # Makefile for libiberty/testsuite directory | |
27 | # | |
28 | ||
29 | srcdir = @srcdir@ | |
30 | VPATH = @srcdir@ | |
31 | ||
32 | SHELL = @SHELL@ | |
33 | ||
34 | CC = @CC@ | |
35 | CFLAGS = @CFLAGS@ | |
f91ca6bc | 36 | LIBCFLAGS = $(CFLAGS) $(LDFLAGS) |
e2eaf477 ILT |
37 | |
38 | # Multilib support variables. | |
39 | MULTISRCTOP = | |
40 | ||
41 | INCDIR=$(srcdir)/../$(MULTISRCTOP)../include | |
42 | ||
43 | all: | |
44 | ||
b109e79a | 45 | # CHECK is set to "really_check" or the empty string by configure. |
e2eaf477 ILT |
46 | check: @CHECK@ |
47 | ||
abdef8eb JBG |
48 | really-check: check-cplus-dem check-d-demangle check-pexecute check-expandargv \ |
49 | check-strtol | |
b109e79a | 50 | |
e2eaf477 | 51 | # Run some tests of the demangler. |
a54ba43f DD |
52 | check-cplus-dem: test-demangle $(srcdir)/demangle-expected |
53 | ./test-demangle < $(srcdir)/demangle-expected | |
e2eaf477 | 54 | |
b55f9678 IB |
55 | check-d-demangle: test-demangle $(srcdir)/d-demangle-expected |
56 | ./test-demangle < $(srcdir)/d-demangle-expected | |
57 | ||
b109e79a ILT |
58 | # Check the pexecute code. |
59 | check-pexecute: test-pexecute | |
60 | ./test-pexecute | |
61 | ||
67d78caa DD |
62 | # Check the expandargv functionality |
63 | check-expandargv: test-expandargv | |
64 | ./test-expandargv | |
65 | ||
abdef8eb JBG |
66 | # Check the strtol functionality |
67 | check-strtol: test-strtol | |
68 | ./test-strtol | |
69 | ||
b55f9678 IB |
70 | # Run the demangler fuzzer |
71 | fuzz-demangler: demangler-fuzzer | |
72 | ./demangler-fuzzer | |
73 | ||
e2eaf477 | 74 | TEST_COMPILE = $(CC) @DEFS@ $(LIBCFLAGS) -I.. -I$(INCDIR) $(HDEFINES) |
5659daa1 | 75 | test-demangle: $(srcdir)/test-demangle.c ../libiberty.a |
a54ba43f DD |
76 | $(TEST_COMPILE) -o test-demangle \ |
77 | $(srcdir)/test-demangle.c ../libiberty.a | |
e2eaf477 | 78 | |
b109e79a ILT |
79 | test-pexecute: $(srcdir)/test-pexecute.c ../libiberty.a |
80 | $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-pexecute \ | |
81 | $(srcdir)/test-pexecute.c ../libiberty.a | |
610f4894 | 82 | |
67d78caa DD |
83 | test-expandargv: $(srcdir)/test-expandargv.c ../libiberty.a |
84 | $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-expandargv \ | |
85 | $(srcdir)/test-expandargv.c ../libiberty.a | |
b109e79a | 86 | |
abdef8eb JBG |
87 | test-strtol: $(srcdir)/test-strtol.c ../libiberty.a |
88 | $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-strtol \ | |
89 | $(srcdir)/test-strtol.c ../libiberty.a | |
90 | ||
b55f9678 IB |
91 | demangler-fuzzer: $(srcdir)/demangler-fuzzer.c ../libiberty.a |
92 | $(TEST_COMPILE) -o demangler-fuzzer \ | |
93 | $(srcdir)/demangler-fuzzer.c ../libiberty.a | |
94 | ||
e2eaf477 | 95 | # Standard (either GNU or Cygnus) rules we don't use. |
d7831e7c DD |
96 | html install-html info install-info clean-info dvi pdf install-pdf \ |
97 | install etags tags installcheck: | |
e2eaf477 ILT |
98 | |
99 | # The standard clean rules. | |
100 | mostlyclean: | |
a54ba43f | 101 | rm -f test-demangle |
67d78caa DD |
102 | rm -f test-pexecute |
103 | rm -f test-expandargv | |
abdef8eb | 104 | rm -f test-strtol |
b55f9678 | 105 | rm -f demangler-fuzzer |
610f4894 | 106 | rm -f core |
e2eaf477 ILT |
107 | clean: mostlyclean |
108 | distclean: clean | |
109 | rm -f Makefile | |
110 | maintainer-clean realclean: distclean | |
111 | ||
e2eaf477 ILT |
112 | Makefile: $(srcdir)/Makefile.in ../config.status |
113 | CONFIG_FILES=testsuite/Makefile CONFIG_HEADERS= \ | |
114 | cd .. && $(SHELL) ./config.status |