Makefile 981 B

123456789101112131415161718192021222324252627282930
  1. # uClibc math tests
  2. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  3. include ../../.config
  4. TESTS := basic-test rint tst-definitions test-fpucw test-float test-ifloat test-double test-idouble
  5. ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
  6. TESTS += test-ldouble test-ildoubl compile_test
  7. else
  8. CFLAGS_basic-test := -DNO_LONG_DOUBLE
  9. endif
  10. include ../Test.mak
  11. DODIFF_rint := 1
  12. # NOTE: For basic-test we must disable the floating point optimization.
  13. # Only for sh architecture because in the other architecture are disabled.
  14. ifeq ($(TARGET_ARCH),sh)
  15. CFLAGS_basic-test += -mieee
  16. endif
  17. EXTRA_CFLAGS := -fno-builtin
  18. EXTRA_LDFLAGS := -lm
  19. PERL := /usr/bin/perl
  20. ulps-file := $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps)))
  21. libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl
  22. $(Q)$(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null
  23. EXTRA_CLEAN := libm-test.c libm-test-ulps.h
  24. $(TARGETS): libm-test.c