android: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_H
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 27 Mar 2015 18:57:46 +0000 (18:57 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 22 Apr 2015 13:36:18 +0000 (14:36 +0100)
Otherwise we'll fail to find the drm.h header.

Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/mesa/drivers/dri/common/Android.mk

index b95feb679917a7302adaad720af2d4aaaf4e3f5c..03ea564cf34808db6b3df97d1d2a1b6a4ea727db 100644 (file)
@@ -40,6 +40,13 @@ LOCAL_C_INCLUDES := \
     $(intermediates) \
     $(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 := $(DRI_COMMON_FILES)
 
 LOCAL_GENERATED_SOURCES := \
@@ -99,6 +106,13 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 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)