Makefile.in 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # uClibc-ng math tests
  2. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  3. # libm-test.c is a generated file used by the tests internally so skip it
  4. TESTS_DISABLED := libm-test
  5. # gamma (removed from TESTS, need to add "small errors are ok" machinery there)
  6. TESTS_DISABLED += gamma
  7. TESTS_DISABLED += test-misc test-signgam-main
  8. # disable long double tests, only for some architectures available
  9. TESTS_DISABLED += test-ldouble test-ldouble-finite test-ildoubl compile_test c99_test
  10. # disable tgmath tests, not implemented
  11. TESTS_DISABLED += test-tgmath test-tgmath2 test-tgmath-int test-tgmath-ret
  12. CFLAGS_test-double = -std=c11
  13. CFLAGS_test-double-finite = -std=c11
  14. CFLAGS_test-float = -std=c11
  15. CFLAGS_test-float-finite = -std=c11
  16. CFLAGS_test-idouble = -std=c11
  17. CFLAGS_test-ifloat = -std=c11
  18. CFLAGS_test-signgam-finite = -ffinite-math-only
  19. CFLAGS_test-signgam-finite-c99 = -ffinite-math-only -std=c99
  20. CFLAGS_test-signgam-finite-c11 = -ffinite-math-only -std=c11
  21. CFLAGS_test-signgam-uchar = -std=c99
  22. CFLAGS_test-signgam-uchar-init = -std=c99
  23. CFLAGS_test-signgam-uchar-static = -std=c99
  24. CFLAGS_test-signgam-uchar-init-static = -std=c99
  25. CFLAGS_test-signgam-uint = -std=c99
  26. CFLAGS_test-signgam-uint-init = -std=c99
  27. CFLAGS_test-signgam-uint-static = -std=c99
  28. CFLAGS_test-signgam-uint-init-static = -std=c99
  29. CFLAGS_test-signgam-ullong = -std=c99
  30. CFLAGS_test-signgam-ullong-init = -std=c99
  31. CFLAGS_test-signgam-ullong-static = -std=c99
  32. CFLAGS_test-signgam-ullong-init-static = -std=c99
  33. # NOTE: For basic-test we must disable the floating point optimization.
  34. # Only for sh architecture because in the other architecture are disabled.
  35. ifeq ($(TARGET_ARCH),sh)
  36. CFLAGS_basic-test += -mieee
  37. endif
  38. EXTRA_CFLAGS := -fno-builtin -DNO_LONG_DOUBLE
  39. EXTRA_LDFLAGS := -lm
  40. PERL := perl
  41. MDEPS := $(wildcard test-*.c)
  42. $(MDEPS): libm-test.c
  43. ULP_SUFFIX :=
  44. TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)$(ULP_SUFFIX)),$(TARGET_ARCH)$(ULP_SUFFIX),generic)
  45. libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
  46. $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
  47. $(Q)$(SHELL) ./gen-libm-have-vector-test.sh > libm-have-vector-test.h
  48. EXTRA_CLEAN := libm-test.c libm-test-ulps.h libm-have-vector-test.h