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