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 \ |
Jack Palevich | a2dd6cf | 2010-10-26 15:21:24 -0700 | [diff] [blame] | 30 | EGL/trace.cpp \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 31 | EGL/getProcAddress.cpp.arm \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 32 | EGL/Loader.cpp \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | # |
David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 34 | |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 35 | LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libGLES_trace |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | LOCAL_MODULE:= libEGL |
David Li | b33d5cf | 2011-03-04 17:50:48 -0800 | [diff] [blame] | 37 | LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 38 | LOCAL_SHARED_LIBRARIES += libdl |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 39 | # we need to access the private Bionic header <bionic_tls.h> |
| 40 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 41 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 42 | LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" |
| 43 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 44 | LOCAL_CFLAGS += -fvisibility=hidden |
Jack Palevich | a2dd6cf | 2010-10-26 15:21:24 -0700 | [diff] [blame] | 45 | LOCAL_CFLAGS += -DEGL_TRACE=1 |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 46 | |
Jesse Hall | 201f3b2 | 2012-05-04 14:52:40 -0700 | [diff] [blame] | 47 | ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) |
| 48 | LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION |
| 49 | endif |
Jamie Gennis | 89c1d61 | 2011-11-19 16:25:24 -0800 | [diff] [blame] | 50 | ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) |
| 51 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) |
| 52 | endif |
| 53 | |
Jamie Gennis | f478e6d | 2012-09-12 11:55:16 -0700 | [diff] [blame] | 54 | ifneq ($(MAX_EGL_CACHE_KEY_SIZE),) |
| 55 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE) |
| 56 | endif |
| 57 | |
Jamie Gennis | 89c1d61 | 2011-11-19 16:25:24 -0800 | [diff] [blame] | 58 | ifneq ($(MAX_EGL_CACHE_SIZE),) |
| 59 | LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) |
| 60 | endif |
| 61 | |
Evgenii Stepanov | 7944e8a | 2015-07-08 15:49:52 -0700 | [diff] [blame^] | 62 | ifeq (address, $(strip $(SANITIZE_TARGET))) |
| 63 | LOCAL_CFLAGS_32 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib\" |
| 64 | LOCAL_CFLAGS_64 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib64\" |
| 65 | endif |
| 66 | |
Ying Wang | ac0de62 | 2012-12-04 12:04:44 -0800 | [diff] [blame] | 67 | LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module) |
| 68 | egl.cfg_config_module := |
| 69 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | include $(BUILD_SHARED_LIBRARY) |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 71 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 72 | ############################################################################### |
| 73 | # Build the wrapper OpenGL ES 1.x library |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 74 | # |
| 75 | |
| 76 | include $(CLEAR_VARS) |
| 77 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 78 | LOCAL_SRC_FILES:= \ |
| 79 | GLES_CM/gl.cpp.arm \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 | # |
| 81 | |
Bernhard Rosenkraenzer | d3684ae | 2014-10-13 13:56:57 +0200 | [diff] [blame] | 82 | LOCAL_CLANG := false |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 83 | LOCAL_SHARED_LIBRARIES += libcutils liblog libEGL |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 84 | LOCAL_MODULE:= libGLESv1_CM |
| 85 | |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 86 | LOCAL_SHARED_LIBRARIES += libdl |
| 87 | # we need to access the private Bionic header <bionic_tls.h> |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 88 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 89 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 90 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" |
| 91 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 92 | LOCAL_CFLAGS += -fvisibility=hidden |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 93 | |
Dmitriy Ivanov | ae62e05 | 2015-05-13 15:05:07 -0700 | [diff] [blame] | 94 | # TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 95 | LOCAL_LDFLAGS_arm += -Wl,--hash-style,both |
| 96 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 97 | include $(BUILD_SHARED_LIBRARY) |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 98 | |
| 99 | |
| 100 | ############################################################################### |
| 101 | # Build the wrapper OpenGL ES 2.x library |
| 102 | # |
| 103 | |
| 104 | include $(CLEAR_VARS) |
| 105 | |
| 106 | LOCAL_SRC_FILES:= \ |
| 107 | GLES2/gl2.cpp.arm \ |
| 108 | # |
| 109 | |
Bernhard Rosenkraenzer | d3684ae | 2014-10-13 13:56:57 +0200 | [diff] [blame] | 110 | LOCAL_CLANG := false |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 111 | LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 112 | LOCAL_MODULE:= libGLESv2 |
| 113 | |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 114 | LOCAL_SHARED_LIBRARIES += libdl |
| 115 | # we need to access the private Bionic header <bionic_tls.h> |
Jeff Brown | baa44b8 | 2011-07-11 22:12:16 -0700 | [diff] [blame] | 116 | LOCAL_C_INCLUDES += bionic/libc/private |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 117 | |
| 118 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" |
| 119 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
| 120 | LOCAL_CFLAGS += -fvisibility=hidden |
| 121 | |
Dmitriy Ivanov | ae62e05 | 2015-05-13 15:05:07 -0700 | [diff] [blame] | 122 | # TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 123 | LOCAL_LDFLAGS_arm += -Wl,--hash-style,both |
| 124 | |
Jesse Hall | 5ea4c73 | 2013-02-08 16:13:50 -0800 | [diff] [blame] | 125 | # Symlink libGLESv3.so -> libGLESv2.so |
| 126 | # Platform modules should link against libGLESv2.so (-lGLESv2), but NDK apps |
| 127 | # will be linked against libGLESv3.so. |
Ying Wang | c3aed1e | 2014-07-23 11:33:24 -0700 | [diff] [blame] | 128 | # Note we defer the evaluation of the LOCAL_POST_INSTALL_CMD, |
| 129 | # so $(LOCAL_INSTALLED_MODULE) will be expanded to correct value, |
| 130 | # even for both 32-bit and 64-bit installed files in multilib build. |
| 131 | LOCAL_POST_INSTALL_CMD = \ |
| 132 | $(hide) ln -sf $(notdir $(LOCAL_INSTALLED_MODULE)) $(dir $(LOCAL_INSTALLED_MODULE))libGLESv3.so |
| 133 | |
| 134 | include $(BUILD_SHARED_LIBRARY) |
Jesse Hall | 5ea4c73 | 2013-02-08 16:13:50 -0800 | [diff] [blame] | 135 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 136 | ############################################################################### |
| 137 | # Build the ETC1 host static library |
| 138 | # |
| 139 | |
| 140 | include $(CLEAR_VARS) |
| 141 | |
| 142 | LOCAL_SRC_FILES:= \ |
| 143 | ETC1/etc1.cpp \ |
| 144 | # |
| 145 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 146 | LOCAL_MODULE:= libETC1 |
Dan Willemsen | 1cf2c1a | 2015-08-28 14:09:44 -0700 | [diff] [blame] | 147 | LOCAL_MODULE_HOST_OS := darwin linux windows |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 148 | |
| 149 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 150 | |
| 151 | ############################################################################### |
| 152 | # Build the ETC1 device library |
| 153 | # |
| 154 | |
| 155 | include $(CLEAR_VARS) |
| 156 | |
| 157 | LOCAL_SRC_FILES:= \ |
| 158 | ETC1/etc1.cpp \ |
| 159 | # |
| 160 | |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 161 | LOCAL_MODULE:= libETC1 |
| 162 | |
| 163 | include $(BUILD_SHARED_LIBRARY) |
David Li | 2f5a655 | 2011-03-01 16:08:10 -0800 | [diff] [blame] | 164 | |
| 165 | include $(call all-makefiles-under,$(LOCAL_PATH)) |