Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright (C) 1991-2026 Free Software Foundation, Inc.
  2. # This file is part of the GNU C Library.
  3. # The GNU C Library is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU Lesser General Public
  5. # License as published by the Free Software Foundation; either
  6. # version 2.1 of the License, or (at your option) any later version.
  7. # The GNU C Library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. # Lesser General Public License for more details.
  11. # You should have received a copy of the GNU Lesser General Public
  12. # License along with the GNU C Library; if not, see
  13. # <https://www.gnu.org/licenses/>.
  14. #
  15. # Sub-makefile for assert portion of the library.
  16. #
  17. subdir := assert
  18. include ../Makeconfig
  19. headers := \
  20. assert.h
  21. # headers
  22. routines := \
  23. __assert \
  24. __libc_assert_fail \
  25. assert \
  26. assert-perr \
  27. # routines
  28. tests := \
  29. test-assert \
  30. test-assert-2 \
  31. test-assert-c99 \
  32. test-assert-gnu99 \
  33. test-assert-perr \
  34. test-assert-variadic \
  35. tst-assert-c++ \
  36. tst-assert-g++ \
  37. tst-assert-sa-2025-0001 \
  38. # tests
  39. CFLAGS-test-assert-c99.c += -std=c99
  40. CFLAGS-test-assert-gnu99.c += -std=gnu99
  41. ifeq ($(have-cxx-thread_local),yes)
  42. CFLAGS-tst-assert-c++.o = -std=c++11
  43. LDLIBS-tst-assert-c++ = -lstdc++
  44. CFLAGS-tst-assert-g++.o = -std=gnu++11
  45. LDLIBS-tst-assert-g++ = -lstdc++
  46. else
  47. tests-unsupported += \
  48. tst-assert-c++ \
  49. tst-assert-g++ \
  50. # tests-unsupported
  51. endif
  52. include ../Rules