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