LOCAL_COPY_HEADERS_TO := libdrm
include $(BUILD_SHARED_LIBRARY)
-include $(LOCAL_PATH)/intel/Android.mk
+SUBDIRS := \
+ intel \
+ radeon
+
+mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
+include $(mkfiles)
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# Import variables LIBDRM_RADEON_FILES, LIBDRM_RADEON_H_FILES
+include $(LOCAL_PATH)/Makefile.sources
+
+LOCAL_MODULE := libdrm_radeon
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libdrm
+
+LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES)
+LOCAL_EXPORT_C_INCLUDE_DIRS += \
+ $(LOCAL_PATH)/radeon
+
+LOCAL_C_INCLUDES := \
+ $(LIBDRM_TOP) \
+ $(LIBDRM_TOP)/radeon \
+ $(LIBDRM_TOP)/include/drm
+
+LOCAL_CFLAGS := \
+ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+
+LOCAL_COPY_HEADERS := $(LIBDRM_RADEON_H_FILES)
+LOCAL_COPY_HEADERS_TO := libdrm
+
+LOCAL_SHARED_LIBRARIES := \
+ libdrm
+
+include $(BUILD_SHARED_LIBRARY)