blob: 909ca67cb2ee6e3e3cbfd3afb7390fe8ebe0adf0 [file] [log] [blame]
Dan Stozad723bd72014-11-18 10:24:03 -08001# 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
Dan Stozaf10c46e2014-11-11 10:32:31 -080015LOCAL_PATH := $(call my-dir)
Mathias Agopian589ce852010-07-13 22:21:56 -070016include $(CLEAR_VARS)
17
Dan Stozaf10c46e2014-11-11 10:32:31 -080018LOCAL_CLANG := true
Elliott Hughes56a8d322016-10-11 14:47:19 -070019LOCAL_CPPFLAGS := -Weverything -Werror
Dan Stozad723bd72014-11-18 10:24:03 -080020
21# The static constructors and destructors in this library have not been noted to
22# introduce significant overheads
23LOCAL_CPPFLAGS += -Wno-exit-time-destructors
24LOCAL_CPPFLAGS += -Wno-global-constructors
25
26# We only care about compiling as C++14
27LOCAL_CPPFLAGS += -Wno-c++98-compat-pedantic
28
29# We don't need to enumerate every case in a switch as long as a default case
30# is present
31LOCAL_CPPFLAGS += -Wno-switch-enum
32
33# Allow calling variadic macros without a __VA_ARGS__ list
34LOCAL_CPPFLAGS += -Wno-gnu-zero-variadic-macro-arguments
35
36# Don't warn about struct padding
37LOCAL_CPPFLAGS += -Wno-padded
Dan Stozaf10c46e2014-11-11 10:32:31 -080038
Colin Crossb1f30ba2016-09-30 17:24:06 -070039# android/sensors.h uses nested anonymous unions and anonymous structs
40LOCAL_CPPFLAGS += -Wno-nested-anon-types -Wno-gnu-anonymous-struct
41
Pablo Ceballos9e314332016-01-12 13:49:19 -080042LOCAL_CPPFLAGS += -DDEBUG_ONLY_CODE=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)
43
Dan Stozaf10c46e2014-11-11 10:32:31 -080044LOCAL_SRC_FILES := \
Mathias Agopiana4e19522013-07-31 20:09:53 -070045 IGraphicBufferConsumer.cpp \
46 IConsumerListener.cpp \
Mathias Agopian5cae0d02011-10-20 18:42:02 -070047 BitTube.cpp \
Dan Stoza289ade12014-02-28 11:17:17 -080048 BufferItem.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080049 BufferItemConsumer.cpp \
Daniel Lam6b091c52012-01-22 15:26:27 -080050 BufferQueue.cpp \
Dan Stoza289ade12014-02-28 11:17:17 -080051 BufferQueueConsumer.cpp \
52 BufferQueueCore.cpp \
53 BufferQueueProducer.cpp \
54 BufferSlot.cpp \
Jamie Gennis1a4d8832012-08-02 20:11:05 -070055 ConsumerBase.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080056 CpuConsumer.cpp \
Mathias Agopiand0566bc2011-11-17 17:49:17 -080057 DisplayEventReceiver.cpp \
Andy McFadden2adaf042012-12-18 09:49:45 -080058 GLConsumer.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080059 GraphicBufferAlloc.cpp \
60 GuiConfig.cpp \
Mathias Agopiand0566bc2011-11-17 17:49:17 -080061 IDisplayEventConnection.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080062 IGraphicBufferAlloc.cpp \
Andy McFadden2adaf042012-12-18 09:49:45 -080063 IGraphicBufferProducer.cpp \
Dan Stozaf0eaf252014-03-21 13:05:51 -070064 IProducerListener.cpp \
Mathias Agopian589ce852010-07-13 22:21:56 -070065 ISensorEventConnection.cpp \
66 ISensorServer.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080067 ISurfaceComposer.cpp \
68 ISurfaceComposerClient.cpp \
Jamie Gennis392edd82012-11-29 23:26:29 -080069 LayerState.cpp \
Mathias Agopian589ce852010-07-13 22:21:56 -070070 Sensor.cpp \
Mathias Agopian589ce852010-07-13 22:21:56 -070071 SensorEventQueue.cpp \
Jamie Gennis8ba32fa2010-12-20 11:27:26 -080072 SensorManager.cpp \
Dan Stoza99b18b42014-03-28 15:34:33 -070073 StreamSplitter.cpp \
Mathias Agopiand87f1622011-03-25 18:42:40 -070074 Surface.cpp \
Mathias Agopiane3c697f2013-02-14 17:11:02 -080075 SurfaceControl.cpp \
Mathias Agopiand87f1622011-03-25 18:42:40 -070076 SurfaceComposerClient.cpp \
Mathias Agopianca088332013-03-28 17:44:13 -070077 SyncFeatures.cpp \
Mathias Agopian589ce852010-07-13 22:21:56 -070078
79LOCAL_SHARED_LIBRARIES := \
Mathias Agopian589ce852010-07-13 22:21:56 -070080 libbinder \
Jesse Hallef194142012-06-14 14:45:17 -070081 libcutils \
Jamie Gennis8ba32fa2010-12-20 11:27:26 -080082 libEGL \
83 libGLESv2 \
Jesse Hallef194142012-06-14 14:45:17 -070084 libsync \
85 libui \
86 libutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -070087 liblog
Jamie Gennis8ba32fa2010-12-20 11:27:26 -080088
Christopher Wiley72db0b72016-04-18 15:50:56 -070089LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libbinder
Mathias Agopian589ce852010-07-13 22:21:56 -070090
Dan Stozaf10c46e2014-11-11 10:32:31 -080091LOCAL_MODULE := libgui
Mathias Agopian589ce852010-07-13 22:21:56 -070092
Mathias Agopianca088332013-03-28 17:44:13 -070093ifeq ($(TARGET_BOARD_PLATFORM), tegra)
94 LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
Daniel Lambff957f2012-01-22 15:40:56 -080095endif
Mathias Agopianca088332013-03-28 17:44:13 -070096ifeq ($(TARGET_BOARD_PLATFORM), tegra3)
97 LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
Jeff Boody42223f62012-09-10 10:24:07 -060098endif
99
Christopher Wiley45f33a52016-02-10 15:33:14 -0800100ifeq ($(TARGET_BOARD_HAS_NO_SURFACE_FLINGER), true)
101 LOCAL_CFLAGS += -DHAVE_NO_SURFACE_FLINGER
102endif
103
Mathias Agopian589ce852010-07-13 22:21:56 -0700104include $(BUILD_SHARED_LIBRARY)
Jamie Gennis7fcb0772011-04-26 17:26:37 -0700105
106ifeq (,$(ONE_SHOT_MAKEFILE))
107include $(call first-makefiles-under,$(LOCAL_PATH))
108endif