summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-09-07 18:13:10 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-09-28 17:09:34 +0100
commita3dfd6d40db6f089ea581d62ddf07ab2290dac9e (patch)
tree7e84416b5d49e6e5312b817b04c419b296187069
parent1a75044a3905f9f4664e57e37e3fb216dfb7a8f7 (diff)
libkms: add Android build
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r--Android.mk3
-rw-r--r--libkms/Android.mk53
2 files changed, 55 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 97a7d751..4d02b05c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -55,7 +55,8 @@ SUBDIRS := \
freedreno \
intel \
nouveau \
- radeon
+ radeon \
+ libkms
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
include $(mkfiles)
diff --git a/libkms/Android.mk b/libkms/Android.mk
new file mode 100644
index 00000000..d2df32a8
--- /dev/null
+++ b/libkms/Android.mk
@@ -0,0 +1,53 @@
+DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
+
+intel_drivers := i915 i965 i915g ilo
+radeon_drivers := r300g r600g radeonsi
+nouveau_drivers := nouveau
+vmwgfx_drivers := vmwgfx
+
+valid_drivers := \
+ $(intel_drivers) \
+ $(radeon_drivers) \
+ $(nouveau_drivers) \
+ $(vmwgfx_drivers)
+
+# warn about invalid drivers
+invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS))
+ifneq ($(invalid_drivers),)
+$(warning invalid GPU drivers: $(invalid_drivers))
+# tidy up
+DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS))
+endif
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/Makefile.sources
+
+LOCAL_SRC_FILES := $(LIBKMS_FILES)
+
+ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
+LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
+endif
+
+ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
+LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES)
+endif
+
+ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),)
+LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES)
+endif
+
+ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),)
+LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
+endif
+
+LOCAL_MODULE := libkms
+LOCAL_SHARED_LIBRARIES := libdrm
+
+LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm
+
+LOCAL_COPY_HEADERS_TO := libdrm
+LOCAL_COPY_HEADERS := $(LIBKMS_H_FILES)
+
+include $(BUILD_SHARED_LIBRARY)