summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2016-06-07 18:27:34 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2016-06-13 15:31:29 +0100
commit112e988329b6af817b4892b530f703e7997b1d7d (patch)
tree453baa9443909013215e54357808f668a9cbcb17
parent54e550ab8ad7ca5ebd24edbbb3f96e5412209ba9 (diff)
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>
-rw-r--r--Android.common.mk6
-rw-r--r--src/egl/Android.mk6
-rw-r--r--src/gallium/auxiliary/pipe-loader/Android.mk3
-rw-r--r--src/gallium/drivers/freedreno/Android.mk2
-rw-r--r--src/gallium/drivers/nouveau/Android.mk2
-rw-r--r--src/gallium/drivers/r300/Android.mk2
-rw-r--r--src/gallium/drivers/r600/Android.mk2
-rw-r--r--src/gallium/drivers/radeon/Android.mk2
-rw-r--r--src/gallium/drivers/radeonsi/Android.mk2
-rw-r--r--src/gallium/drivers/vc4/Android.mk1
-rw-r--r--src/gallium/drivers/virgl/Android.mk1
-rw-r--r--src/gallium/state_trackers/dri/Android.mk1
-rw-r--r--src/gallium/targets/dri/Android.mk5
-rw-r--r--src/gallium/winsys/amdgpu/drm/Android.mk2
-rw-r--r--src/gallium/winsys/freedreno/drm/Android.mk2
-rw-r--r--src/gallium/winsys/i915/drm/Android.mk2
-rw-r--r--src/gallium/winsys/intel/drm/Android.mk2
-rw-r--r--src/gallium/winsys/nouveau/drm/Android.mk2
-rw-r--r--src/gallium/winsys/radeon/drm/Android.mk2
-rw-r--r--src/gallium/winsys/svga/drm/Android.mk1
-rw-r--r--src/gallium/winsys/vc4/drm/Android.mk1
-rw-r--r--src/gallium/winsys/virgl/drm/Android.mk1
-rw-r--r--src/gbm/Android.mk1
-rw-r--r--src/loader/Android.mk5
-rw-r--r--src/mesa/drivers/dri/Android.mk1
25 files changed, 18 insertions, 39 deletions
diff --git a/Android.common.mk b/Android.common.mk
index 831cbe59ff..dee22dae09 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -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 \
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 5dce6c6155..bfd56a744d 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -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 += \
diff --git a/src/gallium/auxiliary/pipe-loader/Android.mk b/src/gallium/auxiliary/pipe-loader/Android.mk
index 27893137a1..006bb0ebfd 100644
--- a/src/gallium/auxiliary/pipe-loader/Android.mk
+++ b/src/gallium/auxiliary/pipe-loader/Android.mk
@@ -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
diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk
index f630dc175f..e901b36671 100644
--- a/src/gallium/drivers/freedreno/Android.mk
+++ b/src/gallium/drivers/freedreno/Android.mk
@@ -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
diff --git a/src/gallium/drivers/nouveau/Android.mk b/src/gallium/drivers/nouveau/Android.mk
index daf3abd1bb..839a3899cb 100644
--- a/src/gallium/drivers/nouveau/Android.mk
+++ b/src/gallium/drivers/nouveau/Android.mk
@@ -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)
diff --git a/src/gallium/drivers/r300/Android.mk b/src/gallium/drivers/r300/Android.mk
index bb31519f00..e2939ac404 100644
--- a/src/gallium/drivers/r300/Android.mk
+++ b/src/gallium/drivers/r300/Android.mk
@@ -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)
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index bfe3987308..6476091269 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.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)
diff --git a/src/gallium/drivers/radeon/Android.mk b/src/gallium/drivers/radeon/Android.mk
index 6997a6d3ec..2f72f1f563 100644
--- a/src/gallium/drivers/radeon/Android.mk
+++ b/src/gallium/drivers/radeon/Android.mk
@@ -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)
diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk
index 7e5e54b349..1a9e5472c9 100644
--- a/src/gallium/drivers/radeonsi/Android.mk
+++ b/src/gallium/drivers/radeonsi/Android.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
diff --git a/src/gallium/drivers/vc4/Android.mk b/src/gallium/drivers/vc4/Android.mk
index 2efb472263..de9d5e3f5b 100644
--- a/src/gallium/drivers/vc4/Android.mk
+++ b/src/gallium/drivers/vc4/Android.mk
@@ -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
diff --git a/src/gallium/drivers/virgl/Android.mk b/src/gallium/drivers/virgl/Android.mk
index b8309e43d7..7c1ba42a5f 100644
--- a/src/gallium/drivers/virgl/Android.mk
+++ b/src/gallium/drivers/virgl/Android.mk
@@ -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)
diff --git a/src/gallium/state_trackers/dri/Android.mk b/src/gallium/state_trackers/dri/Android.mk
index f0eb18dcac..4bdd136ea9 100644
--- a/src/gallium/state_trackers/dri/Android.mk
+++ b/src/gallium/state_trackers/dri/Android.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
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index 7da0e8aabb..24c4bfa4e3 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -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
diff --git a/src/gallium/winsys/amdgpu/drm/Android.mk b/src/gallium/winsys/amdgpu/drm/Android.mk
index 57732347ee..0a26156718 100644
--- a/src/gallium/winsys/amdgpu/drm/Android.mk
+++ b/src/gallium/winsys/amdgpu/drm/Android.mk
@@ -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)
diff --git a/src/gallium/winsys/freedreno/drm/Android.mk b/src/gallium/winsys/freedreno/drm/Android.mk
index b45d3d4b68..0a8e8f17ae 100644
--- a/src/gallium/winsys/freedreno/drm/Android.mk
+++ b/src/gallium/winsys/freedreno/drm/Android.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)
diff --git a/src/gallium/winsys/i915/drm/Android.mk b/src/gallium/winsys/i915/drm/Android.mk
index 5c9107b660..b38bd8dca0 100644
--- a/src/gallium/winsys/i915/drm/Android.mk
+++ b/src/gallium/winsys/i915/drm/Android.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)
diff --git a/src/gallium/winsys/intel/drm/Android.mk b/src/gallium/winsys/intel/drm/Android.mk
index 463d315c81..64752f8032 100644
--- a/src/gallium/winsys/intel/drm/Android.mk
+++ b/src/gallium/winsys/intel/drm/Android.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)
diff --git a/src/gallium/winsys/nouveau/drm/Android.mk b/src/gallium/winsys/nouveau/drm/Android.mk
index 2841080fa8..b9b8812a37 100644
--- a/src/gallium/winsys/nouveau/drm/Android.mk
+++ b/src/gallium/winsys/nouveau/drm/Android.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)
diff --git a/src/gallium/winsys/radeon/drm/Android.mk b/src/gallium/winsys/radeon/drm/Android.mk
index eacb35f544..2e0c40c066 100644
--- a/src/gallium/winsys/radeon/drm/Android.mk
+++ b/src/gallium/winsys/radeon/drm/Android.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)
diff --git a/src/gallium/winsys/svga/drm/Android.mk b/src/gallium/winsys/svga/drm/Android.mk
index f57225e02d..67c9f4f46e 100644
--- a/src/gallium/winsys/svga/drm/Android.mk
+++ b/src/gallium/winsys/svga/drm/Android.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)
diff --git a/src/gallium/winsys/vc4/drm/Android.mk b/src/gallium/winsys/vc4/drm/Android.mk
index 55edc179aa..af5813dd2f 100644
--- a/src/gallium/winsys/vc4/drm/Android.mk
+++ b/src/gallium/winsys/vc4/drm/Android.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)
diff --git a/src/gallium/winsys/virgl/drm/Android.mk b/src/gallium/winsys/virgl/drm/Android.mk
index 849350343f..4256f467d4 100644
--- a/src/gallium/winsys/virgl/drm/Android.mk
+++ b/src/gallium/winsys/virgl/drm/Android.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)
diff --git a/src/gbm/Android.mk b/src/gbm/Android.mk
index 6dc422c052..a3f8fbbeab 100644
--- a/src/gbm/Android.mk
+++ b/src/gbm/Android.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
diff --git a/src/loader/Android.mk b/src/loader/Android.mk
index 869056564c..ca9218846c 100644
--- a/src/loader/Android.mk
+++ b/src/loader/Android.mk
@@ -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
diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk
index 7e7587b075..72a5593fef 100644
--- a/src/mesa/drivers/dri/Android.mk
+++ b/src/mesa/drivers/dri/Android.mk
@@ -49,7 +49,6 @@ MESA_DRI_WHOLE_STATIC_LIBRARIES := \
MESA_DRI_SHARED_LIBRARIES := \
libcutils \
libdl \
- libdrm \
libexpat \
libglapi \
liblog