The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 3 | ############################################################################### |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4 | # Build META EGL library |
| 5 | # |
| 6 | |
Ying Wang | ac0de62 | 2012-12-04 12:04:44 -0800 | [diff] [blame] | 7 | egl.cfg_config_module := |
| 8 | # OpenGL drivers config file |
| 9 | ifneq ($(BOARD_EGL_CFG),) |
| 10 | |
| 11 | include $(CLEAR_VARS) |
| 12 | LOCAL_MODULE := egl.cfg |
| 13 | LOCAL_MODULE_TAGS := optional |
| 14 | LOCAL_MODULE_CLASS := ETC |
| 15 | LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl |
| 16 | LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG) |
| 17 | include $(BUILD_PREBUILT) |
| 18 | egl.cfg_config_module := $(LOCAL_MODULE) |
| 19 | endif |
| 20 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 21 | include $(CLEAR_VARS) |
| 22 | |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 23 | LOCAL_SRC_FILES:= \ |
Mathias Agopian | 518ec11 | 2011-05-13 16:21:08 -0700 | [diff] [blame] | 24 | EGL/egl_tls.cpp \ |
Jamie Gennis | aca51c0 | 2011-11-03 17:42:43 -0700 | [diff] [blame] | 25 | EGL/egl_cache.cpp \ |
Mathias Agopian | 518ec11 | 2011-05-13 16:21:08 -0700 | [diff] [blame] | 26 | EGL/egl_display.cpp \ |
| 27 | EGL/egl_object.cpp \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 28 | EGL/egl.cpp \ |
Mathias Agopian | 518ec11 | 2011-05-13 16:21:08 -0700 | [diff] [blame] | 29 | EGL/eglApi.cpp \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 30 | EGL/getProcAddress.cpp.arm \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 31 | EGL/Loader.cpp \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | # |
David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 33 | |
Craig Donner | 05249fc | 2016-01-15 19:33:55 -0800 | [diff] [blame^] | 34 | LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libui |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | LOCAL_MODULE:= libEGL |
David Li | b33d5cf | 2011-03-04 17:50:48 -0800 | [diff] [blame] | 36 | LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 37 | LOCAL_SHARED_LIBRARIES += libdl |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 38 | # we need to access the private Bionic header <bionic_tls.h> |
| 39 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 41 | LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" |
| 42 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 43 | LOCAL_CFLAGS += -fvisibility=hidden |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 44 | |
Jesse Hall | 201f3b2 | 2012-05-04 14:52:40 -0700 | [diff] [blame] | 45 | ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) |
| 46 | LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION |
| 47 | endif |
Jamie Gennis | 89c1d61 | 2011-11-19 16:25:24 -0800 | [diff] [blame] | 48 | ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) |
| 49 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) |
| 50 | endif |
| 51 | |
Jamie Gennis | f478e6d | 2012-09-12 11:55:16 -0700 | [diff] [blame] | 52 | ifneq ($(MAX_EGL_CACHE_KEY_SIZE),) |
| 53 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE) |
| 54 | endif |
| 55 | |
Jamie Gennis | 89c1d61 | 2011-11-19 16:25:24 -0800 | [diff] [blame] | 56 | ifneq ($(MAX_EGL_CACHE_SIZE),) |
| 57 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) |
| 58 | endif |
| 59 | |
Ivan Krasin | 73e2674 | 2015-09-18 12:03:44 -0700 | [diff] [blame] | 60 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
Evgenii Stepanov | 7944e8a | 2015-07-08 15:49:52 -0700 | [diff] [blame] | 61 | LOCAL_CFLAGS_32 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib\" |
| 62 | LOCAL_CFLAGS_64 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib64\" |
| 63 | endif |
| 64 | |
Ying Wang | ac0de62 | 2012-12-04 12:04:44 -0800 | [diff] [blame] | 65 | LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module) |
| 66 | egl.cfg_config_module := |
| 67 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 68 | include $(BUILD_SHARED_LIBRARY) |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 69 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 70 | ############################################################################### |
| 71 | # Build the wrapper OpenGL ES 1.x library |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 72 | # |
| 73 | |
| 74 | include $(CLEAR_VARS) |
| 75 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 76 | LOCAL_SRC_FILES:= \ |
| 77 | GLES_CM/gl.cpp.arm \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 78 | # |
| 79 | |
Bernhard Rosenkraenzer | d3684ae | 2014-10-13 13:56:57 +0200 | [diff] [blame] | 80 | LOCAL_CLANG := false |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 81 | LOCAL_SHARED_LIBRARIES += libcutils liblog libEGL |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 82 | LOCAL_MODULE:= libGLESv1_CM |
| 83 | |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 84 | LOCAL_SHARED_LIBRARIES += libdl |
| 85 | # we need to access the private Bionic header <bionic_tls.h> |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 86 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 87 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 88 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" |
| 89 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 90 | LOCAL_CFLAGS += -fvisibility=hidden |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 91 | |
Dmitriy Ivanov | ae62e05 | 2015-05-13 15:05:07 -0700 | [diff] [blame] | 92 | # TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 93 | LOCAL_LDFLAGS_arm += -Wl,--hash-style,both |
| 94 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 95 | include $(BUILD_SHARED_LIBRARY) |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 96 | |
| 97 | |
| 98 | ############################################################################### |
| 99 | # Build the wrapper OpenGL ES 2.x library |
| 100 | # |
| 101 | |
| 102 | include $(CLEAR_VARS) |
| 103 | |
Dmitriy Ivanov | b952f42 | 2015-11-18 14:57:49 -0800 | [diff] [blame] | 104 | LOCAL_SRC_FILES:= \ |
| 105 | GLES2/gl2.cpp \ |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 106 | # |
| 107 | |
Bernhard Rosenkraenzer | d3684ae | 2014-10-13 13:56:57 +0200 | [diff] [blame] | 108 | LOCAL_CLANG := false |
Dmitriy Ivanov | b952f42 | 2015-11-18 14:57:49 -0800 | [diff] [blame] | 109 | LOCAL_ARM_MODE := arm |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 110 | LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 111 | LOCAL_MODULE:= libGLESv2 |
| 112 | |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 113 | LOCAL_SHARED_LIBRARIES += libdl |
| 114 | # we need to access the private Bionic header <bionic_tls.h> |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 115 | LOCAL_C_INCLUDES += bionic/libc/private |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 116 | |
| 117 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" |
| 118 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
| 119 | LOCAL_CFLAGS += -fvisibility=hidden |
| 120 | |
Dmitriy Ivanov | ae62e05 | 2015-05-13 15:05:07 -0700 | [diff] [blame] | 121 | # TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 122 | LOCAL_LDFLAGS_arm += -Wl,--hash-style,both |
| 123 | |
Dmitriy Ivanov | b952f42 | 2015-11-18 14:57:49 -0800 | [diff] [blame] | 124 | include $(BUILD_SHARED_LIBRARY) |
| 125 | |
| 126 | ############################################################################### |
| 127 | # Build the wrapper OpenGL ES 3.x library (this is just different name for v2) |
| 128 | # |
| 129 | |
| 130 | include $(CLEAR_VARS) |
| 131 | |
| 132 | LOCAL_SRC_FILES:= \ |
| 133 | GLES2/gl2.cpp \ |
| 134 | # |
| 135 | |
| 136 | LOCAL_CLANG := false |
| 137 | LOCAL_ARM_MODE := arm |
| 138 | LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL |
| 139 | LOCAL_MODULE:= libGLESv3 |
| 140 | LOCAL_SHARED_LIBRARIES += libdl |
| 141 | # we need to access the private Bionic header <bionic_tls.h> |
| 142 | LOCAL_C_INCLUDES += bionic/libc/private |
| 143 | |
| 144 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv3\" |
| 145 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
| 146 | LOCAL_CFLAGS += -fvisibility=hidden |
| 147 | |
| 148 | # TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 149 | LOCAL_LDFLAGS_arm += -Wl,--hash-style,both |
Ying Wang | c3aed1e | 2014-07-23 11:33:24 -0700 | [diff] [blame] | 150 | |
| 151 | include $(BUILD_SHARED_LIBRARY) |
Jesse Hall | 5ea4c73 | 2013-02-08 16:13:50 -0800 | [diff] [blame] | 152 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 153 | ############################################################################### |
| 154 | # Build the ETC1 host static library |
| 155 | # |
| 156 | |
| 157 | include $(CLEAR_VARS) |
| 158 | |
| 159 | LOCAL_SRC_FILES:= \ |
| 160 | ETC1/etc1.cpp \ |
| 161 | # |
| 162 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 163 | LOCAL_MODULE:= libETC1 |
Dan Willemsen | 1cf2c1a | 2015-08-28 14:09:44 -0700 | [diff] [blame] | 164 | LOCAL_MODULE_HOST_OS := darwin linux windows |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 165 | |
| 166 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 167 | |
| 168 | ############################################################################### |
| 169 | # Build the ETC1 device library |
| 170 | # |
| 171 | |
| 172 | include $(CLEAR_VARS) |
| 173 | |
| 174 | LOCAL_SRC_FILES:= \ |
| 175 | ETC1/etc1.cpp \ |
| 176 | # |
| 177 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 178 | LOCAL_MODULE:= libETC1 |
| 179 | |
| 180 | include $(BUILD_SHARED_LIBRARY) |
David Li | 2f5a655 | 2011-03-01 16:08:10 -0800 | [diff] [blame] | 181 | |
| 182 | include $(call all-makefiles-under,$(LOCAL_PATH)) |