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