mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 15:30:09 +00:00
Android: move libdrm settings to top-level Android.common.mk
Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
54e550ab8a
commit
112e988329
@ -82,6 +82,12 @@ LOCAL_CFLAGS += \
|
||||
-D__STDC_LIMIT_MACROS
|
||||
endif
|
||||
|
||||
# add libdrm if there are hardware drivers
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||
LOCAL_SHARED_LIBRARIES += libdrm
|
||||
endif
|
||||
|
||||
LOCAL_CPPFLAGS += \
|
||||
$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-D_USING_LIBCXX) \
|
||||
-Wno-error=non-virtual-dtor \
|
||||
|
@ -61,12 +61,6 @@ ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
|
||||
LOCAL_SHARED_LIBRARIES += libsync
|
||||
endif
|
||||
|
||||
# add libdrm if there are hardware drivers
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||
LOCAL_SHARED_LIBRARIES += libdrm
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
|
||||
# require i915_dri and/or i965_dri
|
||||
LOCAL_REQUIRED_MODULES += \
|
||||
|
@ -38,10 +38,7 @@ LOCAL_SRC_FILES := $(COMMON_SOURCES)
|
||||
LOCAL_MODULE := libmesa_pipe_loader
|
||||
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||
LOCAL_SRC_FILES += $(DRM_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_loader
|
||||
endif
|
||||
|
||||
|
@ -40,7 +40,7 @@ LOCAL_C_INCLUDES := \
|
||||
|
||||
LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_freedreno
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_glsl libmesa_nir
|
||||
LOCAL_MODULE := libmesa_pipe_freedreno
|
||||
|
||||
|
@ -36,7 +36,7 @@ LOCAL_SRC_FILES := \
|
||||
$(NVC0_CODEGEN_SOURCES) \
|
||||
$(NVC0_C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_nouveau
|
||||
LOCAL_MODULE := libmesa_pipe_nouveau
|
||||
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
|
@ -35,7 +35,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mesa
|
||||
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_r300
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -30,7 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_r600
|
||||
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
|
@ -34,7 +34,7 @@ ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
LOCAL_SRC_FILES += $(LLVM_C_FILES)
|
||||
endif
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_radeon
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -30,7 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_radeonsi
|
||||
|
||||
# generate sources
|
||||
|
@ -30,7 +30,6 @@ LOCAL_SRC_FILES := \
|
||||
|
||||
LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
# We need libmesa_nir to get NIR's generated include directories.
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_nir
|
||||
LOCAL_MODULE := libmesa_pipe_vc4
|
||||
|
@ -28,7 +28,6 @@ include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := \
|
||||
$(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_MODULE := libmesa_pipe_virgl
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -46,7 +46,6 @@ endif
|
||||
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_SRC_FILES += $(dri2_SOURCES)
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := libmesa_st_dri
|
||||
|
@ -43,11 +43,6 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libglapi \
|
||||
libexpat \
|
||||
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||
LOCAL_SHARED_LIBRARIES += libdrm
|
||||
endif
|
||||
|
||||
ifneq ($(filter freedreno,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DGALLIUM_FREEDRENO
|
||||
gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno
|
||||
|
@ -40,7 +40,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/addrlib/inc/chip/r800 \
|
||||
$(LOCAL_PATH)/addrlib/r800/chip
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_amdgpu
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_amdgpu
|
||||
LOCAL_MODULE := libmesa_winsys_amdgpu
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -27,7 +27,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_freedreno
|
||||
LOCAL_MODULE := libmesa_winsys_freedreno
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -30,7 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_intel
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_intel
|
||||
LOCAL_MODULE := libmesa_winsys_i915
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -29,7 +29,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_intel
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_intel
|
||||
LOCAL_MODULE := libmesa_winsys_intel
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -30,7 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_nouveau
|
||||
LOCAL_MODULE := libmesa_winsys_nouveau
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -30,7 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_SHARED_LIBRARIES := libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_winsys_radeon
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -36,7 +36,6 @@ LOCAL_C_INCLUDES := \
|
||||
$(GALLIUM_TOP)/drivers/svga \
|
||||
$(GALLIUM_TOP)/drivers/svga/include
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_MODULE := libmesa_winsys_svga
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -27,7 +27,6 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_MODULE := libmesa_winsys_vc4
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -27,7 +27,6 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_MODULE := libmesa_winsys_virgl
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@ -32,7 +32,6 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/main
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_STATIC_LIBRARIES := libmesa_loader
|
||||
LOCAL_MODULE := libgbm
|
||||
|
||||
|
@ -33,11 +33,6 @@ include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := \
|
||||
$(LOADER_C_FILES)
|
||||
|
||||
ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
|
||||
LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_MODULE := libmesa_loader
|
||||
|
@ -49,7 +49,6 @@ MESA_DRI_WHOLE_STATIC_LIBRARIES := \
|
||||
MESA_DRI_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libdl \
|
||||
libdrm \
|
||||
libexpat \
|
||||
libglapi \
|
||||
liblog
|
||||
|
Loading…
Reference in New Issue
Block a user