2015-02-20 16:31:04 -07:00
|
|
|
# $OpenBSD: Makefile,v 1.4 2015/02/20 23:31:06 jsg Exp $
|
2014-07-09 15:32:40 -06:00
|
|
|
.include <bsd.xconf.mk>
|
|
|
|
|
|
|
|
LIB= gbm
|
|
|
|
|
|
|
|
MESA= ${.CURDIR}/../../dist/Mesa/src/mesa
|
|
|
|
GBM= ${.CURDIR}/../../dist/Mesa/src/gbm
|
|
|
|
LOADER= ${.CURDIR}/../../dist/Mesa/src/loader
|
|
|
|
|
|
|
|
MESA_INCLUDE= ${.CURDIR}/../../dist/Mesa/include
|
|
|
|
DEFAULT_DRIVER_DIR= ${X11BASE}/lib/modules/dri
|
|
|
|
|
|
|
|
MESA_MAJOR= 10
|
2015-02-20 16:31:04 -07:00
|
|
|
MESA_MINOR= 2
|
|
|
|
MESA_TINY= 9
|
2014-07-09 15:32:40 -06:00
|
|
|
|
|
|
|
INCSDIR= ${X11BASE}/include
|
|
|
|
|
|
|
|
INCS= \
|
|
|
|
gbm.h
|
|
|
|
|
|
|
|
GBM_SOURCES= \
|
|
|
|
gbm.c \
|
|
|
|
backend.c \
|
|
|
|
gbm_dri.c \
|
|
|
|
|
|
|
|
LOADER_SOURCES= \
|
|
|
|
loader.c \
|
|
|
|
pci_id_driver_map.c
|
|
|
|
|
|
|
|
CFLAGS+= -std=c99 -fvisibility=hidden
|
|
|
|
|
|
|
|
CPPFLAGS+= \
|
|
|
|
-I${MESA_INCLUDE} \
|
|
|
|
-I${GBM}/main \
|
|
|
|
-I${LOADER} \
|
|
|
|
-I${X11BASE}/include \
|
|
|
|
-I/usr/include/dev/pci/drm \
|
|
|
|
-DHAVE_PTHREAD \
|
|
|
|
-D_OS_UNIX=1 \
|
|
|
|
-DMODULEDIR=\"${X11BASE}/lib/modules/gbm\" \
|
|
|
|
-DDEFAULT_DRIVER_DIR=\"${DEFAULT_DRIVER_DIR}\"
|
|
|
|
|
|
|
|
SRCS= \
|
|
|
|
${GBM_SOURCES} \
|
|
|
|
${LOADER_SOURCES}
|
|
|
|
|
|
|
|
LDADD= -L${X11BASE}/lib -lpthread -ldrm
|
|
|
|
|
|
|
|
includes: _SUBDIRUSE
|
|
|
|
cd ${GBM}/main; for i in ${INCS}; do \
|
|
|
|
j="cmp -s $$i ${DESTDIR}${INCSDIR}/$$i || \
|
|
|
|
${INSTALL_DATA} $$i ${DESTDIR}${INCSDIR}"; \
|
|
|
|
echo "\tinstalling $$i"; \
|
|
|
|
eval "$$j"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
NOPROFILE=
|
|
|
|
|
|
|
|
obj: _xenocara_obj
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.include <bsd.xorg.mk>
|
|
|
|
|
|
|
|
gbm.pc: ${GBM}/main/gbm.pc.in Makefile
|
|
|
|
sed -e 's,@prefix@,$(X11BASE),' \
|
|
|
|
-e 's,@exec_prefix@,${X11BASE},' \
|
|
|
|
-e 's,@libdir@,${LIBDIR},' \
|
|
|
|
-e 's,@includedir@,${INCSDIR},' \
|
|
|
|
-e 's,@GBM_PC_REQ_PRIV@,,' \
|
|
|
|
-e 's,@GBM_PC_LIB_PRIV@,-m -lpthread,' \
|
|
|
|
-e 's,@GBM_PC_CFLAGS@,,' \
|
|
|
|
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
|
|
|
< ${GBM}/main/gbm.pc.in > gbm.pc
|
|
|
|
|
|
|
|
afterinstall: gbm.pc
|
|
|
|
$(INSTALL) -c -m 644 -o root -g wheel gbm.pc \
|
|
|
|
${DESTDIR}${LIBDIR}/pkgconfig
|
|
|
|
|
|
|
|
CLEANFILES+= gbm.pc
|
|
|
|
|
|
|
|
.PATH: ${GBM}
|
|
|
|
.PATH: ${GBM}/main
|
|
|
|
.PATH: ${GBM}/backends/dri
|
|
|
|
.PATH: ${LOADER}
|