blob: c8041fc7f69edc83ea25a2a18431d3d718781c9d [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001LOCAL_PATH:= $(call my-dir)
2
Mathias Agopianb1a39d62009-05-27 20:38:06 -07003###############################################################################
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08004# Build META EGL library
5#
6
7include $(CLEAR_VARS)
8
Mathias Agopian24035332010-08-02 17:34:32 -07009LOCAL_SRC_FILES:= \
10 EGL/egl.cpp \
Jack Palevicha2dd6cf2010-10-26 15:21:24 -070011 EGL/trace.cpp \
Mathias Agopian24035332010-08-02 17:34:32 -070012 EGL/getProcAddress.cpp.arm \
13 EGL/hooks.cpp \
14 EGL/Loader.cpp \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080015#
16
Mathias Agopiande586972009-05-28 17:39:03 -070017LOCAL_SHARED_LIBRARIES += libcutils libutils
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080018LOCAL_LDLIBS := -lpthread -ldl
19LOCAL_MODULE:= libEGL
20
21# needed on sim build because of weird logging issues
22ifeq ($(TARGET_SIMULATOR),true)
23else
24 LOCAL_SHARED_LIBRARIES += libdl
Gary King9166f7b2009-09-29 12:54:07 -070025 # Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to
26 # select the appropriate TLS codepath
27 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
28 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
29 endif
Mathias Agopianacdebe32009-06-03 18:26:58 -070030 # we need to access the private Bionic header <bionic_tls.h>
31 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080032endif
33
Mathias Agopian076b1cc2009-04-10 14:24:30 -070034LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
35LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
Mathias Agopian48685c42009-05-08 15:23:38 -070036LOCAL_CFLAGS += -fvisibility=hidden
Jack Palevicha2dd6cf2010-10-26 15:21:24 -070037LOCAL_CFLAGS += -DEGL_TRACE=1
Mathias Agopian076b1cc2009-04-10 14:24:30 -070038
Mathias Agopiana69e0ed2009-08-24 21:47:13 -070039ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
40LOCAL_CFLAGS += -DADRENO130=1
41endif
42
Mathias Agopian673d2db2009-10-14 02:39:53 -070043ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
44 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
45endif
46
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080047include $(BUILD_SHARED_LIBRARY)
Mathias Agopiande586972009-05-28 17:39:03 -070048installed_libEGL := $(LOCAL_INSTALLED_MODULE)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080049
50
Mathias Agopiande586972009-05-28 17:39:03 -070051# OpenGL drivers config file
52ifneq ($(BOARD_EGL_CFG),)
53
54include $(CLEAR_VARS)
55LOCAL_MODULE := egl.cfg
56LOCAL_MODULE_TAGS := optional
57LOCAL_MODULE_CLASS := ETC
58LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
59LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG)
60include $(BUILD_PREBUILT)
61
62# make sure we depend on egl.cfg, so it gets installed
63$(installed_libEGL): | egl.cfg
64
65endif
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080066
Mathias Agopianb1a39d62009-05-27 20:38:06 -070067###############################################################################
68# Build the wrapper OpenGL ES 1.x library
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080069#
70
71include $(CLEAR_VARS)
72
Mathias Agopianb1a39d62009-05-27 20:38:06 -070073LOCAL_SRC_FILES:= \
74 GLES_CM/gl.cpp.arm \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080075#
76
Mathias Agopiand8fb7b52009-05-17 18:50:16 -070077LOCAL_SHARED_LIBRARIES += libcutils libEGL
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080078LOCAL_LDLIBS := -lpthread -ldl
79LOCAL_MODULE:= libGLESv1_CM
80
81# needed on sim build because of weird logging issues
82ifeq ($(TARGET_SIMULATOR),true)
83else
84 LOCAL_SHARED_LIBRARIES += libdl
Mathias Agopianacdebe32009-06-03 18:26:58 -070085 # we need to access the private Bionic header <bionic_tls.h>
Gary King9166f7b2009-09-29 12:54:07 -070086 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
87 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
88 endif
Mathias Agopianacdebe32009-06-03 18:26:58 -070089 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080090endif
91
Mathias Agopian076b1cc2009-04-10 14:24:30 -070092LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
93LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
Mathias Agopian48685c42009-05-08 15:23:38 -070094LOCAL_CFLAGS += -fvisibility=hidden
Mathias Agopian076b1cc2009-04-10 14:24:30 -070095
Mathias Agopian673d2db2009-10-14 02:39:53 -070096ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
97 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
98endif
99
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800100include $(BUILD_SHARED_LIBRARY)
Mathias Agopianb1a39d62009-05-27 20:38:06 -0700101
102
103###############################################################################
104# Build the wrapper OpenGL ES 2.x library
105#
106
107include $(CLEAR_VARS)
108
109LOCAL_SRC_FILES:= \
110 GLES2/gl2.cpp.arm \
111#
112
113LOCAL_SHARED_LIBRARIES += libcutils libEGL
114LOCAL_LDLIBS := -lpthread -ldl
115LOCAL_MODULE:= libGLESv2
116
117# needed on sim build because of weird logging issues
118ifeq ($(TARGET_SIMULATOR),true)
119else
120 LOCAL_SHARED_LIBRARIES += libdl
Mathias Agopianacdebe32009-06-03 18:26:58 -0700121 # we need to access the private Bionic header <bionic_tls.h>
Gary King9166f7b2009-09-29 12:54:07 -0700122 ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
123 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
124 endif
Mathias Agopianacdebe32009-06-03 18:26:58 -0700125 LOCAL_C_INCLUDES += bionic/libc/private
Mathias Agopianb1a39d62009-05-27 20:38:06 -0700126endif
127
128LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\"
129LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
130LOCAL_CFLAGS += -fvisibility=hidden
131
Mathias Agopian673d2db2009-10-14 02:39:53 -0700132ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
133 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
134endif
135
Mathias Agopianb1a39d62009-05-27 20:38:06 -0700136include $(BUILD_SHARED_LIBRARY)
Jack Palevich01cc5382009-12-28 19:31:43 +0800137
138###############################################################################
139# Build the ETC1 host static library
140#
141
142include $(CLEAR_VARS)
143
144LOCAL_SRC_FILES:= \
145 ETC1/etc1.cpp \
146#
147
148LOCAL_LDLIBS := -lpthread -ldl
149LOCAL_MODULE:= libETC1
150
151include $(BUILD_HOST_STATIC_LIBRARY)
152
153###############################################################################
154# Build the ETC1 device library
155#
156
157include $(CLEAR_VARS)
158
159LOCAL_SRC_FILES:= \
160 ETC1/etc1.cpp \
161#
162
163LOCAL_LDLIBS := -lpthread -ldl
164LOCAL_MODULE:= libETC1
165
166include $(BUILD_SHARED_LIBRARY)