Makefile.in 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Makefile
  3. # Copyright (C) 1999-2022 Free Software Foundation, Inc.
  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,
  18. # write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  19. # Boston, MA 02110-1301, USA.
  20. #
  21. # This file was written by Tom Tromey <tromey@cygnus.com>.
  22. #
  23. # Makefile for libiberty/testsuite directory
  24. #
  25. srcdir = @srcdir@
  26. VPATH = @srcdir@
  27. SHELL = @SHELL@
  28. CC = @CC@
  29. CFLAGS = @CFLAGS@
  30. LIBCFLAGS = $(CFLAGS) $(LDFLAGS)
  31. # Multilib support variables.
  32. MULTISRCTOP =
  33. INCDIR=$(srcdir)/../$(MULTISRCTOP)../include
  34. all:
  35. # CHECK is set to "really_check" or the empty string by configure.
  36. check: @CHECK@
  37. really-check: check-cplus-dem check-d-demangle check-rust-demangle \
  38. check-pexecute check-expandargv check-strtol
  39. # Run some tests of the demangler.
  40. check-cplus-dem: test-demangle $(srcdir)/demangle-expected
  41. ./test-demangle < $(srcdir)/demangle-expected
  42. check-d-demangle: test-demangle $(srcdir)/d-demangle-expected
  43. ./test-demangle < $(srcdir)/d-demangle-expected
  44. check-rust-demangle: test-demangle $(srcdir)/rust-demangle-expected
  45. ./test-demangle < $(srcdir)/rust-demangle-expected
  46. # Check the pexecute code.
  47. check-pexecute: test-pexecute
  48. ./test-pexecute
  49. # Check the expandargv functionality
  50. check-expandargv: test-expandargv
  51. ./test-expandargv
  52. # Check the strtol functionality
  53. check-strtol: test-strtol
  54. ./test-strtol
  55. # Run the demangler fuzzer
  56. fuzz-demangler: demangler-fuzzer
  57. ./demangler-fuzzer
  58. TEST_COMPILE = $(CC) @DEFS@ $(LIBCFLAGS) -I.. -I$(INCDIR) $(HDEFINES)
  59. test-demangle: $(srcdir)/test-demangle.c ../libiberty.a
  60. $(TEST_COMPILE) -o test-demangle \
  61. $(srcdir)/test-demangle.c ../libiberty.a
  62. test-pexecute: $(srcdir)/test-pexecute.c ../libiberty.a
  63. $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-pexecute \
  64. $(srcdir)/test-pexecute.c ../libiberty.a
  65. test-expandargv: $(srcdir)/test-expandargv.c ../libiberty.a
  66. $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-expandargv \
  67. $(srcdir)/test-expandargv.c ../libiberty.a
  68. test-strtol: $(srcdir)/test-strtol.c ../libiberty.a
  69. $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-strtol \
  70. $(srcdir)/test-strtol.c ../libiberty.a
  71. demangler-fuzzer: $(srcdir)/demangler-fuzzer.c ../libiberty.a
  72. $(TEST_COMPILE) -o demangler-fuzzer \
  73. $(srcdir)/demangler-fuzzer.c ../libiberty.a
  74. # Standard (either GNU or Cygnus) rules we don't use.
  75. html install-html info install-info clean-info dvi pdf install-pdf \
  76. install etags tags installcheck:
  77. # The standard clean rules.
  78. mostlyclean:
  79. rm -f test-demangle
  80. rm -f test-pexecute
  81. rm -f test-expandargv
  82. rm -f test-strtol
  83. rm -f demangler-fuzzer
  84. rm -f core
  85. clean: mostlyclean
  86. distclean: clean
  87. rm -f Makefile
  88. maintainer-clean realclean: distclean
  89. Makefile: $(srcdir)/Makefile.in ../config.status
  90. CONFIG_FILES=testsuite/Makefile CONFIG_HEADERS= \
  91. cd .. && $(SHELL) ./config.status