1 LOCAL_PATH:= $(call my-dir) 2 3 ############################################################################### 4 # Build META EGL library 5 # 6 7 include $(CLEAR_VARS) 8 9 LOCAL_SRC_FILES:= \ 10 EGL/egl_tls.cpp \ 11 EGL/egl_cache.cpp \ 12 EGL/egl_display.cpp \ 13 EGL/egl_object.cpp \ 14 EGL/egl.cpp \ 15 EGL/eglApi.cpp \ 16 EGL/trace.cpp \ 17 EGL/getProcAddress.cpp.arm \ 18 EGL/Loader.cpp \ 19 # 20 21 LOCAL_SHARED_LIBRARIES += libcutils libutils libGLES_trace 22 LOCAL_LDLIBS := -lpthread -ldl 23 LOCAL_MODULE:= libEGL 24 LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL 25 LOCAL_SHARED_LIBRARIES += libdl 26 # Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to 27 # select the appropriate TLS codepath 28 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 29 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 30 endif 31 # we need to access the private Bionic header <bionic_tls.h> 32 LOCAL_C_INCLUDES += bionic/libc/private 33 34 LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" 35 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 36 LOCAL_CFLAGS += -fvisibility=hidden 37 LOCAL_CFLAGS += -DEGL_TRACE=1 38 39 ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) 40 LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION 41 endif 42 43 ifeq ($(TARGET_BOARD_PLATFORM),msm7k) 44 LOCAL_CFLAGS += -DADRENO130=1 45 endif 46 47 ifeq ($(TARGET_BOARD_PLATFORM), s5pc110) 48 # see Loader.cpp for details 49 LOCAL_CFLAGS += -DSYSTEMUI_PBSIZE_HACK=1 50 endif 51 52 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 53 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 54 endif 55 56 ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) 57 LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) 58 endif 59 60 ifneq ($(MAX_EGL_CACHE_KEY_SIZE),) 61 LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE) 62 endif 63 64 ifneq ($(MAX_EGL_CACHE_SIZE),) 65 LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) 66 endif 67 68 include $(BUILD_SHARED_LIBRARY) 69 installed_libEGL := $(LOCAL_INSTALLED_MODULE) 70 71 # OpenGL drivers config file 72 ifneq ($(BOARD_EGL_CFG),) 73 74 include $(CLEAR_VARS) 75 LOCAL_MODULE := egl.cfg 76 LOCAL_MODULE_TAGS := optional 77 LOCAL_MODULE_CLASS := ETC 78 LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl 79 LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG) 80 include $(BUILD_PREBUILT) 81 82 # make sure we depend on egl.cfg, so it gets installed 83 $(installed_libEGL): | egl.cfg 84 85 endif 86 87 ############################################################################### 88 # Build the wrapper OpenGL ES 1.x library 89 # 90 91 include $(CLEAR_VARS) 92 93 LOCAL_SRC_FILES:= \ 94 GLES_CM/gl.cpp.arm \ 95 # 96 97 LOCAL_SHARED_LIBRARIES += libcutils libEGL 98 LOCAL_LDLIBS := -lpthread -ldl 99 LOCAL_MODULE:= libGLESv1_CM 100 101 LOCAL_SHARED_LIBRARIES += libdl 102 # we need to access the private Bionic header <bionic_tls.h> 103 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 104 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 105 endif 106 LOCAL_C_INCLUDES += bionic/libc/private 107 108 LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" 109 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 110 LOCAL_CFLAGS += -fvisibility=hidden 111 112 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 113 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 114 endif 115 116 include $(BUILD_SHARED_LIBRARY) 117 118 119 ############################################################################### 120 # Build the wrapper OpenGL ES 2.x library 121 # 122 123 include $(CLEAR_VARS) 124 125 LOCAL_SRC_FILES:= \ 126 GLES2/gl2.cpp.arm \ 127 # 128 129 LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL 130 LOCAL_LDLIBS := -lpthread -ldl 131 LOCAL_MODULE:= libGLESv2 132 133 LOCAL_SHARED_LIBRARIES += libdl 134 # we need to access the private Bionic header <bionic_tls.h> 135 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 136 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 137 endif 138 LOCAL_C_INCLUDES += bionic/libc/private 139 140 LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" 141 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 142 LOCAL_CFLAGS += -fvisibility=hidden 143 144 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) 145 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER 146 endif 147 148 include $(BUILD_SHARED_LIBRARY) 149 150 ############################################################################### 151 # Build the ETC1 host static library 152 # 153 154 include $(CLEAR_VARS) 155 156 LOCAL_SRC_FILES:= \ 157 ETC1/etc1.cpp \ 158 # 159 160 LOCAL_LDLIBS := -lpthread -ldl 161 LOCAL_MODULE:= libETC1 162 163 include $(BUILD_HOST_STATIC_LIBRARY) 164 165 ############################################################################### 166 # Build the ETC1 device library 167 # 168 169 include $(CLEAR_VARS) 170 171 LOCAL_SRC_FILES:= \ 172 ETC1/etc1.cpp \ 173 # 174 175 LOCAL_LDLIBS := -lpthread -ldl 176 LOCAL_MODULE:= libETC1 177 178 include $(BUILD_SHARED_LIBRARY) 179 180 include $(call all-makefiles-under,$(LOCAL_PATH)) 181