aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2017-05-03 14:35:20 -0500
committerEmil Velikov <[email protected]>2017-05-11 13:52:21 +0100
commit3f097396a1642bb7033002d0bdd37e194afce06a (patch)
tree8a4bd04f538b8622325f18b9b26053256a44da63 /src/gallium/drivers
parent2a2dabe1c330fea311505b453de58ddcd5488fcc (diff)
Android: push driver build details to driver makefiles
src/gallium/targets/dri/Android.mk contains lots of conditional for individual drivers. Let's move these details into the individual driver makefiles. In the process, align the make driver conditionals with automake (i.e. HAVE_GALLIUM_*). Signed-off-by: Rob Herring <[email protected]> [Emil Velikov: add the radeon winsys for radeonsi] Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/Android.mk5
-rw-r--r--src/gallium/drivers/i915/Android.mk4
-rw-r--r--src/gallium/drivers/nouveau/Android.mk5
-rw-r--r--src/gallium/drivers/r300/Android.mk4
-rw-r--r--src/gallium/drivers/r600/Android.mk9
-rw-r--r--src/gallium/drivers/radeon/Android.mk7
-rw-r--r--src/gallium/drivers/radeonsi/Android.mk13
-rw-r--r--src/gallium/drivers/softpipe/Android.mk4
-rw-r--r--src/gallium/drivers/svga/Android.mk4
-rw-r--r--src/gallium/drivers/vc4/Android.mk4
-rw-r--r--src/gallium/drivers/virgl/Android.mk4
11 files changed, 61 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk
index 5c97d9ef290..330e8242042 100644
--- a/src/gallium/drivers/freedreno/Android.mk
+++ b/src/gallium/drivers/freedreno/Android.mk
@@ -48,3 +48,8 @@ LOCAL_MODULE := libmesa_pipe_freedreno
include $(LOCAL_PATH)/Android.gen.mk
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_FREEDRENO),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_freedreno)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/i915/Android.mk b/src/gallium/drivers/i915/Android.mk
index fece3053e37..6860770167f 100644
--- a/src/gallium/drivers/i915/Android.mk
+++ b/src/gallium/drivers/i915/Android.mk
@@ -34,3 +34,7 @@ LOCAL_MODULE := libmesa_pipe_i915
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_I915),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_i915)
+endif
diff --git a/src/gallium/drivers/nouveau/Android.mk b/src/gallium/drivers/nouveau/Android.mk
index d499d9918d8..af379bcc4b3 100644
--- a/src/gallium/drivers/nouveau/Android.mk
+++ b/src/gallium/drivers/nouveau/Android.mk
@@ -41,3 +41,8 @@ LOCAL_MODULE := libmesa_pipe_nouveau
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_NOUVEAU),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_nouveau)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/r300/Android.mk b/src/gallium/drivers/r300/Android.mk
index e2939ac4043..0c89cdbb147 100644
--- a/src/gallium/drivers/r300/Android.mk
+++ b/src/gallium/drivers/r300/Android.mk
@@ -41,3 +41,7 @@ LOCAL_MODULE := libmesa_pipe_r300
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+ifneq ($(HAVE_GALLIUM_R300),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_radeon)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/r600/Android.mk b/src/gallium/drivers/r600/Android.mk
index cc89d8f6aed..26c00f6ccd9 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -31,8 +31,17 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)
LOCAL_STATIC_LIBRARIES := libmesa_amd_common
+
LOCAL_SHARED_LIBRARIES := libdrm_radeon
LOCAL_MODULE := libmesa_pipe_r600
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_R600),)
+$(eval GALLIUM_LIBS += \
+ $(LOCAL_MODULE) \
+ $(LOCAL_STATIC_LIBRARIES) \
+ libmesa_winsys_radeon)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/radeon/Android.mk b/src/gallium/drivers/radeon/Android.mk
index 2bddac832a2..64815f6f084 100644
--- a/src/gallium/drivers/radeon/Android.mk
+++ b/src/gallium/drivers/radeon/Android.mk
@@ -34,8 +34,13 @@ ifeq ($(MESA_ENABLE_LLVM),true)
LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU # instructs LLVM to declare LLVMInitializeAMDGPU* functions
endif
-LOCAL_SHARED_LIBRARIES := libdrm_radeon
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
LOCAL_MODULE := libmesa_pipe_radeon
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_R600)$(HAVE_GALLIUM_RADEONSI),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE))
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk
index b6f9e26fccc..cd768751518 100644
--- a/src/gallium/drivers/radeonsi/Android.mk
+++ b/src/gallium/drivers/radeonsi/Android.mk
@@ -38,8 +38,19 @@ LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/amd/common \
$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_amd_common,,)/common
-LOCAL_SHARED_LIBRARIES := libdrm_radeon
+LOCAL_STATIC_LIBRARIES := libmesa_amd_common
+
+LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
LOCAL_MODULE := libmesa_pipe_radeonsi
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_RADEONSI),)
+$(eval GALLIUM_LIBS += \
+ $(LOCAL_MODULE) \
+ $(LOCAL_STATIC_LIBRARIES) \
+ libmesa_winsys_radeon \
+ libmesa_winsys_amdgpu)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/drivers/softpipe/Android.mk b/src/gallium/drivers/softpipe/Android.mk
index 5d3a93bcee4..dc0fe9dcdbd 100644
--- a/src/gallium/drivers/softpipe/Android.mk
+++ b/src/gallium/drivers/softpipe/Android.mk
@@ -35,3 +35,7 @@ LOCAL_MODULE := libmesa_pipe_softpipe
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_SOFTPIPE),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_sw_dri)
+endif
diff --git a/src/gallium/drivers/svga/Android.mk b/src/gallium/drivers/svga/Android.mk
index 7d23fd500ef..c50743d5094 100644
--- a/src/gallium/drivers/svga/Android.mk
+++ b/src/gallium/drivers/svga/Android.mk
@@ -36,3 +36,7 @@ LOCAL_MODULE := libmesa_pipe_svga
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_VMWGFX),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_svga)
+endif
diff --git a/src/gallium/drivers/vc4/Android.mk b/src/gallium/drivers/vc4/Android.mk
index de9d5e3f5b3..0dd70e5a0a5 100644
--- a/src/gallium/drivers/vc4/Android.mk
+++ b/src/gallium/drivers/vc4/Android.mk
@@ -36,3 +36,7 @@ LOCAL_MODULE := libmesa_pipe_vc4
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_VC4),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_vc4)
+endif
diff --git a/src/gallium/drivers/virgl/Android.mk b/src/gallium/drivers/virgl/Android.mk
index 7c1ba42a5f6..010e15144c9 100644
--- a/src/gallium/drivers/virgl/Android.mk
+++ b/src/gallium/drivers/virgl/Android.mk
@@ -32,3 +32,7 @@ LOCAL_MODULE := libmesa_pipe_virgl
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_VIRGL),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_virgl libmesa_winsys_virgl_vtest)
+endif