summaryrefslogtreecommitdiff
path: root/lib/mesa/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/Android.mk')
-rw-r--r--lib/mesa/Android.mk30
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/mesa/Android.mk b/lib/mesa/Android.mk
index 07eba7b83..e86c9bd51 100644
--- a/lib/mesa/Android.mk
+++ b/lib/mesa/Android.mk
@@ -24,7 +24,7 @@
# BOARD_GPU_DRIVERS should be defined. The valid values are
#
# classic drivers: i915 i965
-# gallium drivers: swrast freedreno i915g nouveau kmsro r300g r600g radeonsi vc4 virgl vmwgfx etnaviv iris lima panfrost
+# gallium drivers: swrast freedreno i915g nouveau kmsro r300g r600g radeonsi vc4 virgl vmwgfx etnaviv iris lima
#
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
# module will also be built. DRI modules will be loaded by libGLES_mesa.
@@ -43,12 +43,6 @@ MESA_DRI_LDFLAGS := -Wl,--build-id=sha1
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
MESA_PYTHON2 := python
-MESA_PYTHON3 := python3
-ifeq ($(filter 5 6 7 8 9 10, $(MESA_ANDROID_MAJOR_VERSION)),)
-MESA_LEX := M4=$(M4) $(LEX)
-else
-MESA_LEX := $(LEX)
-endif
# Lists to convert driver names to boolean variables
# in form of <driver name>.<boolean make variable>
@@ -67,8 +61,7 @@ gallium_drivers := \
virgl.HAVE_GALLIUM_VIRGL \
etnaviv.HAVE_GALLIUM_ETNAVIV \
iris.HAVE_GALLIUM_IRIS \
- lima.HAVE_GALLIUM_LIMA \
- panfrost.HAVE_GALLIUM_PANFROST
+ lima.HAVE_GALLIUM_LIMA
ifeq ($(BOARD_GPU_DRIVERS),all)
MESA_BUILD_CLASSIC := $(filter HAVE_%, $(subst ., , $(classic_drivers)))
@@ -90,20 +83,33 @@ endif
$(foreach d, $(MESA_BUILD_CLASSIC) $(MESA_BUILD_GALLIUM), $(eval $(d) := true))
+# host and target must be the same arch to generate matypes.h
+ifeq ($(TARGET_ARCH),$(HOST_ARCH))
+MESA_ENABLE_ASM := true
+else
+MESA_ENABLE_ASM := false
+endif
+
ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI)),)
MESA_ENABLE_LLVM := true
endif
define mesa-build-with-llvm
- $(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5 6 7), \
+ $(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \
$(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
- $(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DDRAW_LLVM_AVAILABLE -DLLVM_IS_SHARED=1 -DMESA_LLVM_VERSION_STRING=\"3.9\") \
+ $(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
+ $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_STRING=\"3.7\")) \
+ $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
+ $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_STRING=\"3.8\")) \
+ $(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \
+ $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
+ $(if $(filter P,$(MESA_ANDROID_MAJOR_VERSION)), \
+ $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
$(eval LOCAL_SHARED_LIBRARIES += libLLVM)
endef
# add subdirectories
SUBDIRS := \
- src/etnaviv \
src/freedreno \
src/gbm \
src/loader \