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