2009-03-04 03:31:44 +00:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
2009-05-28 03:38:06 +00:00
|
|
|
###############################################################################
|
2009-03-04 03:31:44 +00:00
|
|
|
# Build META EGL library
|
|
|
|
#
|
|
|
|
|
2012-12-04 20:04:44 +00:00
|
|
|
egl.cfg_config_module :=
|
|
|
|
# OpenGL drivers config file
|
|
|
|
ifneq ($(BOARD_EGL_CFG),)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := egl.cfg
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
|
|
|
|
LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG)
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
egl.cfg_config_module := $(LOCAL_MODULE)
|
|
|
|
endif
|
|
|
|
|
2009-03-04 03:31:44 +00:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2010-08-03 00:34:32 +00:00
|
|
|
LOCAL_SRC_FILES:= \
|
2011-05-13 23:21:08 +00:00
|
|
|
EGL/egl_tls.cpp \
|
2011-11-04 00:42:43 +00:00
|
|
|
EGL/egl_cache.cpp \
|
2011-05-13 23:21:08 +00:00
|
|
|
EGL/egl_display.cpp \
|
|
|
|
EGL/egl_object.cpp \
|
2010-08-03 00:34:32 +00:00
|
|
|
EGL/egl.cpp \
|
2011-05-13 23:21:08 +00:00
|
|
|
EGL/eglApi.cpp \
|
2010-10-26 22:21:24 +00:00
|
|
|
EGL/trace.cpp \
|
2010-08-03 00:34:32 +00:00
|
|
|
EGL/getProcAddress.cpp.arm \
|
|
|
|
EGL/Loader.cpp \
|
2009-03-04 03:31:44 +00:00
|
|
|
#
|
2011-03-28 17:39:28 +00:00
|
|
|
|
2013-04-10 04:55:39 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libGLES_trace
|
2009-03-04 03:31:44 +00:00
|
|
|
LOCAL_LDLIBS := -lpthread -ldl
|
|
|
|
LOCAL_MODULE:= libEGL
|
2011-03-05 01:50:48 +00:00
|
|
|
LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL
|
2011-07-12 05:12:16 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libdl
|
|
|
|
# we need to access the private Bionic header <bionic_tls.h>
|
|
|
|
LOCAL_C_INCLUDES += bionic/libc/private
|
2009-03-04 03:31:44 +00:00
|
|
|
|
2009-04-10 21:24:30 +00:00
|
|
|
LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
|
|
|
|
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
|
2009-05-08 22:23:38 +00:00
|
|
|
LOCAL_CFLAGS += -fvisibility=hidden
|
2010-10-26 22:21:24 +00:00
|
|
|
LOCAL_CFLAGS += -DEGL_TRACE=1
|
2009-04-10 21:24:30 +00:00
|
|
|
|
2012-05-04 21:52:40 +00:00
|
|
|
ifeq ($(BOARD_ALLOW_EGL_HIBERNATION),true)
|
|
|
|
LOCAL_CFLAGS += -DBOARD_ALLOW_EGL_HIBERNATION
|
|
|
|
endif
|
2014-02-28 22:30:39 +00:00
|
|
|
ifneq ($(filter omap3 omap4,$(TARGET_BOARD_PLATFORM)),)
|
2013-08-28 22:22:29 +00:00
|
|
|
LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1
|
2009-08-25 04:47:13 +00:00
|
|
|
endif
|
2011-11-20 00:25:24 +00:00
|
|
|
ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
|
|
|
|
LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
|
|
|
|
endif
|
|
|
|
|
2012-09-12 18:55:16 +00:00
|
|
|
ifneq ($(MAX_EGL_CACHE_KEY_SIZE),)
|
|
|
|
LOCAL_CFLAGS += -DMAX_EGL_CACHE_KEY_SIZE=$(MAX_EGL_CACHE_KEY_SIZE)
|
|
|
|
endif
|
|
|
|
|
2011-11-20 00:25:24 +00:00
|
|
|
ifneq ($(MAX_EGL_CACHE_SIZE),)
|
|
|
|
LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
|
|
|
|
endif
|
|
|
|
|
2012-12-04 20:04:44 +00:00
|
|
|
LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module)
|
|
|
|
egl.cfg_config_module :=
|
2009-03-04 03:31:44 +00:00
|
|
|
|
2012-12-04 20:04:44 +00:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2009-03-04 03:31:44 +00:00
|
|
|
|
2009-05-28 03:38:06 +00:00
|
|
|
###############################################################################
|
|
|
|
# Build the wrapper OpenGL ES 1.x library
|
2009-03-04 03:31:44 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2009-05-28 03:38:06 +00:00
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
GLES_CM/gl.cpp.arm \
|
2009-03-04 03:31:44 +00:00
|
|
|
#
|
|
|
|
|
2013-04-10 04:55:39 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libcutils liblog libEGL
|
2009-03-04 03:31:44 +00:00
|
|
|
LOCAL_LDLIBS := -lpthread -ldl
|
|
|
|
LOCAL_MODULE:= libGLESv1_CM
|
|
|
|
|
2011-07-12 05:12:16 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libdl
|
|
|
|
# we need to access the private Bionic header <bionic_tls.h>
|
|
|
|
LOCAL_C_INCLUDES += bionic/libc/private
|
2009-03-04 03:31:44 +00:00
|
|
|
|
2009-04-10 21:24:30 +00:00
|
|
|
LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
|
|
|
|
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
|
2009-05-08 22:23:38 +00:00
|
|
|
LOCAL_CFLAGS += -fvisibility=hidden
|
2009-04-10 21:24:30 +00:00
|
|
|
|
2009-03-04 03:31:44 +00:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2009-05-28 03:38:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Build the wrapper OpenGL ES 2.x library
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
GLES2/gl2.cpp.arm \
|
|
|
|
#
|
|
|
|
|
2013-04-10 04:55:39 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL
|
2009-05-28 03:38:06 +00:00
|
|
|
LOCAL_LDLIBS := -lpthread -ldl
|
|
|
|
LOCAL_MODULE:= libGLESv2
|
|
|
|
|
2011-07-12 05:12:16 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES += libdl
|
|
|
|
# we need to access the private Bionic header <bionic_tls.h>
|
|
|
|
LOCAL_C_INCLUDES += bionic/libc/private
|
2009-05-28 03:38:06 +00:00
|
|
|
|
|
|
|
LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\"
|
|
|
|
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
|
|
|
|
LOCAL_CFLAGS += -fvisibility=hidden
|
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2009-12-28 11:31:43 +00:00
|
|
|
|
2013-02-09 00:13:50 +00:00
|
|
|
# Symlink libGLESv3.so -> libGLESv2.so
|
|
|
|
# Platform modules should link against libGLESv2.so (-lGLESv2), but NDK apps
|
|
|
|
# will be linked against libGLESv3.so.
|
|
|
|
LIBGLESV2 := $(LOCAL_INSTALLED_MODULE)
|
|
|
|
LIBGLESV3 := $(subst libGLESv2,libGLESv3,$(LIBGLESV2))
|
|
|
|
$(LIBGLESV3): $(LIBGLESV2)
|
|
|
|
@echo "Symlink: $@ -> $(notdir $<)"
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(hide) ln -sf $(notdir $<) $@
|
|
|
|
ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
|
|
|
|
$(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LIBGLESV3)
|
|
|
|
LIBGLESV2 :=
|
|
|
|
LIBGLESV3 :=
|
|
|
|
|
2009-12-28 11:31:43 +00:00
|
|
|
###############################################################################
|
|
|
|
# Build the ETC1 host static library
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
ETC1/etc1.cpp \
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCAL_LDLIBS := -lpthread -ldl
|
|
|
|
LOCAL_MODULE:= libETC1
|
|
|
|
|
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Build the ETC1 device library
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
ETC1/etc1.cpp \
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCAL_LDLIBS := -lpthread -ldl
|
|
|
|
LOCAL_MODULE:= libETC1
|
|
|
|
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2011-03-02 00:08:10 +00:00
|
|
|
|
|
|
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|