2014-07-12 00:26:31 +04:00
|
|
|
# $NetBSD: Makefile,v 1.20 2014/07/11 20:26:31 justin Exp $
|
2008-07-29 17:17:40 +04:00
|
|
|
#
|
|
|
|
|
2013-05-16 00:47:20 +04:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2012-03-21 09:37:42 +04:00
|
|
|
WARNS?= 5
|
2008-07-29 17:17:40 +04:00
|
|
|
|
2010-02-26 21:54:20 +03:00
|
|
|
# rumpuser.h is in sys/rump for inclusion by kernel components
|
|
|
|
.PATH: ${.CURDIR}/../../sys/rump/include/rump
|
|
|
|
|
2014-07-12 00:26:31 +04:00
|
|
|
RUMPUSER_THREADS?=pthread
|
|
|
|
|
2010-02-26 21:54:20 +03:00
|
|
|
LIB= rumpuser
|
2014-07-12 00:26:31 +04:00
|
|
|
|
|
|
|
.if ${RUMPUSER_THREADS} == "pthread"
|
2010-11-30 17:08:39 +03:00
|
|
|
LIBDPLIBS+= pthread ${.CURDIR}/../libpthread
|
2014-07-12 00:26:31 +04:00
|
|
|
.endif
|
2013-05-16 00:27:00 +04:00
|
|
|
.for lib in ${RUMPUSER_EXTERNAL_DPLIBS}
|
|
|
|
LIBDO.${lib}= _external
|
|
|
|
LIBDPLIBS+= ${lib} lib
|
|
|
|
.endfor
|
2013-03-01 17:52:31 +04:00
|
|
|
CPPFLAGS+= -DLIBRUMPUSER
|
2010-11-30 17:08:39 +03:00
|
|
|
#CPPFLAGS+= -D_DIAGNOSTIC
|
2010-02-26 21:54:20 +03:00
|
|
|
|
2014-07-12 00:26:31 +04:00
|
|
|
|
|
|
|
.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
|
2014-07-10 03:41:40 +04:00
|
|
|
SRCS+= rumpuser_file.c rumpuser_mem.c
|
2014-02-20 04:42:27 +04:00
|
|
|
|
|
|
|
SRCS+= rumpuser_errtrans.c rumpuser_sigtrans.c
|
2013-04-30 19:48:29 +04:00
|
|
|
|
|
|
|
# optional
|
2014-07-12 00:26:31 +04:00
|
|
|
SRCS+= rumpuser_dl.c rumpuser_daemonize.c
|
2010-02-26 21:54:20 +03:00
|
|
|
|
|
|
|
INCSDIR= /usr/include/rump
|
2013-09-10 20:51:24 +04:00
|
|
|
INCS= rumpuser.h rumpuser_component.h rumpuser_port.h
|
2010-02-26 21:54:20 +03:00
|
|
|
|
2008-07-29 17:17:40 +04:00
|
|
|
MAN= rumpuser.3
|
|
|
|
|
2010-02-26 21:54:20 +03:00
|
|
|
CPPFLAGS+= -D_REENTRANT
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|