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