The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 3 | ############################################################################### |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4 | # Build META EGL library |
| 5 | # |
| 6 | |
| 7 | include $(CLEAR_VARS) |
| 8 | |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 9 | LOCAL_SRC_FILES:= \ |
| 10 | EGL/egl.cpp \ |
Jack Palevich | a2dd6cf | 2010-10-26 15:21:24 -0700 | [diff] [blame] | 11 | EGL/trace.cpp \ |
Mathias Agopian | 2403533 | 2010-08-02 17:34:32 -0700 | [diff] [blame] | 12 | EGL/getProcAddress.cpp.arm \ |
| 13 | EGL/hooks.cpp \ |
| 14 | EGL/Loader.cpp \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 15 | # |
| 16 | |
Mathias Agopian | de58697 | 2009-05-28 17:39:03 -0700 | [diff] [blame] | 17 | LOCAL_SHARED_LIBRARIES += libcutils libutils |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 18 | LOCAL_LDLIBS := -lpthread -ldl |
| 19 | LOCAL_MODULE:= libEGL |
| 20 | |
| 21 | # needed on sim build because of weird logging issues |
| 22 | ifeq ($(TARGET_SIMULATOR),true) |
| 23 | else |
| 24 | LOCAL_SHARED_LIBRARIES += libdl |
Gary King | 9166f7b | 2009-09-29 12:54:07 -0700 | [diff] [blame] | 25 | # 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 Agopian | acdebe3 | 2009-06-03 18:26:58 -0700 | [diff] [blame] | 30 | # we need to access the private Bionic header <bionic_tls.h> |
| 31 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | endif |
| 33 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 34 | LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" |
| 35 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 36 | LOCAL_CFLAGS += -fvisibility=hidden |
Jack Palevich | a2dd6cf | 2010-10-26 15:21:24 -0700 | [diff] [blame] | 37 | LOCAL_CFLAGS += -DEGL_TRACE=1 |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 38 | |
Mathias Agopian | a69e0ed | 2009-08-24 21:47:13 -0700 | [diff] [blame] | 39 | ifeq ($(TARGET_BOARD_PLATFORM),msm7k) |
| 40 | LOCAL_CFLAGS += -DADRENO130=1 |
| 41 | endif |
| 42 | |
Mathias Agopian | 673d2db | 2009-10-14 02:39:53 -0700 | [diff] [blame] | 43 | ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) |
| 44 | LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER |
| 45 | endif |
| 46 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | include $(BUILD_SHARED_LIBRARY) |
Mathias Agopian | de58697 | 2009-05-28 17:39:03 -0700 | [diff] [blame] | 48 | installed_libEGL := $(LOCAL_INSTALLED_MODULE) |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | |
| 50 | |
Mathias Agopian | de58697 | 2009-05-28 17:39:03 -0700 | [diff] [blame] | 51 | # OpenGL drivers config file |
| 52 | ifneq ($(BOARD_EGL_CFG),) |
| 53 | |
| 54 | include $(CLEAR_VARS) |
| 55 | LOCAL_MODULE := egl.cfg |
| 56 | LOCAL_MODULE_TAGS := optional |
| 57 | LOCAL_MODULE_CLASS := ETC |
| 58 | LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl |
| 59 | LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG) |
| 60 | include $(BUILD_PREBUILT) |
| 61 | |
| 62 | # make sure we depend on egl.cfg, so it gets installed |
| 63 | $(installed_libEGL): | egl.cfg |
| 64 | |
| 65 | endif |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 66 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 67 | ############################################################################### |
| 68 | # Build the wrapper OpenGL ES 1.x library |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 69 | # |
| 70 | |
| 71 | include $(CLEAR_VARS) |
| 72 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 73 | LOCAL_SRC_FILES:= \ |
| 74 | GLES_CM/gl.cpp.arm \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 75 | # |
| 76 | |
Mathias Agopian | d8fb7b5 | 2009-05-17 18:50:16 -0700 | [diff] [blame] | 77 | LOCAL_SHARED_LIBRARIES += libcutils libEGL |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 78 | LOCAL_LDLIBS := -lpthread -ldl |
| 79 | LOCAL_MODULE:= libGLESv1_CM |
| 80 | |
| 81 | # needed on sim build because of weird logging issues |
| 82 | ifeq ($(TARGET_SIMULATOR),true) |
| 83 | else |
| 84 | LOCAL_SHARED_LIBRARIES += libdl |
Mathias Agopian | acdebe3 | 2009-06-03 18:26:58 -0700 | [diff] [blame] | 85 | # we need to access the private Bionic header <bionic_tls.h> |
Gary King | 9166f7b | 2009-09-29 12:54:07 -0700 | [diff] [blame] | 86 | ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) |
| 87 | LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER |
| 88 | endif |
Mathias Agopian | acdebe3 | 2009-06-03 18:26:58 -0700 | [diff] [blame] | 89 | LOCAL_C_INCLUDES += bionic/libc/private |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 90 | endif |
| 91 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 92 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" |
| 93 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Mathias Agopian | 48685c4 | 2009-05-08 15:23:38 -0700 | [diff] [blame] | 94 | LOCAL_CFLAGS += -fvisibility=hidden |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 95 | |
Mathias Agopian | 673d2db | 2009-10-14 02:39:53 -0700 | [diff] [blame] | 96 | ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) |
| 97 | LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER |
| 98 | endif |
| 99 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 100 | include $(BUILD_SHARED_LIBRARY) |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 101 | |
| 102 | |
| 103 | ############################################################################### |
| 104 | # Build the wrapper OpenGL ES 2.x library |
| 105 | # |
| 106 | |
| 107 | include $(CLEAR_VARS) |
| 108 | |
| 109 | LOCAL_SRC_FILES:= \ |
| 110 | GLES2/gl2.cpp.arm \ |
| 111 | # |
| 112 | |
| 113 | LOCAL_SHARED_LIBRARIES += libcutils libEGL |
| 114 | LOCAL_LDLIBS := -lpthread -ldl |
| 115 | LOCAL_MODULE:= libGLESv2 |
| 116 | |
| 117 | # needed on sim build because of weird logging issues |
| 118 | ifeq ($(TARGET_SIMULATOR),true) |
| 119 | else |
| 120 | LOCAL_SHARED_LIBRARIES += libdl |
Mathias Agopian | acdebe3 | 2009-06-03 18:26:58 -0700 | [diff] [blame] | 121 | # we need to access the private Bionic header <bionic_tls.h> |
Gary King | 9166f7b | 2009-09-29 12:54:07 -0700 | [diff] [blame] | 122 | ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) |
| 123 | LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER |
| 124 | endif |
Mathias Agopian | acdebe3 | 2009-06-03 18:26:58 -0700 | [diff] [blame] | 125 | LOCAL_C_INCLUDES += bionic/libc/private |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 126 | endif |
| 127 | |
| 128 | LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" |
| 129 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
| 130 | LOCAL_CFLAGS += -fvisibility=hidden |
| 131 | |
Mathias Agopian | 673d2db | 2009-10-14 02:39:53 -0700 | [diff] [blame] | 132 | ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) |
| 133 | LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER |
| 134 | endif |
| 135 | |
Mathias Agopian | b1a39d6 | 2009-05-27 20:38:06 -0700 | [diff] [blame] | 136 | include $(BUILD_SHARED_LIBRARY) |
Jack Palevich | 01cc538 | 2009-12-28 19:31:43 +0800 | [diff] [blame] | 137 | |
| 138 | ############################################################################### |
| 139 | # Build the ETC1 host static library |
| 140 | # |
| 141 | |
| 142 | include $(CLEAR_VARS) |
| 143 | |
| 144 | LOCAL_SRC_FILES:= \ |
| 145 | ETC1/etc1.cpp \ |
| 146 | # |
| 147 | |
| 148 | LOCAL_LDLIBS := -lpthread -ldl |
| 149 | LOCAL_MODULE:= libETC1 |
| 150 | |
| 151 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 152 | |
| 153 | ############################################################################### |
| 154 | # Build the ETC1 device library |
| 155 | # |
| 156 | |
| 157 | include $(CLEAR_VARS) |
| 158 | |
| 159 | LOCAL_SRC_FILES:= \ |
| 160 | ETC1/etc1.cpp \ |
| 161 | # |
| 162 | |
| 163 | LOCAL_LDLIBS := -lpthread -ldl |
| 164 | LOCAL_MODULE:= libETC1 |
| 165 | |
| 166 | include $(BUILD_SHARED_LIBRARY) |