diff options
author | Benjamin Franzke <[email protected]> | 2011-06-24 21:45:05 +0200 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2011-06-24 22:00:45 +0200 |
commit | 629c15aaacb69a8f2060e366fba679601738b22d (patch) | |
tree | 1943abf233c6687059bfb044b55e4260b17c24b9 /src/egl/drivers | |
parent | eafd331cf3b024001abd3f64861f41cd33a9acb2 (diff) |
egl_dri2: Build drm platform only if enabled
Diffstat (limited to 'src/egl/drivers')
-rw-r--r-- | src/egl/drivers/dri2/Makefile | 7 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile index 65d35b36206..d2b1f4f077a 100644 --- a/src/egl/drivers/dri2/Makefile +++ b/src/egl/drivers/dri2/Makefile @@ -4,7 +4,7 @@ TOP = ../../../.. include $(TOP)/configs/current EGL_DRIVER = egl_dri2 -EGL_SOURCES = egl_dri2.c platform_drm.c common.c +EGL_SOURCES = egl_dri2.c common.c EGL_INCLUDES = \ -I$(TOP)/include \ @@ -31,6 +31,11 @@ EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS) EGL_LIBS += $(XCB_DRI2_LIBS) endif +ifneq ($(findstring drm, $(EGL_PLATFORMS)),) +EGL_SOURCES += platform_drm.c +EGL_INCLUDES += -DHAVE_DRM_PLATFORM +endif + ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) EGL_SOURCES += platform_wayland.c EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \ diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index cad1737f4bf..f9a5eb108e5 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -546,10 +546,12 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp) #endif #ifdef HAVE_LIBUDEV +#ifdef HAVE_DRM_PLATFORM case _EGL_PLATFORM_DRM: if (disp->Options.TestOnly) return EGL_TRUE; return dri2_initialize_drm(drv, disp); +#endif #ifdef HAVE_WAYLAND_PLATFORM case _EGL_PLATFORM_WAYLAND: if (disp->Options.TestOnly) |