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