Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [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. |
| 14 | |
Dan Stoza | f10c46e | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 16 | include $(CLEAR_VARS) |
| 17 | |
Dan Stoza | f10c46e | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 18 | LOCAL_CLANG := true |
Dan Stoza | d723bd7 | 2014-11-18 10:24:03 -0800 | [diff] [blame] | 19 | LOCAL_CPPFLAGS := -std=c++1y -Weverything -Werror |
| 20 | |
| 21 | # The static constructors and destructors in this library have not been noted to |
| 22 | # introduce significant overheads |
| 23 | LOCAL_CPPFLAGS += -Wno-exit-time-destructors |
| 24 | LOCAL_CPPFLAGS += -Wno-global-constructors |
| 25 | |
| 26 | # We only care about compiling as C++14 |
| 27 | LOCAL_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 |
| 31 | LOCAL_CPPFLAGS += -Wno-switch-enum |
| 32 | |
| 33 | # Allow calling variadic macros without a __VA_ARGS__ list |
| 34 | LOCAL_CPPFLAGS += -Wno-gnu-zero-variadic-macro-arguments |
| 35 | |
| 36 | # Don't warn about struct padding |
| 37 | LOCAL_CPPFLAGS += -Wno-padded |
Dan Stoza | f10c46e | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 38 | |
Pablo Ceballos | 9e31433 | 2016-01-12 13:49:19 -0800 | [diff] [blame] | 39 | LOCAL_CPPFLAGS += -DDEBUG_ONLY_CODE=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0) |
| 40 | |
Dan Stoza | f10c46e | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 41 | LOCAL_SRC_FILES := \ |
Mathias Agopian | a4e1952 | 2013-07-31 20:09:53 -0700 | [diff] [blame] | 42 | IGraphicBufferConsumer.cpp \ |
| 43 | IConsumerListener.cpp \ |
Mathias Agopian | 5cae0d0 | 2011-10-20 18:42:02 -0700 | [diff] [blame] | 44 | BitTube.cpp \ |
Dan Stoza | 289ade1 | 2014-02-28 11:17:17 -0800 | [diff] [blame] | 45 | BufferItem.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 46 | BufferItemConsumer.cpp \ |
Daniel Lam | 6b091c5 | 2012-01-22 15:26:27 -0800 | [diff] [blame] | 47 | BufferQueue.cpp \ |
Dan Stoza | 289ade1 | 2014-02-28 11:17:17 -0800 | [diff] [blame] | 48 | BufferQueueConsumer.cpp \ |
| 49 | BufferQueueCore.cpp \ |
| 50 | BufferQueueProducer.cpp \ |
| 51 | BufferSlot.cpp \ |
Jamie Gennis | 1a4d883 | 2012-08-02 20:11:05 -0700 | [diff] [blame] | 52 | ConsumerBase.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 53 | CpuConsumer.cpp \ |
Mathias Agopian | d0566bc | 2011-11-17 17:49:17 -0800 | [diff] [blame] | 54 | DisplayEventReceiver.cpp \ |
Andy McFadden | 2adaf04 | 2012-12-18 09:49:45 -0800 | [diff] [blame] | 55 | GLConsumer.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 56 | GraphicBufferAlloc.cpp \ |
| 57 | GuiConfig.cpp \ |
Mathias Agopian | d0566bc | 2011-11-17 17:49:17 -0800 | [diff] [blame] | 58 | IDisplayEventConnection.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 59 | IGraphicBufferAlloc.cpp \ |
Andy McFadden | 2adaf04 | 2012-12-18 09:49:45 -0800 | [diff] [blame] | 60 | IGraphicBufferProducer.cpp \ |
Dan Stoza | f0eaf25 | 2014-03-21 13:05:51 -0700 | [diff] [blame] | 61 | IProducerListener.cpp \ |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 62 | ISensorEventConnection.cpp \ |
| 63 | ISensorServer.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 64 | ISurfaceComposer.cpp \ |
| 65 | ISurfaceComposerClient.cpp \ |
Jamie Gennis | 392edd8 | 2012-11-29 23:26:29 -0800 | [diff] [blame] | 66 | LayerState.cpp \ |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 67 | Sensor.cpp \ |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 68 | SensorEventQueue.cpp \ |
Jamie Gennis | 8ba32fa | 2010-12-20 11:27:26 -0800 | [diff] [blame] | 69 | SensorManager.cpp \ |
Dan Stoza | 99b18b4 | 2014-03-28 15:34:33 -0700 | [diff] [blame] | 70 | StreamSplitter.cpp \ |
Mathias Agopian | d87f162 | 2011-03-25 18:42:40 -0700 | [diff] [blame] | 71 | Surface.cpp \ |
Mathias Agopian | e3c697f | 2013-02-14 17:11:02 -0800 | [diff] [blame] | 72 | SurfaceControl.cpp \ |
Mathias Agopian | d87f162 | 2011-03-25 18:42:40 -0700 | [diff] [blame] | 73 | SurfaceComposerClient.cpp \ |
Mathias Agopian | ca08833 | 2013-03-28 17:44:13 -0700 | [diff] [blame] | 74 | SyncFeatures.cpp \ |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 75 | |
| 76 | LOCAL_SHARED_LIBRARIES := \ |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 77 | libbinder \ |
Jesse Hall | ef19414 | 2012-06-14 14:45:17 -0700 | [diff] [blame] | 78 | libcutils \ |
Jamie Gennis | 8ba32fa | 2010-12-20 11:27:26 -0800 | [diff] [blame] | 79 | libEGL \ |
| 80 | libGLESv2 \ |
Jesse Hall | ef19414 | 2012-06-14 14:45:17 -0700 | [diff] [blame] | 81 | libsync \ |
| 82 | libui \ |
| 83 | libutils \ |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 84 | liblog |
Jamie Gennis | 8ba32fa | 2010-12-20 11:27:26 -0800 | [diff] [blame] | 85 | |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 86 | |
Dan Stoza | f10c46e | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 87 | LOCAL_MODULE := libgui |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 88 | |
Mathias Agopian | ca08833 | 2013-03-28 17:44:13 -0700 | [diff] [blame] | 89 | ifeq ($(TARGET_BOARD_PLATFORM), tegra) |
| 90 | LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC |
Daniel Lam | bff957f | 2012-01-22 15:40:56 -0800 | [diff] [blame] | 91 | endif |
Mathias Agopian | ca08833 | 2013-03-28 17:44:13 -0700 | [diff] [blame] | 92 | ifeq ($(TARGET_BOARD_PLATFORM), tegra3) |
| 93 | LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC |
Jeff Boody | 42223f6 | 2012-09-10 10:24:07 -0600 | [diff] [blame] | 94 | endif |
| 95 | |
Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 96 | include $(BUILD_SHARED_LIBRARY) |
Jamie Gennis | 7fcb077 | 2011-04-26 17:26:37 -0700 | [diff] [blame] | 97 | |
| 98 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 99 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 100 | endif |