2009-05-03 13:43:26 -06:00
|
|
|
# $OpenBSD: Makefile,v 1.3 2009/05/03 19:43:26 oga Exp $
|
2009-01-10 09:29:26 -07:00
|
|
|
.include <bsd.xconf.mk>
|
|
|
|
|
2009-01-26 16:14:37 -07:00
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
|
|
|
|
SUBDIR=intel
|
|
|
|
.endif
|
|
|
|
|
2009-01-10 09:29:26 -07:00
|
|
|
LIB= drm
|
|
|
|
|
|
|
|
DRM_MAJOR= 2
|
2009-01-26 16:14:37 -07:00
|
|
|
DRM_MINOR= 4
|
2009-05-03 13:43:26 -06:00
|
|
|
DRM_TINY= 9
|
2009-01-10 09:29:26 -07:00
|
|
|
|
|
|
|
INCSDIR= ${X11BASE}/include/
|
|
|
|
|
|
|
|
CPP= cpp -notraditional
|
|
|
|
DEBUG?=
|
|
|
|
|
2009-01-26 16:14:37 -07:00
|
|
|
CPPFLAGS+= -I${.CURDIR} \
|
2009-01-10 09:29:26 -07:00
|
|
|
-I${X11BASE}/include \
|
|
|
|
-I/usr/include/dev/pci/drm \
|
|
|
|
-DX_PRIVSEP
|
|
|
|
|
2009-01-26 16:14:37 -07:00
|
|
|
INCS= xf86drm.h \
|
|
|
|
xf86drmMode.h
|
2009-01-10 09:29:26 -07:00
|
|
|
|
|
|
|
SRCS= xf86drm.c \
|
|
|
|
xf86drmHash.c \
|
2009-01-26 16:14:37 -07:00
|
|
|
xf86drmMode.c \
|
2009-01-10 09:29:26 -07:00
|
|
|
xf86drmRandom.c \
|
|
|
|
xf86drmSL.c
|
|
|
|
|
|
|
|
includes: _SUBDIRUSE
|
|
|
|
cd ${.CURDIR}; for i in ${INCS}; do \
|
|
|
|
j="cmp -s $$i ${DESTDIR}${INCSDIR}/$$i || \
|
|
|
|
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
|
|
$$i ${DESTDIR}${INCSDIR}/"; \
|
|
|
|
echo "\tinstalling $$i"; \
|
|
|
|
eval "$$j"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
NOPROFILE =
|
|
|
|
|
|
|
|
obj: _xenocara_obj
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.include <bsd.xorg.mk>
|
|
|
|
|
|
|
|
libdrm.pc: libdrm.pc.in Makefile
|
|
|
|
sed -e 's,@prefix@,$(X11BASE),' \
|
|
|
|
-e 's,@exec_prefix@,${X11BASE},' \
|
|
|
|
-e 's,@libdir@,${LIBDIR},' \
|
|
|
|
-e 's,@includedir@,${INCSDIR},' \
|
|
|
|
-e 's,@PACKAGE_VERSION@,$(DRM_MAJOR).$(DRM_MINOR).$(DRM_TINY),' \
|
|
|
|
< ${.CURDIR}/libdrm.pc.in > libdrm.pc
|
|
|
|
|
|
|
|
afterinstall: libdrm.pc
|
|
|
|
$(INSTALL) -c -m 644 -o root -g wheel libdrm.pc \
|
|
|
|
${DESTDIR}${LIBDIR}/pkgconfig
|
|
|
|
|
|
|
|
CLEANFILES+= libdrm.pc
|
|
|
|
|
|
|
|
.include <bsd.subdir.mk>
|