blob: 8abd6499689ba3ec33053c23be6e3aae1c427792 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001LOCAL_PATH:= $(call my-dir)
2
3#
4# Build the software OpenGL ES library
5#
6
7include $(CLEAR_VARS)
8
Mathias Agopian1473f462009-04-10 14:24:30 -07009# Set to 1 to use gralloc and copybits
10LIBAGL_USE_GRALLOC_COPYBITS := 1
11
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080012LOCAL_SRC_FILES:= \
13 egl.cpp \
14 state.cpp \
15 texture.cpp \
16 Tokenizer.cpp \
17 TokenManager.cpp \
18 TextureObjectManager.cpp \
19 BufferObjectManager.cpp \
20 array.cpp.arm \
21 fp.cpp.arm \
22 light.cpp.arm \
23 matrix.cpp.arm \
24 mipmap.cpp.arm \
25 primitives.cpp.arm \
26 vertex.cpp.arm
27
Mathias Agopian9042b452009-10-26 20:12:37 -070028LOCAL_CFLAGS += -DLOG_TAG=\"libagl\"
29LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
30LOCAL_CFLAGS += -fvisibility=hidden
31
Mathias Agopiand1f73a22010-02-01 18:24:52 -080032LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger libETC1
Mathias Agopian9042b452009-10-26 20:12:37 -070033LOCAL_LDLIBS := -lpthread -ldl
34
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035ifeq ($(TARGET_ARCH),arm)
36 LOCAL_SRC_FILES += fixed_asm.S iterators.S
37 LOCAL_CFLAGS += -fstrict-aliasing
38endif
39
Magnus Landqvistf123ec82010-02-19 12:06:59 +010040ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
41 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
42endif
43
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044ifneq ($(TARGET_SIMULATOR),true)
45 # we need to access the private Bionic header <bionic_tls.h>
Gary King01f8c062009-09-29 12:54:07 -070046 # on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
47 # behavior from the bionic Android.mk file
48 ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
49 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
50 endif
Mathias Agopianb4b4c112009-06-03 18:26:58 -070051 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052endif
53
Mathias Agopian1473f462009-04-10 14:24:30 -070054ifeq ($(LIBAGL_USE_GRALLOC_COPYBITS),1)
Mathias Agopianb4b4c112009-06-03 18:26:58 -070055 LOCAL_CFLAGS += -DLIBAGL_USE_GRALLOC_COPYBITS
Mathias Agopian1473f462009-04-10 14:24:30 -070056 LOCAL_SRC_FILES += copybit.cpp
Mathias Agopian9042b452009-10-26 20:12:37 -070057 LOCAL_SHARED_LIBRARIES += libui
Mathias Agopian1473f462009-04-10 14:24:30 -070058endif
59
Mathias Agopian9d17c052009-05-28 17:39:03 -070060
61LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
62LOCAL_MODULE:= libGLES_android
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063
64include $(BUILD_SHARED_LIBRARY)