MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
MESA_ANDROID_MINOR_VERSION := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
MESA_ANDROID_VERSION := $(MESA_ANDROID_MAJOR_VERSION).$(MESA_ANDROID_MINOR_VERSION)
+ifeq ($(filter 1 2 3 4,$(MESA_ANDROID_MAJOR_VERSION)),)
+MESA_LOLLIPOP_BUILD := true
+else
+define local-generated-sources-dir
+$(call local-intermediates-dir)
+endef
+endif
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
MESA_PYTHON2 := python
platform_android.c
LOCAL_CFLAGS := \
- -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\" \
-DHAVE_SHARED_GLAPI \
-DHAVE_ANDROID_PLATFORM
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_CFLAGS_x86 := -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\"
+LOCAL_CFLAGS_x86_64 := -DDEFAULT_DRIVER_DIR=\"/system/lib64/dri\"
+else
+LOCAL_CFLAGS += -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\"
+endif
+
LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/egl/main \
libmesa_loader
LOCAL_MODULE := libGLES_mesa
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_MODULE_RELATIVE_PATH := egl
+else
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
+endif
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)
# generate sources
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES))
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
#endif
-#if defined(PIPE_OS_ANDROID)
+#if defined(PIPE_OS_ANDROID) && !defined(__LP64__)
extern void *__mmap2(void *, size_t, int, int, int, size_t);
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
endif
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
sources := \
glsl_lexer.cpp \
LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES += \
- $(intermediates) \
$(intermediates)/glcpp \
$(intermediates)/nir \
$(MESA_TOP)/src/glsl/glcpp \
LOCAL_MODULE := libglapi
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
abi_header := $(intermediates)/$(abi_header)
LOCAL_GENERATED_SOURCES := $(abi_header)
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
endif
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
# This is the list of auto-generated files: sources and headers
sources := \
LOCAL_MODULE := libmesa_dri_common
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
LOCAL_C_INCLUDES := \
- $(intermediates) \
$(MESA_DRI_C_INCLUDES)
# swrast only
include $(CLEAR_VARS)
LOCAL_MODULE := i915_dri
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH))
+else
LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH)
LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH)
+endif
# Import variables i915_FILES.
include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
LOCAL_MODULE := i965_dri
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH))
+else
LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH)
LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH)
+endif
# Import variables i965_FILES.
include $(LOCAL_PATH)/Makefile.sources
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
LOCAL_STATIC_LIBRARIES := libmesa_glsl
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
# TODO(chadv): In Makefile.sources, move these vars to a different list so we can
# remove this kludge.
$(local-l-to-c)
LOCAL_C_INCLUDES := \
- $(intermediates) \
$(MESA_TOP)/src/mapi \
$(MESA_TOP)/src/mesa \
$(MESA_TOP)/src/glsl \
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES))
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-intermediates-dir)
+intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES))
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)