Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 1 | // Copyright 2010 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 14 | cc_library_headers { |
| 15 | name: "libgui_headers", |
| 16 | vendor_available: true, |
| 17 | export_include_dirs: ["include"], |
| 18 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 19 | |
| 20 | cc_library_shared { |
| 21 | name: "libgui", |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 22 | vendor_available: true, |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 23 | |
| 24 | clang: true, |
| 25 | cppflags: [ |
| 26 | "-Weverything", |
| 27 | "-Werror", |
| 28 | |
| 29 | // The static constructors and destructors in this library have not been noted to |
| 30 | // introduce significant overheads |
| 31 | "-Wno-exit-time-destructors", |
| 32 | "-Wno-global-constructors", |
| 33 | |
| 34 | // We only care about compiling as C++14 |
| 35 | "-Wno-c++98-compat-pedantic", |
| 36 | |
| 37 | // We don't need to enumerate every case in a switch as long as a default case |
| 38 | // is present |
| 39 | "-Wno-switch-enum", |
| 40 | |
| 41 | // Allow calling variadic macros without a __VA_ARGS__ list |
| 42 | "-Wno-gnu-zero-variadic-macro-arguments", |
| 43 | |
| 44 | // Don't warn about struct padding |
| 45 | "-Wno-padded", |
| 46 | |
Dan Stoza | 71bded5 | 2016-10-19 11:10:33 -0700 | [diff] [blame] | 47 | // We are aware of the risks inherent in comparing floats for equality |
| 48 | "-Wno-float-equal", |
| 49 | |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 50 | // Pure abstract classes trigger this warning |
| 51 | "-Wno-weak-vtables", |
| 52 | |
| 53 | // Allow four-character integer literals |
| 54 | "-Wno-four-char-constants", |
| 55 | |
| 56 | // Allow documentation warnings |
| 57 | "-Wno-documentation", |
| 58 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 59 | "-DDEBUG_ONLY_CODE=0", |
| 60 | ], |
| 61 | |
| 62 | product_variables: { |
| 63 | brillo: { |
| 64 | cflags: ["-DHAVE_NO_SURFACE_FLINGER"], |
| 65 | }, |
Fabien Sanglard | 98bfd4f | 2017-06-22 11:13:49 -0700 | [diff] [blame] | 66 | eng: { |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 67 | cppflags: [ |
| 68 | "-UDEBUG_ONLY_CODE", |
| 69 | "-DDEBUG_ONLY_CODE=1", |
| 70 | ], |
| 71 | }, |
| 72 | }, |
| 73 | |
| 74 | srcs: [ |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 75 | "BitTube.cpp", |
| 76 | "BufferItem.cpp", |
| 77 | "BufferItemConsumer.cpp", |
| 78 | "BufferQueue.cpp", |
| 79 | "BufferQueueConsumer.cpp", |
| 80 | "BufferQueueCore.cpp", |
| 81 | "BufferQueueProducer.cpp", |
| 82 | "BufferSlot.cpp", |
| 83 | "ConsumerBase.cpp", |
| 84 | "CpuConsumer.cpp", |
| 85 | "DisplayEventReceiver.cpp", |
Brian Anderson | d6927fb | 2016-07-23 23:37:30 -0700 | [diff] [blame] | 86 | "FrameTimestamps.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 87 | "GLConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 88 | "GuiConfig.cpp", |
| 89 | "IDisplayEventConnection.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 90 | "IConsumerListener.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 91 | "IGraphicBufferConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 92 | "IGraphicBufferProducer.cpp", |
| 93 | "IProducerListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 94 | "ISurfaceComposer.cpp", |
| 95 | "ISurfaceComposerClient.cpp", |
| 96 | "LayerState.cpp", |
| 97 | "OccupancyTracker.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 98 | "StreamSplitter.cpp", |
| 99 | "Surface.cpp", |
| 100 | "SurfaceControl.cpp", |
| 101 | "SurfaceComposerClient.cpp", |
| 102 | "SyncFeatures.cpp", |
Mathias Agopian | 05debe1 | 2017-02-08 17:04:18 -0800 | [diff] [blame] | 103 | "view/Surface.cpp", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 104 | "bufferqueue/1.0/B2HProducerListener.cpp", |
| 105 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp" |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 106 | ], |
| 107 | |
| 108 | shared_libs: [ |
Jesse Hall | 153fbc8 | 2017-01-03 16:18:15 -0800 | [diff] [blame] | 109 | "libsync", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 110 | "libbinder", |
| 111 | "libcutils", |
| 112 | "libEGL", |
| 113 | "libGLESv2", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 114 | "libui", |
| 115 | "libutils", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 116 | "libnativewindow", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 117 | "liblog", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 118 | "libhidlbase", |
Courtney Goeltzenleuchter | a0c93e1 | 2017-03-17 16:16:48 -0600 | [diff] [blame] | 119 | "libhidltransport", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 120 | "android.hidl.token@1.0-utils", |
| 121 | "android.hardware.graphics.bufferqueue@1.0", |
Courtney Goeltzenleuchter | a0c93e1 | 2017-03-17 16:16:48 -0600 | [diff] [blame] | 122 | "android.hardware.configstore@1.0", |
Jaesoo Lee | 3e85cbe | 2017-03-30 15:24:15 +0900 | [diff] [blame] | 123 | "android.hardware.configstore-utils", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 124 | ], |
| 125 | |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 126 | header_libs: [ |
| 127 | "libnativebase_headers", |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 128 | "libgui_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 129 | ], |
| 130 | |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 131 | export_shared_lib_headers: [ |
| 132 | "libbinder", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 133 | "libEGL", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 134 | "libnativewindow", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 135 | "libui", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 136 | "android.hidl.token@1.0-utils", |
| 137 | "android.hardware.graphics.bufferqueue@1.0", |
| 138 | ], |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 139 | |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 140 | export_header_lib_headers: [ |
| 141 | "libgui_headers", |
| 142 | ], |
| 143 | |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 144 | export_include_dirs: [ |
| 145 | "include", |
| 146 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | subdirs = ["tests"] |