Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 1 | // Build the ETC1 library |
| 2 | cc_library { |
| 3 | name: "libETC1", |
| 4 | srcs: ["ETC1/etc1.cpp"], |
| 5 | host_supported: true, |
Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame^] | 6 | cflags: ["-Wall", "-Werror"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 7 | |
| 8 | target: { |
| 9 | android: { |
| 10 | static: { |
| 11 | enabled: false, |
| 12 | }, |
| 13 | }, |
| 14 | host: { |
| 15 | shared: { |
| 16 | enabled: false, |
| 17 | }, |
| 18 | }, |
| 19 | windows: { |
| 20 | enabled: true, |
| 21 | }, |
| 22 | }, |
| 23 | } |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 24 | |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 25 | // The headers modules are in frameworks/native/opengl/Android.bp. |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 26 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 27 | name: "libEGL", |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 28 | symbol_file: "libEGL.map.txt", |
| 29 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 30 | unversioned_until: "current", |
Dan Albert | 49fbff4 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 31 | } |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 32 | |
| 33 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 34 | name: "libGLESv1_CM", |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 35 | symbol_file: "libGLESv1_CM.map.txt", |
| 36 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 37 | unversioned_until: "current", |
Dan Albert | 7facb1d | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 38 | } |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 39 | |
| 40 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 41 | name: "libGLESv2", |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 42 | symbol_file: "libGLESv2.map.txt", |
| 43 | first_version: "9", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 44 | unversioned_until: "current", |
Dan Albert | 00500c7 | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 45 | } |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 46 | |
| 47 | ndk_library { |
Dan Willemsen | 219db6c | 2017-04-07 15:48:39 -0700 | [diff] [blame] | 48 | name: "libGLESv3", |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 49 | symbol_file: "libGLESv3.map.txt", |
| 50 | first_version: "18", |
Dan Albert | b9c62a6 | 2017-01-05 15:58:50 -0800 | [diff] [blame] | 51 | unversioned_until: "current", |
Dan Albert | d7d8efa | 2016-10-03 12:36:00 -0700 | [diff] [blame] | 52 | } |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 53 | |
| 54 | cc_defaults { |
| 55 | name: "gl_libs_defaults", |
| 56 | cflags: [ |
| 57 | "-DGL_GLEXT_PROTOTYPES", |
| 58 | "-DEGL_EGLEXT_PROTOTYPES", |
| 59 | "-fvisibility=hidden", |
Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame^] | 60 | "-Wall", |
| 61 | "-Werror", |
| 62 | "-Wno-unused-variable", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 63 | ], |
| 64 | shared_libs: [ |
Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 65 | // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** |
| 66 | // In particular, DO NOT add libutils or anything "above" libcutils |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 67 | "libcutils", |
| 68 | "liblog", |
| 69 | "libdl", |
| 70 | ], |
Jiyong Park | 5309d7d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 71 | static_libs: [ |
| 72 | "libarect", |
| 73 | ], |
| 74 | header_libs: [ |
| 75 | "gl_headers", |
| 76 | "libsystem_headers", |
| 77 | "libhardware_headers", |
| 78 | ], |
| 79 | export_header_lib_headers: ["gl_headers"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 80 | |
| 81 | // we need to access the private Bionic header <bionic_tls.h> |
| 82 | include_dirs: ["bionic/libc/private"], |
| 83 | } |
| 84 | |
| 85 | //############################################################################## |
| 86 | // Build META EGL library |
| 87 | // |
| 88 | cc_defaults { |
| 89 | name: "egl_libs_defaults", |
| 90 | defaults: ["gl_libs_defaults"], |
| 91 | cflags: [ |
| 92 | "-DLOG_TAG=\"libEGL\"", |
Chih-Hung Hsieh | c60a0f0 | 2017-10-05 14:25:18 -0700 | [diff] [blame^] | 93 | "-Wall", |
| 94 | "-Werror", |
| 95 | "-Wno-error=deprecated-register", |
| 96 | "-Wno-error=unknown-attributes", |
| 97 | "-Wno-unused-variable", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 98 | ], |
| 99 | shared_libs: [ |
Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 100 | // ***** DO NOT ADD NEW DEPENDENCIES HERE ***** |
| 101 | // In particular, DO NOT add libutils nor anything "above" libui |
Jiyong Park | a3f8840 | 2017-05-08 13:00:02 +0900 | [diff] [blame] | 102 | "libgraphicsenv", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 103 | "libnativewindow", |
Mathias Agopian | 5f1af04 | 2017-03-09 18:50:05 -0800 | [diff] [blame] | 104 | "libbacktrace", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 105 | ], |
Jiyong Park | 5309d7d | 2017-06-21 12:26:51 +0900 | [diff] [blame] | 106 | target: { |
| 107 | vendor: { |
| 108 | exclude_shared_libs: ["libgraphicsenv"], |
| 109 | }, |
| 110 | }, |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | cc_library_static { |
| 114 | name: "libEGL_getProcAddress", |
| 115 | defaults: ["egl_libs_defaults"], |
| 116 | srcs: ["EGL/getProcAddress.cpp"], |
| 117 | arch: { |
| 118 | arm: { |
| 119 | instruction_set: "arm", |
| 120 | }, |
| 121 | }, |
| 122 | } |
| 123 | |
| 124 | cc_library_shared { |
| 125 | name: "libEGL", |
| 126 | defaults: ["egl_libs_defaults"], |
| 127 | srcs: [ |
| 128 | "EGL/egl_tls.cpp", |
| 129 | "EGL/egl_cache.cpp", |
| 130 | "EGL/egl_display.cpp", |
| 131 | "EGL/egl_object.cpp", |
| 132 | "EGL/egl.cpp", |
| 133 | "EGL/eglApi.cpp", |
| 134 | "EGL/Loader.cpp", |
Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 135 | "EGL/BlobCache.cpp", |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 136 | ], |
Justin Yun | ea40401 | 2017-05-22 15:13:40 +0900 | [diff] [blame] | 137 | shared_libs: ["libvndksupport"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 138 | static_libs: ["libEGL_getProcAddress"], |
| 139 | ldflags: ["-Wl,--exclude-libs=ALL"], |
Mathias Agopian | b7f9a24 | 2017-03-08 22:29:31 -0800 | [diff] [blame] | 140 | export_include_dirs: ["EGL/include"], |
| 141 | } |
| 142 | |
| 143 | cc_test { |
| 144 | name: "libEGL_test", |
| 145 | defaults: ["egl_libs_defaults"], |
| 146 | srcs: [ |
| 147 | "EGL/BlobCache.cpp", |
| 148 | "EGL/BlobCache_test.cpp", |
| 149 | ], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | cc_defaults { |
| 153 | name: "gles_libs_defaults", |
| 154 | defaults: ["gl_libs_defaults"], |
| 155 | arch: { |
| 156 | arm: { |
| 157 | instruction_set: "arm", |
| 158 | |
| 159 | // TODO: This is to work around b/20093774. Remove after root cause is fixed |
| 160 | ldflags: ["-Wl,--hash-style,both"], |
| 161 | }, |
| 162 | }, |
| 163 | shared_libs: ["libEGL"], |
| 164 | } |
| 165 | |
| 166 | //############################################################################## |
| 167 | // Build the wrapper OpenGL ES 1.x library |
| 168 | // |
| 169 | cc_library_shared { |
| 170 | name: "libGLESv1_CM", |
| 171 | defaults: ["gles_libs_defaults"], |
| 172 | srcs: ["GLES_CM/gl.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 173 | cflags: ["-DLOG_TAG=\"libGLESv1\""], |
| 174 | } |
| 175 | |
| 176 | //############################################################################## |
| 177 | // Build the wrapper OpenGL ES 2.x library |
| 178 | // |
| 179 | cc_library_shared { |
| 180 | name: "libGLESv2", |
| 181 | defaults: ["gles_libs_defaults"], |
| 182 | srcs: ["GLES2/gl2.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 183 | cflags: ["-DLOG_TAG=\"libGLESv2\""], |
| 184 | } |
| 185 | |
| 186 | //############################################################################## |
| 187 | // Build the wrapper OpenGL ES 3.x library (this is just different name for v2) |
| 188 | // |
| 189 | cc_library_shared { |
| 190 | name: "libGLESv3", |
| 191 | defaults: ["gles_libs_defaults"], |
| 192 | srcs: ["GLES2/gl2.cpp"], |
Dan Willemsen | a331063 | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 193 | cflags: ["-DLOG_TAG=\"libGLESv3\""], |
| 194 | } |