blob: 566e737af009c636d6dde971b98ec04c1819ebe2 [file] [log] [blame]
keunyoungb85b2752013-03-08 12:28:03 -08001# This is the top-level build file for the Android HW OpenGL ES emulation
2# in Android.
3#
4# You must define BUILD_EMULATOR_OPENGL to 'true' in your environment to
5# build the following files.
6#
7# Also define BUILD_EMULATOR_OPENGL_DRIVER to 'true' to build the gralloc
8# stuff as well.
9#
10ifeq (true,$(BUILD_EMULATOR_OPENGL))
11
12# Top-level for all modules
13EMUGL_PATH := $(call my-dir)
14
15# Directory containing common headers used by several modules
16# This is always set to a module's LOCAL_C_INCLUDES
17# See the definition of emugl-begin-module in common.mk
18#
Yahan Zhoud9069282016-06-17 17:40:14 -070019EMUGL_COMMON_INCLUDES := $(EMUGL_PATH)/host/include/libOpenglRender $(EMUGL_PATH)/system/include
keunyoungb85b2752013-03-08 12:28:03 -080020
21# common cflags used by several modules
22# This is always set to a module's LOCAL_CFLAGS
23# See the definition of emugl-begin-module in common.mk
24#
Yahan Zhoud9069282016-06-17 17:40:14 -070025EMUGL_COMMON_CFLAGS := -DWITH_GLES2 -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
keunyoungb85b2752013-03-08 12:28:03 -080026
Yahan Zhou52dd9f02016-07-20 14:31:33 -070027ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 18 && echo PreJellyBeanMr2),PreJellyBeanMr2)
Yahan Zhouda1c76d2016-06-23 13:58:09 -070028 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
29 EMUGL_COMMON_CFLAGS += -DHAVE_ARM_TLS_REGISTER
30 endif
Yahan Zhoub795a342016-07-20 16:12:02 -070031endif
32ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 16 && echo PreJellyBean),PreJellyBean)
Yahan Zhouda1c76d2016-06-23 13:58:09 -070033 EMUGL_COMMON_CFLAGS += -DALOG_ASSERT=LOG_ASSERT
34 EMUGL_COMMON_CFLAGS += -DALOGE=LOGE
35 EMUGL_COMMON_CFLAGS += -DALOGW=LOGW
36 EMUGL_COMMON_CFLAGS += -DALOGD=LOGD
Lingfeng Yange5913372016-11-29 14:23:14 -080037 EMUGL_COMMON_CFLAGS += -DALOGV=LOGV
Yahan Zhouda1c76d2016-06-23 13:58:09 -070038endif
39
keunyoungb85b2752013-03-08 12:28:03 -080040# Uncomment the following line if you want to enable debug traces
41# in the GLES emulation libraries.
42# EMUGL_COMMON_CFLAGS += -DEMUGL_DEBUG=1
43
44# Include common definitions used by all the modules included later
45# in this build file. This contains the definition of all useful
46# emugl-xxxx functions.
47#
48include $(EMUGL_PATH)/common.mk
49
50# IMPORTANT: ORDER IS CRUCIAL HERE
51#
52# For the import/export feature to work properly, you must include
53# modules below in correct order. That is, if module B depends on
54# module A, then it must be included after module A below.
55#
56# This ensures that anything exported by module A will be correctly
57# be imported by module B when it is declared.
58#
59# Note that the build system will complain if you try to import a
60# module that hasn't been declared yet anyway.
61#
62
keunyoungb85b2752013-03-08 12:28:03 -080063include $(EMUGL_PATH)/shared/OpenglCodecCommon/Android.mk
64
65# System static libraries
66include $(EMUGL_PATH)/system/GLESv1_enc/Android.mk
67include $(EMUGL_PATH)/system/GLESv2_enc/Android.mk
68include $(EMUGL_PATH)/system/renderControl_enc/Android.mk
69include $(EMUGL_PATH)/system/OpenglSystemCommon/Android.mk
70
71# System shared libraries
72include $(EMUGL_PATH)/system/GLESv1/Android.mk
73include $(EMUGL_PATH)/system/GLESv2/Android.mk
74
75include $(EMUGL_PATH)/system/gralloc/Android.mk
76include $(EMUGL_PATH)/system/egl/Android.mk
77
78endif # BUILD_EMULATOR_OPENGL == true