2015-08-21 18:50:54 -06:00
|
|
|
# $OpenBSD: Makefile,v 1.13 2015/08/22 00:50:54 jsg Exp $
|
2013-09-05 09:11:54 -06:00
|
|
|
.include <bsd.xconf.mk>
|
|
|
|
|
|
|
|
LIB= EGL
|
|
|
|
|
|
|
|
MESA= ${.CURDIR}/../../dist/Mesa/src/mesa
|
|
|
|
EGL= ${.CURDIR}/../../dist/Mesa/src/egl
|
2014-07-09 15:32:40 -06:00
|
|
|
GBM= ${.CURDIR}/../../dist/Mesa/src/gbm
|
|
|
|
LOADER= ${.CURDIR}/../../dist/Mesa/src/loader
|
2013-09-05 09:11:54 -06:00
|
|
|
MESA_INCLUDE= ${.CURDIR}/../../dist/Mesa/include
|
|
|
|
|
2014-07-09 15:32:40 -06:00
|
|
|
MESA_MAJOR= 10
|
2015-02-20 16:31:04 -07:00
|
|
|
MESA_MINOR= 2
|
|
|
|
MESA_TINY= 9
|
2013-09-05 09:11:54 -06:00
|
|
|
|
|
|
|
DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri
|
|
|
|
EGL_DRIVER_SEARCH_DIR= ${X11BASE}/lib/modules/egl
|
|
|
|
|
|
|
|
|
|
|
|
INCSDIR= ${X11BASE}/include/EGL
|
|
|
|
KHRINCSDIR= ${X11BASE}/include/KHR
|
|
|
|
|
|
|
|
INCS= \
|
|
|
|
egl.h \
|
2015-01-25 08:09:12 -07:00
|
|
|
eglext.h \
|
2013-09-05 09:11:54 -06:00
|
|
|
eglmesaext.h \
|
|
|
|
eglplatform.h
|
|
|
|
|
|
|
|
KHRINCS= \
|
|
|
|
khrplatform.h
|
|
|
|
|
|
|
|
EGL_SOURCES= \
|
|
|
|
eglapi.c \
|
|
|
|
eglarray.c \
|
|
|
|
eglconfig.c \
|
|
|
|
eglcontext.c \
|
|
|
|
eglcurrent.c \
|
|
|
|
egldisplay.c \
|
|
|
|
egldriver.c \
|
|
|
|
eglfallbacks.c \
|
|
|
|
eglglobals.c \
|
|
|
|
eglimage.c \
|
|
|
|
egllog.c \
|
|
|
|
eglmisc.c \
|
|
|
|
eglmode.c \
|
|
|
|
eglscreen.c \
|
|
|
|
eglstring.c \
|
|
|
|
eglsurface.c \
|
|
|
|
eglsync.c \
|
|
|
|
eglcompiler.h \
|
|
|
|
eglconfig.h \
|
|
|
|
eglcontext.h \
|
|
|
|
eglcurrent.h \
|
|
|
|
egldefines.h \
|
|
|
|
egldisplay.h \
|
|
|
|
egldriver.h \
|
|
|
|
eglglobals.h \
|
|
|
|
eglimage.h \
|
|
|
|
egllog.h \
|
|
|
|
eglmisc.h \
|
|
|
|
eglmode.h \
|
|
|
|
eglmutex.h \
|
|
|
|
eglscreen.h \
|
|
|
|
eglstring.h \
|
|
|
|
eglsurface.h \
|
|
|
|
eglsync.h
|
|
|
|
|
|
|
|
DRI2_SOURCES= \
|
|
|
|
egl_dri2.c \
|
|
|
|
platform_x11.c
|
|
|
|
|
2014-07-09 15:32:40 -06:00
|
|
|
DRM_SOURCES= \
|
|
|
|
platform_drm.c
|
2013-09-05 09:11:54 -06:00
|
|
|
|
2014-07-09 15:32:40 -06:00
|
|
|
LOADER_SOURCES= \
|
|
|
|
loader.c \
|
|
|
|
pci_id_driver_map.c
|
|
|
|
|
|
|
|
CFLAGS+= -std=c99 -fvisibility=hidden
|
2013-09-05 09:11:54 -06:00
|
|
|
|
|
|
|
CPPFLAGS+= \
|
|
|
|
-I${MESA_INCLUDE} \
|
|
|
|
-I${EGL}/main \
|
2014-07-09 15:32:40 -06:00
|
|
|
-I${LOADER} \
|
2013-09-05 09:11:54 -06:00
|
|
|
-I${X11BASE}/include \
|
2015-08-21 18:50:54 -06:00
|
|
|
-I${X11BASE}/include/libdrm \
|
2013-09-05 09:11:54 -06:00
|
|
|
-DHAVE_PTHREAD \
|
|
|
|
-DHAVE_X11_PLATFORM \
|
|
|
|
-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 \
|
|
|
|
-D_EGL_BUILT_IN_DRIVER_GLX \
|
|
|
|
-D_EGL_OS_UNIX=1 \
|
|
|
|
-DHAVE_SHARED_GLAPI \
|
|
|
|
-D_EGL_DRIVER_SEARCH_DIR=\"${EGL_DRIVER_SEARCH_DIR}\" \
|
|
|
|
-DDEFAULT_DRIVER_DIR=\"${DRI_DRIVER_INSTALL_DIR}\"
|
|
|
|
|
|
|
|
SRCS= \
|
2014-07-09 15:32:40 -06:00
|
|
|
${EGL_SOURCES} ${LOADER_SOURCES}
|
2013-09-05 09:11:54 -06:00
|
|
|
|
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
2014-07-09 15:32:40 -06:00
|
|
|
SRCS+= ${DRI2_SOURCES} ${DRM_SOURCES}
|
2014-09-28 06:53:26 -06:00
|
|
|
CPPFLAGS+= -D_EGL_BUILT_IN_DRIVER_DRI2 -DHAVE_XCB_DRI2 -DHAVE_LIBDRM \
|
2014-07-09 15:32:40 -06:00
|
|
|
-I${GBM}/main -I${GBM}/backends/dri -DHAVE_DRM_PLATFORM
|
2013-09-05 09:11:54 -06:00
|
|
|
LDADD= -L${X11BASE}/lib -lX11-xcb -lX11 -lxcb-dri2 -lxcb-xfixes -lxcb-render \
|
2014-09-28 05:02:37 -06:00
|
|
|
-lxcb-shape -lxcb -lgbm -lglapi -lpthread -ldrm
|
2013-09-05 09:11:54 -06:00
|
|
|
.else
|
|
|
|
LDADD= -L${X11BASE}/lib -lX11-xcb -lX11 -lxcb-xfixes -lxcb-render \
|
2014-09-28 05:02:37 -06:00
|
|
|
-lxcb-shape -lxcb -lglapi -lpthread
|
2013-09-05 09:11:54 -06:00
|
|
|
.endif
|
|
|
|
|
|
|
|
includes: _SUBDIRUSE
|
|
|
|
cd ${MESA_INCLUDE}/EGL; for i in ${INCS}; do \
|
|
|
|
j="cmp -s $$i ${DESTDIR}${INCSDIR}/EGL/$$i || \
|
|
|
|
${INSTALL_DATA} $$i ${DESTDIR}${INCSDIR}/EGL"; \
|
|
|
|
echo "\tinstalling $$i"; \
|
|
|
|
eval "$$j"; \
|
|
|
|
done
|
|
|
|
cd ${MESA_INCLUDE}/KHR; for i in ${KHRINCS}; do \
|
|
|
|
j="cmp -s $$i ${DESTDIR}${INCSDIR}/KHR/$$i || \
|
|
|
|
${INSTALL_DATA} $$i ${DESTDIR}${INCSDIR}/KHR"; \
|
|
|
|
echo "\tinstalling $$i"; \
|
|
|
|
eval "$$j"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
NOPROFILE=
|
|
|
|
|
2013-09-05 14:23:03 -06:00
|
|
|
obj: _xenocara_obj
|
|
|
|
|
2013-09-05 09:11:54 -06:00
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.include <bsd.xorg.mk>
|
|
|
|
|
|
|
|
egl.pc: ${EGL}/main/egl.pc.in Makefile
|
|
|
|
sed -e 's,@prefix@,$(X11BASE),' \
|
|
|
|
-e 's,@libdir@,${LIBDIR},' \
|
|
|
|
-e 's,@includedir@,${INCSDIR},' \
|
2014-07-09 15:32:40 -06:00
|
|
|
-e 's,@GL_PC_REQ_PRIV@,libdrm >= 2.4.38 x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8 xxf86vm,' \
|
|
|
|
-e 's,@GL_PC_LIB_PRIV@,-lm -lpthread,' \
|
2013-09-05 09:11:54 -06:00
|
|
|
-e 's,@GL_PC_CFLAGS@,,' \
|
|
|
|
-e 's,@GL_LIB@,GL,' \
|
|
|
|
-e 's,@PACKAGE_VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
|
|
|
-e 's,@GLX_TLS@,no,' \
|
|
|
|
< ${EGL}/main/egl.pc.in > egl.pc
|
|
|
|
|
|
|
|
afterinstall: egl.pc
|
|
|
|
$(INSTALL) -c -m 644 -o root -g wheel egl.pc \
|
|
|
|
${DESTDIR}${LIBDIR}/pkgconfig
|
|
|
|
|
|
|
|
CLEANFILES+= egl.pc
|
|
|
|
|
|
|
|
.PATH: ${EGL}
|
|
|
|
.PATH: ${EGL}/main
|
|
|
|
.PATH: ${EGL}/drivers/dri2
|
|
|
|
.PATH: ${EGL}/drivers/glx
|
2014-07-09 15:32:40 -06:00
|
|
|
.PATH: ${LOADER}
|