OSDN Git Service

test/math: don't try to build test dep as test
[uclinux-h8/uclibc-ng.git] / test / math / Makefile.in
1 # uClibc math tests
2 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
3
4 # libm-test.c is a generated file used by the tests internally so skip it
5 TESTS_DISABLED := libm-test
6
7 # gamma (removed from TESTS, need to add "small errors are ok" machinery there)
8 TESTS_DISABLED += gamma
9 ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
10 TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
11 else
12 CFLAGS_basic-test := -DNO_LONG_DOUBLE
13 endif
14 ifeq ($(DO_C99_MATH),)
15 TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
16 endif
17
18 DODIFF_rint     := 1
19 DODIFF_signgam  := 1
20
21 # NOTE: For basic-test we must disable the floating point optimization.
22 #       Only for sh architecture because in the other architecture are disabled.
23 ifeq ($(TARGET_ARCH),sh)
24 CFLAGS_basic-test += -mieee
25 endif
26 EXTRA_CFLAGS    := -fno-builtin
27 EXTRA_LDFLAGS   := -lm
28
29 PERL := /usr/bin/perl
30
31 MDEPS := $(wildcard test-*.c)
32 $(MDEPS): libm-test.c
33
34 TARGET_ULP := $(TARGET_ARCH)
35 ULP_SUFFIX :=
36 ifeq ($(TARGET_ARCH),mips)
37 ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
38 endif
39 TARGET_ULP:=$(TARGET_ULP)$(ULP_SUFFIX)
40
41 libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
42         $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
43
44 EXTRA_CLEAN := libm-test.c libm-test-ulps.h