1 1.30 lukem # $NetBSD: Makefile,v 1.30 2023/06/03 09:09:10 lukem Exp $ 2 1.1 pooka # 3 1.1 pooka 4 1.29 nia NOFULLRELRO= yes 5 1.29 nia 6 1.14 pooka .include <bsd.own.mk> 7 1.14 pooka 8 1.6 matt WARNS?= 5 9 1.1 pooka 10 1.2 pooka # rumpuser.h is in sys/rump for inclusion by kernel components 11 1.2 pooka .PATH: ${.CURDIR}/../../sys/rump/include/rump 12 1.2 pooka 13 1.20 justin RUMPUSER_THREADS?=pthread 14 1.20 justin 15 1.2 pooka LIB= rumpuser 16 1.20 justin 17 1.20 justin .if ${RUMPUSER_THREADS} == "pthread" 18 1.4 pooka LIBDPLIBS+= pthread ${.CURDIR}/../libpthread 19 1.20 justin .endif 20 1.13 pooka .for lib in ${RUMPUSER_EXTERNAL_DPLIBS} 21 1.13 pooka LIBDO.${lib}= _external 22 1.13 pooka LIBDPLIBS+= ${lib} lib 23 1.13 pooka .endfor 24 1.27 sevan CPPFLAGS+= -DLIBRUMPUSER 25 1.4 pooka #CPPFLAGS+= -D_DIAGNOSTIC 26 1.2 pooka 27 1.20 justin 28 1.20 justin .if ${RUMPUSER_THREADS} == "pthread" 29 1.20 justin SRCS= rumpuser.c rumpuser_pth.c rumpuser_bio.c 30 1.20 justin SRCS+= rumpuser_sp.c 31 1.20 justin .elif ${RUMPUSER_THREADS} == "none" 32 1.20 justin SRCS= rumpuser.c rumpuser_pth_dummy.c rumpuser_bio.c 33 1.20 justin SRCS+= rumpuser_sp.c 34 1.20 justin .elif ${RUMPUSER_THREADS} == "fiber" 35 1.20 justin .if defined(RUMP_CURLWP) 36 1.20 justin .if ${RUMP_CURLWP} != "hypercall" 37 1.20 justin .error Unsupported curlwp scheme for thread model: ${RUMP_CURLWP} 38 1.20 justin .endif 39 1.20 justin .endif 40 1.20 justin SRCS= rumpfiber.c rumpfiber_bio.c 41 1.20 justin SRCS+= rumpfiber_sp.c 42 1.20 justin .else 43 1.20 justin .error Unsupported rumpuser threading type: ${RUMPUSER_THREADS} 44 1.20 justin .endif 45 1.20 justin 46 1.21 justin SRCS+= rumpuser_component.c rumpuser_random.c 47 1.19 justin SRCS+= rumpuser_file.c rumpuser_mem.c 48 1.16 pooka 49 1.16 pooka SRCS+= rumpuser_errtrans.c rumpuser_sigtrans.c 50 1.12 pooka 51 1.12 pooka # optional 52 1.20 justin SRCS+= rumpuser_dl.c rumpuser_daemonize.c 53 1.2 pooka 54 1.2 pooka INCSDIR= /usr/include/rump 55 1.22 pooka INCS= rumpuser_component.h rumpuser_port.h 56 1.2 pooka 57 1.2 pooka CPPFLAGS+= -D_REENTRANT 58 1.2 pooka 59 1.30 lukem COPTS.rumpuser_sp.c+= ${CC_WNO_CAST_FUNCTION_TYPE} 60 1.28 mrg 61 1.2 pooka .include <bsd.lib.mk> 62