1LOCAL_PATH:= $(call my-dir) 2 3############################################################################### 4# Build META EGL library 5# 6 7egl.cfg_config_module := 8# OpenGL drivers config file 9ifneq ($(BOARD_EGL_CFG),) 10 11include $(CLEAR_VARS) 12LOCAL_MODULE := egl.cfg 13LOCAL_MODULE_TAGS := optional 14LOCAL_MODULE_CLASS := ETC 15LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl 16LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG) 17include $(BUILD_PREBUILT) 18egl.cfg_config_module := $(LOCAL_MODULE) 19endif 20 21include $(CLEAR_VARS) 22 23LOCAL_SRC_FILES:= \ 24 EGL/egl_tls.cpp \ 25 EGL/egl_cache.cpp \ 26 EGL/egl_display.cpp \ 27 EGL/egl_object.cpp \ 28 EGL/egl.cpp \ 29 EGL/eglApi.cpp \ 30 EGL/trace.cpp \ 31 EGL/getProcAddress.cpp.arm \ 32 EGL/Loader.cpp \ 33# 34 35LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libGLES_trace 36LOCAL_MODULE:= libEGL 37LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL 38LOCAL_SHARED_LIBRARIES += libdl 39# we need to access the private Bionic header <bionic_tls.h> 40LOCAL_C_INCLUDES += bionic/libc/private 41 42LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" 43LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 44LOCAL_CFLAGS += -fvisibility=hidden 45LOCAL_CFLAGS += -DEGL_TRACE=1 46 47ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true) 48 LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION 49endif 50ifeq ($(TARGET_BOARD_PLATFORM), omap4) 51 LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1 52endif 53ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) 54 LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) 55endif 56 57ifneq ($(MAX_EGL_CACHE_KEY_SIZE),) 58 LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE) 59endif 60 61ifneq ($(MAX_EGL_CACHE_SIZE),) 62 LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) 63endif 64 65LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module) 66egl.cfg_config_module := 67 68include $(BUILD_SHARED_LIBRARY) 69 70############################################################################### 71# Build the wrapper OpenGL ES 1.x library 72# 73 74include $(CLEAR_VARS) 75 76LOCAL_SRC_FILES:= \ 77 GLES_CM/gl.cpp.arm \ 78# 79 80LOCAL_SHARED_LIBRARIES += libcutils liblog libEGL 81LOCAL_MODULE:= libGLESv1_CM 82 83LOCAL_SHARED_LIBRARIES += libdl 84# we need to access the private Bionic header <bionic_tls.h> 85LOCAL_C_INCLUDES += bionic/libc/private 86 87LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" 88LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 89LOCAL_CFLAGS += -fvisibility=hidden 90 91include $(BUILD_SHARED_LIBRARY) 92 93 94############################################################################### 95# Build the wrapper OpenGL ES 2.x library 96# 97 98include $(CLEAR_VARS) 99 100LOCAL_SRC_FILES:= \ 101 GLES2/gl2.cpp.arm \ 102# 103 104LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL 105LOCAL_MODULE:= libGLESv2 106 107LOCAL_SHARED_LIBRARIES += libdl 108# we need to access the private Bionic header <bionic_tls.h> 109LOCAL_C_INCLUDES += bionic/libc/private 110 111LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" 112LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 113LOCAL_CFLAGS += -fvisibility=hidden 114 115# Symlink libGLESv3.so -> libGLESv2.so 116# Platform modules should link against libGLESv2.so (-lGLESv2), but NDK apps 117# will be linked against libGLESv3.so. 118# Note we defer the evaluation of the LOCAL_POST_INSTALL_CMD, 119# so $(LOCAL_INSTALLED_MODULE) will be expanded to correct value, 120# even for both 32-bit and 64-bit installed files in multilib build. 121LOCAL_POST_INSTALL_CMD = \ 122 $(hide) ln -sf $(notdir $(LOCAL_INSTALLED_MODULE)) $(dir $(LOCAL_INSTALLED_MODULE))libGLESv3.so 123 124include $(BUILD_SHARED_LIBRARY) 125 126############################################################################### 127# Build the ETC1 host static library 128# 129 130include $(CLEAR_VARS) 131 132LOCAL_SRC_FILES:= \ 133 ETC1/etc1.cpp \ 134# 135 136LOCAL_MODULE:= libETC1 137 138include $(BUILD_HOST_STATIC_LIBRARY) 139 140############################################################################### 141# Build the ETC1 device library 142# 143 144include $(CLEAR_VARS) 145 146LOCAL_SRC_FILES:= \ 147 ETC1/etc1.cpp \ 148# 149 150LOCAL_MODULE:= libETC1 151 152include $(BUILD_SHARED_LIBRARY) 153 154include $(call all-makefiles-under,$(LOCAL_PATH)) 155