blob: ae924cd6e5ba7f1b578e8c03f7308ae145460192 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001LOCAL_PATH:= $(call my-dir)
2
Mathias Agopian2820bd42009-05-27 20:38:06 -07003###############################################################################
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004# Build META EGL library
5#
6
7include $(CLEAR_VARS)
8
Mathias Agopian3944eab2010-08-02 17:34:32 -07009LOCAL_SRC_FILES:= \
10 EGL/egl.cpp \
11 EGL/getProcAddress.cpp.arm \
12 EGL/hooks.cpp \
13 EGL/Loader.cpp \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080014#
15
Mathias Agopian9d17c052009-05-28 17:39:03 -070016LOCAL_SHARED_LIBRARIES += libcutils libutils
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080017LOCAL_LDLIBS := -lpthread -ldl
18LOCAL_MODULE:= libEGL
19
20# needed on sim build because of weird logging issues
21ifeq ($(TARGET_SIMULATOR),true)
22else
23 LOCAL_SHARED_LIBRARIES += libdl
Gary King01f8c062009-09-29 12:54:07 -070024 # Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to
25 # select the appropriate TLS codepath
26 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
27 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
28 endif
Mathias Agopianb4b4c112009-06-03 18:26:58 -070029 # we need to access the private Bionic header <bionic_tls.h>
30 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031endif
32
Mathias Agopian1473f462009-04-10 14:24:30 -070033LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
34LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
Mathias Agopiancb29e622009-05-08 15:23:38 -070035LOCAL_CFLAGS += -fvisibility=hidden
Mathias Agopian1473f462009-04-10 14:24:30 -070036
Mathias Agopian94263d72009-08-24 21:47:13 -070037ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
38LOCAL_CFLAGS += -DADRENO130=1
39endif
40
Mathias Agopianb34d5d52009-10-14 02:39:53 -070041ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
42 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
43endif
44
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045include $(BUILD_SHARED_LIBRARY)
Mathias Agopian9d17c052009-05-28 17:39:03 -070046installed_libEGL := $(LOCAL_INSTALLED_MODULE)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080047
48
Mathias Agopian9d17c052009-05-28 17:39:03 -070049# OpenGL drivers config file
50ifneq ($(BOARD_EGL_CFG),)
51
52include $(CLEAR_VARS)
53LOCAL_MODULE := egl.cfg
54LOCAL_MODULE_TAGS := optional
55LOCAL_MODULE_CLASS := ETC
56LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
57LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG)
58include $(BUILD_PREBUILT)
59
60# make sure we depend on egl.cfg, so it gets installed
61$(installed_libEGL): | egl.cfg
62
63endif
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064
Mathias Agopian2820bd42009-05-27 20:38:06 -070065###############################################################################
66# Build the wrapper OpenGL ES 1.x library
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067#
68
69include $(CLEAR_VARS)
70
Mathias Agopian2820bd42009-05-27 20:38:06 -070071LOCAL_SRC_FILES:= \
72 GLES_CM/gl.cpp.arm \
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080073#
74
Mathias Agopian11be99d2009-05-17 18:50:16 -070075LOCAL_SHARED_LIBRARIES += libcutils libEGL
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080076LOCAL_LDLIBS := -lpthread -ldl
77LOCAL_MODULE:= libGLESv1_CM
78
79# needed on sim build because of weird logging issues
80ifeq ($(TARGET_SIMULATOR),true)
81else
82 LOCAL_SHARED_LIBRARIES += libdl
Mathias Agopianb4b4c112009-06-03 18:26:58 -070083 # we need to access the private Bionic header <bionic_tls.h>
Gary King01f8c062009-09-29 12:54:07 -070084 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
85 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
86 endif
Mathias Agopianb4b4c112009-06-03 18:26:58 -070087 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080088endif
89
Mathias Agopian1473f462009-04-10 14:24:30 -070090LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
91LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
Mathias Agopiancb29e622009-05-08 15:23:38 -070092LOCAL_CFLAGS += -fvisibility=hidden
Mathias Agopian1473f462009-04-10 14:24:30 -070093
Mathias Agopianb34d5d52009-10-14 02:39:53 -070094ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
95 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
96endif
97
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080098include $(BUILD_SHARED_LIBRARY)
Mathias Agopian2820bd42009-05-27 20:38:06 -070099
100
101###############################################################################
102# Build the wrapper OpenGL ES 2.x library
103#
104
105include $(CLEAR_VARS)
106
107LOCAL_SRC_FILES:= \
108 GLES2/gl2.cpp.arm \
109#
110
111LOCAL_SHARED_LIBRARIES += libcutils libEGL
112LOCAL_LDLIBS := -lpthread -ldl
113LOCAL_MODULE:= libGLESv2
114
115# needed on sim build because of weird logging issues
116ifeq ($(TARGET_SIMULATOR),true)
117else
118 LOCAL_SHARED_LIBRARIES += libdl
Mathias Agopianb4b4c112009-06-03 18:26:58 -0700119 # we need to access the private Bionic header <bionic_tls.h>
Gary King01f8c062009-09-29 12:54:07 -0700120 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
121 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
122 endif
Mathias Agopianb4b4c112009-06-03 18:26:58 -0700123 LOCAL_C_INCLUDES += bionic/libc/private
Mathias Agopian2820bd42009-05-27 20:38:06 -0700124endif
125
126LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\"
127LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
128LOCAL_CFLAGS += -fvisibility=hidden
129
Mathias Agopianb34d5d52009-10-14 02:39:53 -0700130ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
131 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
132endif
133
Mathias Agopian2820bd42009-05-27 20:38:06 -0700134include $(BUILD_SHARED_LIBRARY)
Jack Palevicha6276fd2009-12-28 19:31:43 +0800135
136###############################################################################
137# Build the ETC1 host static library
138#
139
140include $(CLEAR_VARS)
141
142LOCAL_SRC_FILES:= \
143 ETC1/etc1.cpp \
144#
145
146LOCAL_LDLIBS := -lpthread -ldl
147LOCAL_MODULE:= libETC1
148
149include $(BUILD_HOST_STATIC_LIBRARY)
150
151###############################################################################
152# Build the ETC1 device library
153#
154
155include $(CLEAR_VARS)
156
157LOCAL_SRC_FILES:= \
158 ETC1/etc1.cpp \
159#
160
161LOCAL_LDLIBS := -lpthread -ldl
162LOCAL_MODULE:= libETC1
163
164include $(BUILD_SHARED_LIBRARY)