Makefile.in 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # uClibc 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. ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
  8. TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
  9. CFLAGS_basic-test := -DNO_LONG_DOUBLE
  10. endif
  11. ifeq ($(DO_C99_MATH),)
  12. TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
  13. endif
  14. ifeq ($(UCLIBC_HAS_FPU),)
  15. TESTS_DISABLED += test-fpucw
  16. endif
  17. DODIFF_rint := 1
  18. DODIFF_signgam := 1
  19. # NOTE: For basic-test we must disable the floating point optimization.
  20. # Only for sh architecture because in the other architecture are disabled.
  21. ifeq ($(TARGET_ARCH),sh)
  22. CFLAGS_basic-test += -mieee
  23. endif
  24. EXTRA_CFLAGS := -fno-builtin
  25. EXTRA_LDFLAGS := -lm
  26. PERL := /usr/bin/perl
  27. MDEPS := $(wildcard test-*.c)
  28. $(MDEPS): libm-test.c
  29. ULP_SUFFIX :=
  30. ifeq ($(TARGET_ARCH),mips)
  31. ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
  32. endif
  33. TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)$(ULP_SUFFIX)),$(TARGET_ARCH)$(ULP_SUFFIX),generic)
  34. libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
  35. $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
  36. EXTRA_CLEAN := libm-test.c libm-test-ulps.h