1 # $NetBSD: Makefile,v 1.14 2023/04/24 20:55:53 uwe Exp $ 2 # 3 4 .include <bsd.init.mk> 5 6 TESTSDIR= ${TESTSBASE}/rump/modautoload 7 8 TESTS_C= t_modautoload 9 PAXCTL_FLAGS= +ma 10 11 SRCS.t_modautoload+= t_modautoload.c 12 13 # Note: we link the rump kernel into the application to make this work 14 # on amd64. This is the reason we keep this test in its own 15 # subdirectory -- otherwise the LDADD lines would get a little hairy. 16 LDFLAGS+= -Wl,-E 17 .if ${MACHINE} == "alpha" 18 LDFLAGS+= -Wl,--no-relax 19 .endif 20 LDADD+= \ 21 -Wl,--whole-archive -Wl,-Bstatic \ 22 -lrumpvfs -lrumpvfs_nofifofs -lrump \ 23 -Wl,-Bdynamic -Wl,--no-whole-archive 24 25 LDADD+= -lrumpuser -lpthread 26 DPADD+= ${LIBRUMPVFS} ${LIBRUMP} ${LIBRUMPUSER} 27 28 .if ${RUMP_SANITIZE:Uno} != "no" 29 LDADD+= -fsanitize=${RUMP_SANITIZE} 30 .endif 31 32 WARNS= 4 33 34 # To include a rump version of sysctlbyname() 35 36 .PATH: ${NETBSDSRCDIR}/lib/libc/gen 37 SRCS.t_modautoload+= sysctlbyname.c 38 SRCS.t_modautoload+= sysctlgetmibinfo.c 39 CPPFLAGS+= -DRUMP_ACTION 40 41 SANITIZER_RENAME_CLASSES+= t_modautoload 42 SANITIZER_RENAME_FILES.t_modautoload+= ${SRCS.t_modautoload} 43 SANITIZER_RENAME_SYMBOL.t_modautoload+= sysctlbyname 44 SANITIZER_RENAME_SYMBOL.t_modautoload+= sysctlgetmibinfo 45 46 .include <bsd.test.mk> 47