xref: /freebsd/lib/libc/tests/stdlib/Makefile (revision f3c5273d315a64826d2149ac453ff8c4583ddbe8)
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+=		set_constraint_handler_s_test
10ATF_TESTS_C+=		strfmon_test
11ATF_TESTS_C+=		tsearch_test
12.if ${COMPILER_FEATURES:Mc++11}
13ATF_TESTS_CXX+=		cxa_thread_atexit_test
14ATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
15.endif
16
17# Not sure why this isn't defined for all architectures, since most
18# have long double.
19.if ${MACHINE_CPUARCH} == "aarch64" || \
20    ${MACHINE_CPUARCH} == "amd64" || \
21    ${MACHINE_CPUARCH} == "i386"
22CFLAGS+=	-D__HAVE_LONG_DOUBLE
23.endif
24
25# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
26NETBSD_ATF_TESTS_C+=	abs_test
27NETBSD_ATF_TESTS_C+=	atoi_test
28NETBSD_ATF_TESTS_C+=	div_test
29NETBSD_ATF_TESTS_C+=	getenv_test
30NETBSD_ATF_TESTS_C+=	exit_test
31NETBSD_ATF_TESTS_C+=	hsearch_test
32NETBSD_ATF_TESTS_C+=	posix_memalign_test
33NETBSD_ATF_TESTS_C+=	random_test
34NETBSD_ATF_TESTS_C+=	strtod_test
35NETBSD_ATF_TESTS_C+=	strtol_test
36NETBSD_ATF_TESTS_C+=	system_test
37
38# TODO: need to come up with a correct explanation of what the patch pho does
39# with h_atexit
40#ATF_TESTS_SH=	atexit_test
41NETBSD_ATF_TESTS_SH=	getopt_test
42
43.include "../Makefile.netbsd-tests"
44
45BINDIR=		${TESTSDIR}
46
47# TODO: see comment above
48#PROGS+=		h_atexit
49PROGS+=		h_getopt h_getopt_long
50
51CFLAGS+=	-I${.CURDIR}
52
53CXXFLAGS.cxa_thread_atexit_test+=	-std=c++11
54CXXFLAGS.cxa_thread_atexit_nothr_test+=	-std=c++11
55LIBADD.cxa_thread_atexit_test+=		pthread
56
57.for t in h_getopt h_getopt_long
58CFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
59LDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
60
61LIBADD.${t}+=	netbsd util
62.endfor
63
64LIBADD.strtod_test+=		m
65
66SUBDIR+=	dynthr_mod
67
68.include <bsd.test.mk>
69