$(LOCAL_PATH) \
$(intermediates)
-# swrast only
-ifeq ($(MESA_GPU_DRIVERS),swrast)
-LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H
-else
+ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
+LOCAL_CFLAGS := -DHAVE_LIBDRM
LOCAL_SHARED_LIBRARIES := libdrm
endif
LOCAL_C_INCLUDES := \
$(MESA_DRI_C_INCLUDES)
-# swrast only
-ifeq ($(MESA_GPU_DRIVERS),swrast)
-LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H
-else
-LOCAL_SHARED_LIBRARIES := libdrm
-endif
-
LOCAL_SRC_FILES := $(megadriver_stub_FILES)
include $(MESA_COMMON_MK)
'expat',
])
-# if HAVE_DRI2
drienv.PkgUseModules('DRM')
-# else
-#env.Append(CPPDEFINES = ['__NOT_HAVE_DRM_H'])
sources = drienv.ParseSourceList('Makefile.sources', ['DRI_COMMON_FILES', 'XMLCONFIG_FILES' ])
])
env.Append(CPPDEFINES = [
- '__NOT_HAVE_DRM_H',
'HAVE_DLADDR',
])
#include <stdbool.h>
-#ifndef __NOT_HAVE_DRM_H
+#ifdef HAVE_LIBDRM
#include <xf86drm.h>
#endif
#include "dri_util.h"
setupLoaderExtensions(psp, extensions);
-#ifndef __NOT_HAVE_DRM_H
+#ifdef HAVE_LIBDRM
if (fd != -1) {
drmVersionPtr version = drmGetVersion(fd);
if (version) {