Home | History | Annotate | Line # | Download | only in libxshmfence
      1 #	$NetBSD: Makefile,v 1.7 2025/03/09 06:03:51 mrg Exp $
      2 
      3 .include <bsd.own.mk>
      4 
      5 LIB=	xshmfence
      6 
      7 XSHMFENCEDIR=	${X11SRCDIR.${LIB}}
      8 .PATH:		${XSHMFENCEDIR}/src
      9 SRCS=	 	xshmfence_alloc.c xshmfence_semaphore.c
     10 
     11 INCS=	xshmfence.h
     12 INCSDIR=${X11INCDIR}/X11
     13 
     14 CPPFLAGS+=	-DSHMDIR=\"/var/shm\"
     15 CPPFLAGS+=	-DHAVE_SEMAPHORE
     16 # XXX
     17 CPPFLAGS+=	-DLIBXSHM_PAGESIZE=4096
     18 # XXX needs testing
     19 #CPPFLAGS+=	-DHAVE_MEMFD_CREATE
     20 
     21 LDADD+=	-lrt
     22 DPADD+=	${LIBRT}
     23 
     24 NOMAN=	# defined
     25 
     26 PKGDIST=	${LIB}
     27 # XXX PTHREAD_LIBS really should be -pthread for more general
     28 # XXX but the package doesn't really do this.
     29 PKGCONFIG_SED_FLAGS= \
     30         -e "s,@XPROTO_CFLAGS@,-I${X11INCDIR},; \
     31 	    s,@PTHREAD_LIBS@,-lpthread,"
     32 
     33 COPTS.xshmfence_semaphore.c += -Wno-stack-protector
     34 
     35 .if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
     36 COPTS.xshmfence_semaphore.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
     37 .endif
     38 
     39 .include <bsd.x11.mk>
     40 .include <bsd.lib.mk>
     41