summaryrefslogtreecommitdiff
path: root/lib/librumpuser/Makefile
blob: 2518dc9a20c4fff1d46797fa7b94732e20de317b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#	$NetBSD: Makefile,v 1.30 2023/06/03 09:09:10 lukem Exp $
#

NOFULLRELRO=	yes

.include <bsd.own.mk>

WARNS?=		5

# rumpuser.h is in sys/rump for inclusion by kernel components
.PATH:		${.CURDIR}/../../sys/rump/include/rump

RUMPUSER_THREADS?=pthread

LIB=		rumpuser

.if   ${RUMPUSER_THREADS} == "pthread"
LIBDPLIBS+=	pthread ${.CURDIR}/../libpthread
.endif
.for lib in ${RUMPUSER_EXTERNAL_DPLIBS}
LIBDO.${lib}=	_external
LIBDPLIBS+=	${lib} lib
.endfor
CPPFLAGS+=	-DLIBRUMPUSER
#CPPFLAGS+=	-D_DIAGNOSTIC


.if   ${RUMPUSER_THREADS} == "pthread"
SRCS=		rumpuser.c rumpuser_pth.c rumpuser_bio.c
SRCS+=		rumpuser_sp.c
.elif ${RUMPUSER_THREADS} == "none"
SRCS=		rumpuser.c rumpuser_pth_dummy.c rumpuser_bio.c
SRCS+=		rumpuser_sp.c
.elif ${RUMPUSER_THREADS} == "fiber"
.if defined(RUMP_CURLWP)
.if ${RUMP_CURLWP} != "hypercall"
.error Unsupported curlwp scheme for thread model: ${RUMP_CURLWP}
.endif
.endif
SRCS=		rumpfiber.c rumpfiber_bio.c
SRCS+=		rumpfiber_sp.c
.else
.error Unsupported rumpuser threading type: ${RUMPUSER_THREADS}
.endif

SRCS+=		rumpuser_component.c rumpuser_random.c
SRCS+=		rumpuser_file.c rumpuser_mem.c

SRCS+=		rumpuser_errtrans.c rumpuser_sigtrans.c

# optional
SRCS+=		rumpuser_dl.c rumpuser_daemonize.c

INCSDIR=	/usr/include/rump
INCS=		rumpuser_component.h rumpuser_port.h

CPPFLAGS+=	-D_REENTRANT

COPTS.rumpuser_sp.c+=	${CC_WNO_CAST_FUNCTION_TYPE}

.include <bsd.lib.mk>