11.14Suwe#	$NetBSD: Makefile,v 1.14 2023/04/24 20:55:53 uwe Exp $
21.1Spooka#
31.1Spooka
41.7Schristos.include <bsd.init.mk>
51.7Schristos
61.1SpookaTESTSDIR=	${TESTSBASE}/rump/modautoload
71.6Schristos
81.1SpookaTESTS_C=	t_modautoload
91.8SchristosPAXCTL_FLAGS=	+ma
101.1Spooka
111.3SpgoyetteSRCS.t_modautoload+=	t_modautoload.c
121.3Spgoyette
131.1Spooka# Note: we link the rump kernel into the application to make this work
141.1Spooka# on amd64.  This is the reason we keep this test in its own
151.1Spooka# subdirectory -- otherwise the LDADD lines would get a little hairy.
161.1SpookaLDFLAGS+=	-Wl,-E
171.12Schristos.if ${MACHINE} == "alpha"
181.12SchristosLDFLAGS+=	-Wl,--no-relax
191.12Schristos.endif
201.10SchristosLDADD+= \
211.11Schristos    -Wl,--whole-archive -Wl,-Bstatic \
221.14Suwe	-lrumpvfs -lrumpvfs_nofifofs -lrump \
231.11Schristos    -Wl,-Bdynamic -Wl,--no-whole-archive
241.10Schristos
251.1SpookaLDADD+=		-lrumpuser -lpthread
261.4SchristosDPADD+=		${LIBRUMPVFS} ${LIBRUMP} ${LIBRUMPUSER}
271.1Spooka
281.13Smartin.if ${RUMP_SANITIZE:Uno} != "no"
291.13SmartinLDADD+=	-fsanitize=${RUMP_SANITIZE}
301.13Smartin.endif
311.13Smartin
321.1SpookaWARNS=	4
331.1Spooka
341.3Spgoyette# To include a rump version of sysctlbyname()
351.3Spgoyette
361.3Spgoyette.PATH:		${NETBSDSRCDIR}/lib/libc/gen
371.3SpgoyetteSRCS.t_modautoload+=		sysctlbyname.c
381.3SpgoyetteSRCS.t_modautoload+=		sysctlgetmibinfo.c
391.3SpgoyetteCPPFLAGS+=	-DRUMP_ACTION
401.3Spgoyette
411.9SkamilSANITIZER_RENAME_CLASSES+=		t_modautoload
421.9SkamilSANITIZER_RENAME_FILES.t_modautoload+=	${SRCS.t_modautoload}
431.9SkamilSANITIZER_RENAME_SYMBOL.t_modautoload+=	sysctlbyname
441.9SkamilSANITIZER_RENAME_SYMBOL.t_modautoload+=	sysctlgetmibinfo
451.9Skamil
461.1Spooka.include <bsd.test.mk>
47