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 15 LOCAL_PATH := $(call my-dir) 16 include $(CLEAR_VARS) 17 18 LOCAL_CLANG := true 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 38 39 LOCAL_CPPFLAGS += -DDEBUG_ONLY_CODE=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0) 40 41 LOCAL_SRC_FILES := \ 42 IGraphicBufferConsumer.cpp \ 43 IConsumerListener.cpp \ 44 BitTube.cpp \ 45 BufferItem.cpp \ 46 BufferItemConsumer.cpp \ 47 BufferQueue.cpp \ 48 BufferQueueConsumer.cpp \ 49 BufferQueueCore.cpp \ 50 BufferQueueProducer.cpp \ 51 BufferSlot.cpp \ 52 ConsumerBase.cpp \ 53 CpuConsumer.cpp \ 54 DisplayEventReceiver.cpp \ 55 GLConsumer.cpp \ 56 GraphicBufferAlloc.cpp \ 57 GuiConfig.cpp \ 58 IDisplayEventConnection.cpp \ 59 IGraphicBufferAlloc.cpp \ 60 IGraphicBufferProducer.cpp \ 61 IProducerListener.cpp \ 62 ISensorEventConnection.cpp \ 63 ISensorServer.cpp \ 64 ISurfaceComposer.cpp \ 65 ISurfaceComposerClient.cpp \ 66 LayerState.cpp \ 67 Sensor.cpp \ 68 SensorEventQueue.cpp \ 69 SensorManager.cpp \ 70 StreamSplitter.cpp \ 71 Surface.cpp \ 72 SurfaceControl.cpp \ 73 SurfaceComposerClient.cpp \ 74 SyncFeatures.cpp \ 75 76 LOCAL_SHARED_LIBRARIES := \ 77 libbinder \ 78 libcutils \ 79 libEGL \ 80 libGLESv2 \ 81 libsync \ 82 libui \ 83 libutils \ 84 liblog 85 86 87 LOCAL_MODULE := libgui 88 89 ifeq ($(TARGET_BOARD_PLATFORM), tegra) 90 LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC 91 endif 92 ifeq ($(TARGET_BOARD_PLATFORM), tegra3) 93 LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC 94 endif 95 96 include $(BUILD_SHARED_LIBRARY) 97 98 ifeq (,$(ONE_SHOT_MAKEFILE)) 99 include $(call first-makefiles-under,$(LOCAL_PATH)) 100 endif 101