egl_dri2: Build drm platform only if enabled

This commit is contained in:
Benjamin Franzke 2011-06-24 21:45:05 +02:00
parent eafd331cf3
commit 629c15aaac
2 changed files with 8 additions and 1 deletions

View File

@ -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) \

View File

@ -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)