blob: 50bb7b27d2c511fc98eda66a6f07523415a8056f [file] [log] [blame]
Dan Willemsen3106c1c2016-10-03 23:56:51 -07001// 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 Parkce4de542017-06-21 12:14:18 +090014cc_library_headers {
15 name: "libgui_headers",
16 vendor_available: true,
17 export_include_dirs: ["include"],
18}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070019
20cc_library_shared {
21 name: "libgui",
Jiyong Parkce4de542017-06-21 12:14:18 +090022 vendor_available: true,
Justin Yun4a0f40c2017-07-24 15:19:45 +090023 vndk: {
24 enabled: true,
25 },
Dan Willemsen3106c1c2016-10-03 23:56:51 -070026
27 clang: true,
28 cppflags: [
29 "-Weverything",
30 "-Werror",
31
32 // The static constructors and destructors in this library have not been noted to
33 // introduce significant overheads
34 "-Wno-exit-time-destructors",
35 "-Wno-global-constructors",
36
37 // We only care about compiling as C++14
38 "-Wno-c++98-compat-pedantic",
39
40 // We don't need to enumerate every case in a switch as long as a default case
41 // is present
42 "-Wno-switch-enum",
43
44 // Allow calling variadic macros without a __VA_ARGS__ list
45 "-Wno-gnu-zero-variadic-macro-arguments",
46
47 // Don't warn about struct padding
48 "-Wno-padded",
49
Dan Stoza71bded52016-10-19 11:10:33 -070050 // We are aware of the risks inherent in comparing floats for equality
51 "-Wno-float-equal",
52
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -080053 // Pure abstract classes trigger this warning
54 "-Wno-weak-vtables",
55
56 // Allow four-character integer literals
57 "-Wno-four-char-constants",
58
59 // Allow documentation warnings
60 "-Wno-documentation",
61
Dan Willemsen3106c1c2016-10-03 23:56:51 -070062 "-DDEBUG_ONLY_CODE=0",
63 ],
64
65 product_variables: {
66 brillo: {
67 cflags: ["-DHAVE_NO_SURFACE_FLINGER"],
68 },
Fabien Sanglard98bfd4f2017-06-22 11:13:49 -070069 eng: {
Dan Willemsen3106c1c2016-10-03 23:56:51 -070070 cppflags: [
71 "-UDEBUG_ONLY_CODE",
72 "-DDEBUG_ONLY_CODE=1",
73 ],
74 },
75 },
76
77 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070078 "BitTube.cpp",
79 "BufferItem.cpp",
80 "BufferItemConsumer.cpp",
81 "BufferQueue.cpp",
82 "BufferQueueConsumer.cpp",
83 "BufferQueueCore.cpp",
84 "BufferQueueProducer.cpp",
85 "BufferSlot.cpp",
86 "ConsumerBase.cpp",
87 "CpuConsumer.cpp",
88 "DisplayEventReceiver.cpp",
Brian Andersond6927fb2016-07-23 23:37:30 -070089 "FrameTimestamps.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070090 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070091 "GuiConfig.cpp",
92 "IDisplayEventConnection.cpp",
Mathias Agopian801ea092017-03-06 15:05:04 -080093 "IConsumerListener.cpp",
Mathias Agopian801ea092017-03-06 15:05:04 -080094 "IGraphicBufferConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070095 "IGraphicBufferProducer.cpp",
96 "IProducerListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070097 "ISurfaceComposer.cpp",
98 "ISurfaceComposerClient.cpp",
99 "LayerState.cpp",
100 "OccupancyTracker.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700101 "StreamSplitter.cpp",
102 "Surface.cpp",
103 "SurfaceControl.cpp",
104 "SurfaceComposerClient.cpp",
105 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -0800106 "view/Surface.cpp",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800107 "bufferqueue/1.0/B2HProducerListener.cpp",
108 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp"
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700109 ],
110
111 shared_libs: [
Jesse Hall153fbc82017-01-03 16:18:15 -0800112 "libsync",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700113 "libbinder",
114 "libcutils",
115 "libEGL",
116 "libGLESv2",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700117 "libui",
118 "libutils",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800119 "libnativewindow",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700120 "liblog",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800121 "libhidlbase",
Courtney Goeltzenleuchtera0c93e12017-03-17 16:16:48 -0600122 "libhidltransport",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800123 "android.hidl.token@1.0-utils",
124 "android.hardware.graphics.bufferqueue@1.0",
Courtney Goeltzenleuchtera0c93e12017-03-17 16:16:48 -0600125 "android.hardware.configstore@1.0",
Jaesoo Lee3e85cbe2017-03-30 15:24:15 +0900126 "android.hardware.configstore-utils",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700127 ],
128
Jiyong Parkce4de542017-06-21 12:14:18 +0900129 header_libs: [
130 "libgui_headers",
131 ],
132
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800133 export_shared_lib_headers: [
134 "libbinder",
Steven Morelandc4e88ef2017-06-22 17:50:49 -0700135 "libEGL",
136 "libnativewindow",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800137 "libui",
138 "android.hidl.token@1.0-utils",
139 "android.hardware.graphics.bufferqueue@1.0",
140 ],
Dan Stoza1e438d22017-03-31 16:18:10 -0700141
Jiyong Parkce4de542017-06-21 12:14:18 +0900142 export_header_lib_headers: [
143 "libgui_headers",
144 ],
145
Dan Stoza1e438d22017-03-31 16:18:10 -0700146 export_include_dirs: [
147 "include",
148 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700149}
150
151subdirs = ["tests"]