summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-09-15 04:44:06 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-01 10:53:44 +0100
commitafdf8937f85f7a30648eb1d4fdb30c6f90885c51 (patch)
treeee2f6debc7047f9dfa4598b64657e76c6d49d0c9
parentff792066c98858c002f01b4c24b899b3791eb9de (diff)
libdrm: Add support for Android build system
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--Android.mk37
-rw-r--r--libkms/Android.mk22
-rw-r--r--libkms/api.c3
-rw-r--r--libkms/linux.c3
4 files changed, 63 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 00000000..39ba22c7
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,37 @@
+LOCAL_PATH := $(call my-dir)
+
+#
+# DRM
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ xf86drm.c \
+ xf86drmHash.c \
+ xf86drmRandom.c \
+ xf86drmSL.c \
+ xf86drmMode.c
+
+LOCAL_MODULE := libdrm
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/include/drm
+
+LOCAL_COPY_HEADERS_TO := libdrm
+LOCAL_COPY_HEADERS := \
+ xf86drm.h \
+ xf86drmMode.h \
+ include/drm/drm.h \
+ include/drm/drm_fourcc.h \
+ include/drm/drm_mode.h \
+ include/drm/drm_sarea.h
+
+include $(BUILD_SHARED_LIBRARY)
+
+#
+# KMS
+#
+
+include $(LOCAL_PATH)/libkms/Android.mk
diff --git a/libkms/Android.mk b/libkms/Android.mk
new file mode 100644
index 00000000..d5507c7d
--- /dev/null
+++ b/libkms/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ linux.c \
+ dumb.c \
+ api.c
+
+LOCAL_MODULE := libkms
+LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := libdrm
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/.. \
+ $(LOCAL_PATH)/../include/drm
+
+LOCAL_COPY_HEADERS_TO := libdrm
+LOCAL_COPY_HEADERS := \
+ libkms.h
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libkms/api.c b/libkms/api.c
index 5befaa0f..c3dac750 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -25,8 +25,9 @@
*
**************************************************************************/
-
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>
diff --git a/libkms/linux.c b/libkms/linux.c
index 4f861213..2e1b10d2 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -29,8 +29,9 @@
* going from fd to pci id via fstat and udev.
*/
-
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>