blob: ddf107297e6a75f0871b6e6e0732653f526d9ab6 [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.
14
15cc_library_shared {
16 name: "libgui",
17
18 clang: true,
19 cppflags: [
20 "-Weverything",
21 "-Werror",
22
23 // The static constructors and destructors in this library have not been noted to
24 // introduce significant overheads
25 "-Wno-exit-time-destructors",
26 "-Wno-global-constructors",
27
28 // We only care about compiling as C++14
29 "-Wno-c++98-compat-pedantic",
30
31 // We don't need to enumerate every case in a switch as long as a default case
32 // is present
33 "-Wno-switch-enum",
34
35 // Allow calling variadic macros without a __VA_ARGS__ list
36 "-Wno-gnu-zero-variadic-macro-arguments",
37
38 // Don't warn about struct padding
39 "-Wno-padded",
40
41 // android/sensors.h uses nested anonymous unions and anonymous structs
42 "-Wno-nested-anon-types",
43 "-Wno-gnu-anonymous-struct",
44
Dan Stoza71bded52016-10-19 11:10:33 -070045 // We are aware of the risks inherent in comparing floats for equality
46 "-Wno-float-equal",
47
Dan Willemsen3106c1c2016-10-03 23:56:51 -070048 "-DDEBUG_ONLY_CODE=0",
49 ],
50
51 product_variables: {
52 brillo: {
53 cflags: ["-DHAVE_NO_SURFACE_FLINGER"],
54 },
55 debuggable: {
56 cppflags: [
57 "-UDEBUG_ONLY_CODE",
58 "-DDEBUG_ONLY_CODE=1",
59 ],
60 },
61 },
62
63 srcs: [
64 "IGraphicBufferConsumer.cpp",
65 "IConsumerListener.cpp",
66 "BitTube.cpp",
67 "BufferItem.cpp",
68 "BufferItemConsumer.cpp",
69 "BufferQueue.cpp",
70 "BufferQueueConsumer.cpp",
71 "BufferQueueCore.cpp",
72 "BufferQueueProducer.cpp",
73 "BufferSlot.cpp",
74 "ConsumerBase.cpp",
75 "CpuConsumer.cpp",
76 "DisplayEventReceiver.cpp",
Brian Andersond6927fb2016-07-23 23:37:30 -070077 "FrameTimestamps.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070078 "GLConsumer.cpp",
79 "GraphicBufferAlloc.cpp",
80 "GuiConfig.cpp",
81 "IDisplayEventConnection.cpp",
82 "IGraphicBufferAlloc.cpp",
83 "IGraphicBufferProducer.cpp",
84 "IProducerListener.cpp",
85 "ISensorEventConnection.cpp",
86 "ISensorServer.cpp",
87 "ISurfaceComposer.cpp",
88 "ISurfaceComposerClient.cpp",
89 "LayerState.cpp",
90 "OccupancyTracker.cpp",
91 "Sensor.cpp",
92 "SensorEventQueue.cpp",
93 "SensorManager.cpp",
94 "StreamSplitter.cpp",
95 "Surface.cpp",
96 "SurfaceControl.cpp",
97 "SurfaceComposerClient.cpp",
98 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080099 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700100 ],
101
102 shared_libs: [
Jesse Hall153fbc82017-01-03 16:18:15 -0800103 "libsync",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700104 "libbinder",
105 "libcutils",
106 "libEGL",
107 "libGLESv2",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700108 "libui",
109 "libutils",
110 "liblog",
111 ],
112
Michael Schwartzf0b3db92016-10-18 10:22:23 -0700113 export_shared_lib_headers: ["libbinder", "libui"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700114}
115
116subdirs = ["tests"]