xref: /freebsd/lib/libc/tests/stdlib/Makefile (revision d30a1689f5b37e78ea189232a8b94a7011dc0dc8)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5ATF_TESTS_C+=		clearenv_test
6ATF_TESTS_C+=		dynthr_test
7ATF_TESTS_C+=		heapsort_test
8ATF_TESTS_C+=		mergesort_test
9ATF_TESTS_C+=		qsort_test
10ATF_TESTS_C+=		qsort_b_test
11ATF_TESTS_C+=		qsort_r_compat_test
12ATF_TESTS_C+=		qsort_r_test
13ATF_TESTS_C+=		qsort_s_test
14ATF_TESTS_C+=		set_constraint_handler_s_test
15ATF_TESTS_C+=		strfmon_test
16ATF_TESTS_C+=		tsearch_test
17ATF_TESTS_CXX+=		cxa_thread_atexit_test
18ATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
19
20# All architectures on FreeBSD have fenv.h
21CFLAGS+=	-D__HAVE_FENV
22
23# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater
24# precision than their double.
25.if ${MACHINE_CPUARCH} == "aarch64" || \
26    ${MACHINE_CPUARCH} == "amd64" || \
27    ${MACHINE_CPUARCH} == "i386" || \
28    ${MACHINE_CPUARCH} == "riscv"
29CFLAGS+=	-D__HAVE_LONG_DOUBLE
30.endif
31
32# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
33NETBSD_ATF_TESTS_C+=	abs_test
34NETBSD_ATF_TESTS_C+=	atoi_test
35NETBSD_ATF_TESTS_C+=	div_test
36NETBSD_ATF_TESTS_C+=	getenv_test
37NETBSD_ATF_TESTS_C+=	exit_test
38NETBSD_ATF_TESTS_C+=	hsearch_test
39NETBSD_ATF_TESTS_C+=	posix_memalign_test
40NETBSD_ATF_TESTS_C+=	random_test
41NETBSD_ATF_TESTS_C+=	strtod_test
42NETBSD_ATF_TESTS_C+=	strtol_test
43NETBSD_ATF_TESTS_C+=	system_test
44
45# TODO: need to come up with a correct explanation of what the patch pho does
46# with h_atexit
47#ATF_TESTS_SH=	atexit_test
48NETBSD_ATF_TESTS_SH=	getopt_test
49
50.include "../Makefile.netbsd-tests"
51
52BINDIR=		${TESTSDIR}
53
54# TODO: see comment above
55#PROGS+=		h_atexit
56PROGS+=		h_getopt h_getopt_long
57
58CFLAGS+=	-I${.CURDIR}
59
60CXXSTD.cxa_thread_atexit_test=	c++11
61CXXSTD.cxa_thread_atexit_nothr_test=	c++11
62LIBADD.cxa_thread_atexit_test+=		pthread
63
64# Tests that requires Blocks feature
65.for t in qsort_b_test
66CFLAGS.${t}.c+=		-fblocks
67LIBADD.${t}+=		BlocksRuntime
68.endfor
69
70.for t in h_getopt h_getopt_long
71CFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
72LDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
73
74LIBADD.${t}+=	netbsd util
75.endfor
76
77LIBADD.strtod_test+=		m
78
79SUBDIR+=	dynthr_mod
80
81.include <bsd.test.mk>
82