OSDN Git Service

Merge cherrypicks of [2454758, 2454859, 2454837, 2454965, 2454984, 2455001, 2454760...
[android-x86/device-generic-goldfish-opengl.git] / Android.mk
index 2e9e473..3ab6a6c 100644 (file)
@@ -16,13 +16,34 @@ EMUGL_PATH := $(call my-dir)
 # This is always set to a module's LOCAL_C_INCLUDES
 # See the definition of emugl-begin-module in common.mk
 #
-EMUGL_COMMON_INCLUDES := $(EMUGL_PATH)/host/include/libOpenglRender
+EMUGL_COMMON_INCLUDES := $(EMUGL_PATH)/host/include/libOpenglRender $(EMUGL_PATH)/system/include
 
 # common cflags used by several modules
 # This is always set to a module's LOCAL_CFLAGS
 # See the definition of emugl-begin-module in common.mk
 #
-EMUGL_COMMON_CFLAGS := -DWITH_GLES2
+EMUGL_COMMON_CFLAGS := -DWITH_GLES2 -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
+
+ifeq (O, $(PLATFORM_VERSION_CODENAME))
+EMUGL_COMMON_CFLAGS += -DGOLDFISH_HIDL_GRALLOC
+endif
+
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25 && echo isApi26OrHigher),isApi26OrHigher)
+EMUGL_COMMON_CFLAGS += -DGOLDFISH_HIDL_GRALLOC
+endif
+
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 18 && echo PreJellyBeanMr2),PreJellyBeanMr2)
+    ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
+        EMUGL_COMMON_CFLAGS += -DHAVE_ARM_TLS_REGISTER
+    endif
+endif
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 16 && echo PreJellyBean),PreJellyBean)
+    EMUGL_COMMON_CFLAGS += -DALOG_ASSERT=LOG_ASSERT
+    EMUGL_COMMON_CFLAGS += -DALOGE=LOGE
+    EMUGL_COMMON_CFLAGS += -DALOGW=LOGW
+    EMUGL_COMMON_CFLAGS += -DALOGD=LOGD
+    EMUGL_COMMON_CFLAGS += -DALOGV=LOGV
+endif
 
 # Uncomment the following line if you want to enable debug traces
 # in the GLES emulation libraries.
@@ -60,6 +81,7 @@ include $(EMUGL_PATH)/system/GLESv1/Android.mk
 include $(EMUGL_PATH)/system/GLESv2/Android.mk
 
 include $(EMUGL_PATH)/system/gralloc/Android.mk
+include $(EMUGL_PATH)/system/surfaceInterface/Android.mk
 include $(EMUGL_PATH)/system/egl/Android.mk
 
 endif # BUILD_EMULATOR_OPENGL == true