summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/egl/Android.mk18
-rw-r--r--src/gallium/Android.mk13
-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
-rw-r--r--src/gallium/state_trackers/dri/Android.mk2
-rw-r--r--src/gallium/targets/dri/Android.mk60
-rw-r--r--src/gallium/winsys/amdgpu/drm/Android.mk5
-rw-r--r--src/gallium/winsys/i915/drm/Android.mk4
17 files changed, 95 insertions, 70 deletions
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index a122c1d971a..00553226773 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -58,16 +58,16 @@ LOCAL_SHARED_LIBRARIES := \
libgralloc_drm \
libsync
-ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
-# require i915_dri and/or i965_dri
-LOCAL_REQUIRED_MODULES += \
- $(addsuffix _dri, $(filter i915 i965, $(MESA_GPU_DRIVERS)))
-endif # MESA_BUILD_CLASSIC
-
-ifeq ($(strip $(MESA_BUILD_GALLIUM)),true)
+# This controls enabling building of driver libraries
+ifneq ($(HAVE_I915_DRI),)
+LOCAL_REQUIRED_MODULES += i915_dri
+endif
+ifneq ($(HAVE_I965_DRI),)
+LOCAL_REQUIRED_MODULES += i965_dri
+endif
+ifneq ($(MESA_BUILD_GALLIUM),)
LOCAL_REQUIRED_MODULES += gallium_dri
-endif # MESA_BUILD_GALLIUM
-
+endif
LOCAL_MODULE := libGLES_mesa
LOCAL_MODULE_RELATIVE_PATH := egl
diff --git a/src/gallium/Android.mk b/src/gallium/Android.mk
index 7c6bda68d59..09155791273 100644
--- a/src/gallium/Android.mk
+++ b/src/gallium/Android.mk
@@ -37,12 +37,17 @@ SUBDIRS += winsys/sw/dri drivers/softpipe
SUBDIRS += winsys/freedreno/drm drivers/freedreno
SUBDIRS += winsys/i915/drm drivers/i915
SUBDIRS += winsys/nouveau/drm drivers/nouveau
-SUBDIRS += drivers/r300 drivers/r600 drivers/radeon drivers/radeonsi
-SUBDIRS += winsys/amdgpu/drm winsys/radeon/drm
+SUBDIRS += winsys/radeon/drm drivers/r300
+SUBDIRS += winsys/radeon/drm drivers/r600 drivers/radeon
+SUBDIRS += winsys/radeon/drm winsys/amdgpu/drm drivers/radeonsi drivers/radeon
SUBDIRS += winsys/vc4/drm drivers/vc4
SUBDIRS += winsys/virgl/drm winsys/virgl/vtest drivers/virgl
SUBDIRS += winsys/svga/drm drivers/svga
+SUBDIRS += state_trackers/dri
-SUBDIRS += state_trackers/dri targets/dri
+# sort to eliminate any duplicates
+INC_DIRS := $(call all-named-subdir-makefiles,$(sort $(SUBDIRS)))
+# targets/dri must be included last
+INC_DIRS += $(call all-named-subdir-makefiles,targets/dri)
-include $(call all-named-subdir-makefiles,$(SUBDIRS))
+include $(INC_DIRS)
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
diff --git a/src/gallium/state_trackers/dri/Android.mk b/src/gallium/state_trackers/dri/Android.mk
index 97cf9376e19..a867e50d86c 100644
--- a/src/gallium/state_trackers/dri/Android.mk
+++ b/src/gallium/state_trackers/dri/Android.mk
@@ -42,7 +42,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
LOCAL_STATIC_LIBRARIES := \
libmesa_dri_common
-ifneq ($(filter swrast,$(MESA_GPU_DRIVERS)),)
+ifneq ($(HAVE_GALLIUM_SOFTPIPE),)
LOCAL_SRC_FILES += $(drisw_SOURCES)
endif
diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
index f5f0124882f..e95e24a2317 100644
--- a/src/gallium/targets/dri/Android.mk
+++ b/src/gallium/targets/dri/Android.mk
@@ -37,62 +37,11 @@ LOCAL_SHARED_LIBRARIES := \
libglapi \
libexpat
-ifneq ($(filter freedreno,$(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_FREEDRENO
-gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno
-LOCAL_SHARED_LIBRARIES += libdrm_freedreno
-endif
-ifneq ($(filter i915g,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915
-LOCAL_SHARED_LIBRARIES += libdrm_intel
-LOCAL_CFLAGS += -DGALLIUM_I915
-endif
-ifneq ($(filter nouveau,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_winsys_nouveau libmesa_pipe_nouveau
-LOCAL_CFLAGS += -DGALLIUM_NOUVEAU
-LOCAL_SHARED_LIBRARIES += libdrm_nouveau
-endif
-
-ifneq ($(filter r%,$(MESA_GPU_DRIVERS)),)
-ifneq ($(filter r300g,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_pipe_r300
-LOCAL_CFLAGS += -DGALLIUM_R300
-endif
-ifneq ($(filter r600g,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_pipe_r600 libmesa_pipe_radeon
-LOCAL_CFLAGS += -DGALLIUM_R600
-endif
-ifneq ($(filter radeonsi,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_pipe_radeonsi libmesa_winsys_amdgpu libmesa_amd_common libmesa_pipe_radeon
-LOCAL_SHARED_LIBRARIES += libLLVM libdrm_amdgpu
-LOCAL_CFLAGS += -DGALLIUM_RADEONSI
-endif
-gallium_DRIVERS += libmesa_winsys_radeon libmesa_amdgpu_addrlib
-LOCAL_SHARED_LIBRARIES += libdrm_radeon
-endif
-
-ifneq ($(filter swrast,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_dri
-LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE
-endif
-ifneq ($(filter vc4,$(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_VC4
-gallium_DRIVERS += libmesa_winsys_vc4 libmesa_pipe_vc4
-endif
-ifneq ($(filter virgl,$(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_VIRGL
-gallium_DRIVERS += libmesa_winsys_virgl libmesa_winsys_virgl_vtest libmesa_pipe_virgl
-endif
-ifneq ($(filter vmwgfx,$(MESA_GPU_DRIVERS)),)
-gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
-LOCAL_CFLAGS += -DGALLIUM_VMWGFX
-endif
-ifneq ($(filter nouveau r600g,$(MESA_GPU_DRIVERS)),)
-LOCAL_SHARED_LIBRARIES += libc++
-endif
+$(foreach d, $(MESA_BUILD_GALLIUM), $(eval LOCAL_CFLAGS += $(patsubst HAVE_%,-D%,$(d))))
+# sort GALLIUM_LIBS to remove any duplicates
LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(gallium_DRIVERS) \
+ $(sort $(GALLIUM_LIBS)) \
libmesa_st_dri \
libmesa_st_mesa \
libmesa_glsl \
@@ -105,6 +54,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_util \
libmesa_loader
+# sort GALLIUM_SHARED_LIBS to remove any duplicates
+LOCAL_SHARED_LIBRARIES += $(sort $(GALLIUM_SHARED_LIBS))
+
LOCAL_STATIC_LIBRARIES :=
ifeq ($(MESA_ENABLE_LLVM),true)
diff --git a/src/gallium/winsys/amdgpu/drm/Android.mk b/src/gallium/winsys/amdgpu/drm/Android.mk
index 1b9439c4f88..75a4a15809f 100644
--- a/src/gallium/winsys/amdgpu/drm/Android.mk
+++ b/src/gallium/winsys/amdgpu/drm/Android.mk
@@ -41,3 +41,8 @@ LOCAL_MODULE := libmesa_winsys_amdgpu
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_RADEONSI),)
+$(eval GALLIUM_LIBS += $(LOCAL_MODULE) $(LOCAL_STATIC_LIBRARIES))
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif
diff --git a/src/gallium/winsys/i915/drm/Android.mk b/src/gallium/winsys/i915/drm/Android.mk
index b38bd8dca06..bab3e85c5dd 100644
--- a/src/gallium/winsys/i915/drm/Android.mk
+++ b/src/gallium/winsys/i915/drm/Android.mk
@@ -35,3 +35,7 @@ LOCAL_MODULE := libmesa_winsys_i915
include $(GALLIUM_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
+
+ifneq ($(HAVE_GALLIUM_I915),)
+$(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
+endif