1 DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
3 intel_drivers := i915 i965 i915g ilo
4 radeon_drivers := r300g r600g radeonsi
5 nouveau_drivers := nouveau
6 vmwgfx_drivers := vmwgfx
14 # warn about invalid drivers
15 invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS))
16 ifneq ($(invalid_drivers),)
17 $(warning invalid GPU drivers: $(invalid_drivers))
19 DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS))
22 LOCAL_PATH := $(call my-dir)
25 include $(LOCAL_PATH)/Makefile.sources
27 LOCAL_SRC_FILES := $(LIBKMS_FILES)
29 ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
30 LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
33 ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
34 LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES)
37 ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),)
38 LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES)
41 ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),)
42 LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
45 LOCAL_MODULE := libkms
46 LOCAL_SHARED_LIBRARIES := libdrm
48 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
50 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm
52 LOCAL_COPY_HEADERS_TO := libdrm
53 LOCAL_COPY_HEADERS := $(LIBKMS_H_FILES)
55 include $(BUILD_SHARED_LIBRARY)