Android: Fix swrast only build

A build of only swrast is broken as the Android EGL now depends on
libdrm as does GBM. While we could make EGL conditionally depend on
libdrm, we probably want to enable kms_dri winsys as well and that will
need libdrm enabled. So just always enable libdrm and simplify the
Android makefiles a bit.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
[Emil Velikov: drop related inline comment]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Rob Herring
2017-05-03 14:35:18 -05:00
committed by Emil Velikov
parent 1ef913aacf
commit 88014bc023
3 changed files with 6 additions and 12 deletions

View File

@@ -102,12 +102,9 @@ ifeq ($(MESA_ENABLE_LLVM),true)
endif endif
ifneq ($(LOCAL_IS_HOST_MODULE),true) ifneq ($(LOCAL_IS_HOST_MODULE),true)
# add libdrm if there are hardware drivers
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_CFLAGS += -DHAVE_LIBDRM LOCAL_CFLAGS += -DHAVE_LIBDRM
LOCAL_SHARED_LIBRARIES += libdrm LOCAL_SHARED_LIBRARIES += libdrm
endif endif
endif
LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/system/lib/$(MESA_DRI_MODULE_REL_PATH)\" LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/system/lib/$(MESA_DRI_MODULE_REL_PATH)\"
LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/system/lib64/$(MESA_DRI_MODULE_REL_PATH)\" LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/system/lib64/$(MESA_DRI_MODULE_REL_PATH)\"

View File

@@ -33,14 +33,13 @@ LOCAL_CFLAGS := \
-DDROP_PIPE_LOADER_MISC \ -DDROP_PIPE_LOADER_MISC \
-DGALLIUM_STATIC_TARGETS -DGALLIUM_STATIC_TARGETS
LOCAL_SRC_FILES := $(COMMON_SOURCES) LOCAL_SRC_FILES := \
$(COMMON_SOURCES) \
$(DRM_SOURCES)
LOCAL_MODULE := libmesa_pipe_loader LOCAL_MODULE := libmesa_pipe_loader
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(DRM_SOURCES)
LOCAL_STATIC_LIBRARIES := libmesa_loader LOCAL_STATIC_LIBRARIES := libmesa_loader
endif
include $(GALLIUM_COMMON_MK) include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@@ -27,7 +27,9 @@ include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(common_SOURCES) LOCAL_SRC_FILES := \
$(common_SOURCES) \
$(dri2_SOURCES)
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mapi \
@@ -44,10 +46,6 @@ ifneq ($(filter swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(drisw_SOURCES) LOCAL_SRC_FILES += $(drisw_SOURCES)
endif endif
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(dri2_SOURCES)
endif
LOCAL_MODULE := libmesa_st_dri LOCAL_MODULE := libmesa_st_dri
LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H) LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H)