summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>