OSDN Git Service

Fix black screen in apps
[android-x86/device-generic-goldfish-opengl.git] / Android.mk
index 2e9e473..566e737 100644 (file)
@@ -16,13 +16,26 @@ 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 ($(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.