blob: c2e9f312e55a58e4f9957f9fb02fecd99fb5542e [file] [log] [blame]
The Android Open Source Projectedbf3b62009-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 Agopian076b1cc2009-04-10 14:24:30 -07009# Set to 1 to use gralloc and copybits
10LIBAGL_USE_GRALLOC_COPYBITS := 1
11
The Android Open Source Projectedbf3b62009-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 Agopian54ba51d2009-10-26 20:12:37 -070028LOCAL_CFLAGS += -DLOG_TAG=\"libagl\"
29LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
30LOCAL_CFLAGS += -fvisibility=hidden
31
32LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger
33LOCAL_LDLIBS := -lpthread -ldl
34
The Android Open Source Projectedbf3b62009-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
40ifneq ($(TARGET_SIMULATOR),true)
41 # we need to access the private Bionic header <bionic_tls.h>
Gary King9166f7b2009-09-29 12:54:07 -070042 # on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
43 # behavior from the bionic Android.mk file
44 ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
45 LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
46 endif
Mathias Agopianacdebe32009-06-03 18:26:58 -070047 LOCAL_C_INCLUDES += bionic/libc/private
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080048endif
49
Mathias Agopian076b1cc2009-04-10 14:24:30 -070050ifeq ($(LIBAGL_USE_GRALLOC_COPYBITS),1)
Mathias Agopianacdebe32009-06-03 18:26:58 -070051 LOCAL_CFLAGS += -DLIBAGL_USE_GRALLOC_COPYBITS
Mathias Agopian076b1cc2009-04-10 14:24:30 -070052 LOCAL_SRC_FILES += copybit.cpp
Mathias Agopian54ba51d2009-10-26 20:12:37 -070053 LOCAL_SHARED_LIBRARIES += libui
Mathias Agopian076b1cc2009-04-10 14:24:30 -070054endif
55
Mathias Agopiande586972009-05-28 17:39:03 -070056
57LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
58LOCAL_MODULE:= libGLES_android
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080059
60include $(BUILD_SHARED_LIBRARY)