xref: /freebsd/lib/libc/tests/tls/Makefile (revision 99b33ca4eccb9034c865a9ca3ce4c79f5dd56ea4)
12f121787SEnji Cooper# $FreeBSD$
22f121787SEnji Cooper
32f121787SEnji Cooper.include <bsd.own.mk>
42f121787SEnji Cooper
52f121787SEnji Cooper.if !defined(NO_PIC)
62f121787SEnji CooperSUBDIR+=	dso
72f121787SEnji Cooper.endif
82f121787SEnji Cooper
92f121787SEnji Cooper# TODO: doesn't link properly (for some odd reason it's trying to link in
102f121787SEnji Cooper#       libatf.so)
112f121787SEnji Cooper#NETBSD_ATF_TESTS_C=	tls_static_test
122f121787SEnji Cooper.if !defined(NO_PIC)
132f121787SEnji CooperNETBSD_ATF_TESTS_C+=	tls_dlopen_test
142f121787SEnji CooperNETBSD_ATF_TESTS_C+=	tls_dynamic_test
152f121787SEnji Cooper.endif
162f121787SEnji Cooper
172f121787SEnji Cooper.include "../Makefile.netbsd-tests"
182f121787SEnji Cooper
19*99b33ca4SEnji CooperDSODIR=		${.OBJDIR:H}/tls_dso
202f121787SEnji Cooper
21eacae6dcSBryan DreweryLIBADD.tls_static_test+=	pthread
222f121787SEnji CooperLDFLAGS.tls_static_test+=	-static
232f121787SEnji CooperSRCS.tls_static_test=		t_tls_static.c t_tls_static_helper.c
242f121787SEnji Cooper
25eacae6dcSBryan DreweryDPADD.tls_dynamic_test+=	${DSODIR}/libh_tls_dynamic.so
26eacae6dcSBryan DreweryLDADD.tls_dynamic_test+=	-lh_tls_dynamic
272f121787SEnji CooperLDFLAGS.tls_dynamic_test+=	-Wl,-rpath,${TESTSDIR} -L${DSODIR}
28eacae6dcSBryan DreweryLIBADD.tls_dynamic_test+=	pthread
292f121787SEnji Cooper
30eacae6dcSBryan DreweryLIBADD.tls_dlopen_test+=	pthread
312f121787SEnji CooperLDFLAGS.tls_dlopen_test+=	-Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic
322f121787SEnji Cooper
332f121787SEnji Cooper.include <bsd.test.mk>
34