xref: /freebsd/lib/msun/tests/Makefile (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1# $FreeBSD$
2
3PACKAGE=tests
4FILESGROUPS=	TESTS
5TESTSPACKAGE=	${PACKAGE}
6TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libm
7
8# All architectures on FreeBSD have fenv.h
9CFLAGS+=	-DHAVE_FENV_H
10
11# Not sure why this isn't defined for all architectures, since most
12# have long double.
13.if ${MACHINE_CPUARCH} == "aarch64" || \
14    ${MACHINE_CPUARCH} == "amd64" || \
15    ${MACHINE_CPUARCH} == "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
42TAP_TESTS_C+=	cexp_test
43TAP_TESTS_C+=	conj_test
44TAP_TESTS_C+=	csqrt_test
45TAP_TESTS_C+=	ctrig_test
46TAP_TESTS_C+=	exponential_test
47TAP_TESTS_C+=	fenv_test
48TAP_TESTS_C+=	fma_test
49TAP_TESTS_C+=	fmaxmin_test
50TAP_TESTS_C+=	ilogb_test
51TAP_TESTS_C+=	invtrig_test
52TAP_TESTS_C+=	invctrig_test
53TAP_TESTS_C+=	logarithm_test
54TAP_TESTS_C+=	lrint_test
55# XXX: the testcase crashes on all platforms, but only on head
56# (bug 205451)
57#TAP_TESTS_C+=	lround_test
58TAP_TESTS_C+=	nan_test
59TAP_TESTS_C+=	nearbyint_test
60TAP_TESTS_C+=	next_test
61TAP_TESTS_C+=	rem_test
62TAP_TESTS_C+=	trig_test
63
64.for t in ${TAP_TESTS_C}
65CFLAGS.$t+=	-O0
66.endfor
67
68CSTD=		c99
69
70#COPTS+=	-Wfloat-equal
71
72IGNORE_PRAGMA=
73
74LIBADD+=	m
75
76# Copied from lib/msun/Makefile
77.if ${MACHINE_CPUARCH} == "i386"
78ARCH_SUBDIR= i387
79.else
80ARCH_SUBDIR= ${MACHINE_CPUARCH}
81.endif
82
83.include "../${ARCH_SUBDIR}/Makefile.inc"
84
85# XXX: for some odd reason float.h doesn't tell the full story about what the
86# precision is.
87CFLAGS+=	-DLDBL_PREC=${LDBL_PREC}
88
89.include <netbsd-tests.test.mk>
90
91.include <bsd.test.mk>
92