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