xref: /freebsd/lib/msun/tests/Makefile (revision ff0ba87247820afbdfdc1b307c803f7923d0e4d3)
1# $FreeBSD$
2
3OBJTOP=		${.OBJDIR:H:H:H}
4SRCTOP=		${.CURDIR:H:H:H}
5TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libm
6
7TESTSDIR=	${TESTSBASE}/lib/msun
8
9.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \
10	|| ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm"	\
11	|| ${MACHINE} == "sparc64"
12CFLAGS+=	-DHAVE_FENV_H
13.endif
14
15.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
16CFLAGS+=	-D__HAVE_LONG_DOUBLE
17.endif
18
19NETBSD_ATF_TESTS_C=	acos_test
20NETBSD_ATF_TESTS_C+=	asin_test
21NETBSD_ATF_TESTS_C+=	atan_test
22NETBSD_ATF_TESTS_C+=	cbrt_test
23NETBSD_ATF_TESTS_C+=	ceil_test
24NETBSD_ATF_TESTS_C+=	cos_test
25NETBSD_ATF_TESTS_C+=	cosh_test
26NETBSD_ATF_TESTS_C+=	erf_test
27NETBSD_ATF_TESTS_C+=	exp_test
28NETBSD_ATF_TESTS_C+=	fmod_test
29NETBSD_ATF_TESTS_C+=	infinity_test
30NETBSD_ATF_TESTS_C+=	ldexp_test
31NETBSD_ATF_TESTS_C+=	log_test
32NETBSD_ATF_TESTS_C+=	pow_test
33NETBSD_ATF_TESTS_C+=	precision_test
34NETBSD_ATF_TESTS_C+=	round_test
35NETBSD_ATF_TESTS_C+=	scalbn_test
36NETBSD_ATF_TESTS_C+=	sin_test
37NETBSD_ATF_TESTS_C+=	sinh_test
38NETBSD_ATF_TESTS_C+=	sqrt_test
39NETBSD_ATF_TESTS_C+=	tan_test
40NETBSD_ATF_TESTS_C+=	tanh_test
41
42CSTD=		c99
43
44LDADD+=		-lm
45DPADD+=		${LIBM}
46#COPTS+=	-Wfloat-equal
47
48# Copied from lib/msun/Makefile
49.if ${MACHINE_CPUARCH} == "i386"
50ARCH_SUBDIR= i387
51.else
52ARCH_SUBDIR= ${MACHINE_CPUARCH}
53.endif
54
55.include "../${ARCH_SUBDIR}/Makefile.inc"
56
57# XXX: for some odd reason float.h doesn't tell the full story about what the
58# precision is.
59CFLAGS+=	-DLDBL_PREC=${LDBL_PREC}
60
61.include <netbsd-tests.test.mk>
62
63.include <bsd.test.mk>
64