Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2 | include $(CLEAR_VARS) |
| 3 | |
Jesse Hall | 24cd98e | 2014-07-13 14:37:16 -0700 | [diff] [blame] | 4 | LOCAL_CLANG := true |
| 5 | |
Jesse Hall | e9b23b6 | 2014-07-14 15:32:59 -0700 | [diff] [blame] | 6 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 7 | LOCAL_SRC_FILES := \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 8 | Client.cpp \ |
| 9 | DisplayDevice.cpp \ |
Jamie Gennis | faf77cc | 2013-07-30 15:10:32 -0700 | [diff] [blame] | 10 | DispSync.cpp \ |
Jamie Gennis | d170075 | 2013-10-14 12:22:52 -0700 | [diff] [blame] | 11 | EventControlThread.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 12 | EventThread.cpp \ |
| 13 | FrameTracker.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 14 | Layer.cpp \ |
| 15 | LayerDim.cpp \ |
| 16 | MessageQueue.cpp \ |
Dan Stoza | b9b0883 | 2014-03-13 11:55:57 -0700 | [diff] [blame] | 17 | MonitoredProducer.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 18 | SurfaceFlinger.cpp \ |
| 19 | SurfaceFlingerConsumer.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 20 | Transform.cpp \ |
| 21 | DisplayHardware/FramebufferSurface.cpp \ |
| 22 | DisplayHardware/HWComposer.cpp \ |
| 23 | DisplayHardware/PowerHAL.cpp \ |
| 24 | DisplayHardware/VirtualDisplaySurface.cpp \ |
Mathias Agopian | ff2ed70 | 2013-09-01 21:36:12 -0700 | [diff] [blame] | 25 | Effects/Daltonizer.cpp \ |
Mathias Agopian | 85cce37 | 2013-06-04 21:50:31 -0700 | [diff] [blame] | 26 | EventLog/EventLogTags.logtags \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 27 | EventLog/EventLog.cpp \ |
Mathias Agopian | 3f84483 | 2013-08-07 21:24:32 -0700 | [diff] [blame] | 28 | RenderEngine/Description.cpp \ |
| 29 | RenderEngine/Mesh.cpp \ |
| 30 | RenderEngine/Program.cpp \ |
| 31 | RenderEngine/ProgramCache.cpp \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 32 | RenderEngine/GLExtensions.cpp \ |
| 33 | RenderEngine/RenderEngine.cpp \ |
Mathias Agopian | 49457ac | 2013-08-14 18:20:17 -0700 | [diff] [blame] | 34 | RenderEngine/Texture.cpp \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 35 | RenderEngine/GLES10RenderEngine.cpp \ |
Mathias Agopian | 3f84483 | 2013-08-07 21:24:32 -0700 | [diff] [blame] | 36 | RenderEngine/GLES11RenderEngine.cpp \ |
| 37 | RenderEngine/GLES20RenderEngine.cpp |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 38 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 40 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 41 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | |
Mathias Agopian | 5df9962 | 2012-06-18 17:27:56 -0700 | [diff] [blame] | 43 | ifeq ($(TARGET_BOARD_PLATFORM),omap4) |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 44 | LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY |
Mathias Agopian | 57bf9e7 | 2011-10-07 15:42:53 -0700 | [diff] [blame] | 45 | endif |
Mathias Agopian | 5df9962 | 2012-06-18 17:27:56 -0700 | [diff] [blame] | 46 | ifeq ($(TARGET_BOARD_PLATFORM),s5pc110) |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 47 | LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY |
Mathias Agopian | 7f42a9c | 2012-04-23 20:00:16 -0700 | [diff] [blame] | 48 | endif |
| 49 | |
Mathias Agopian | 5df9962 | 2012-06-18 17:27:56 -0700 | [diff] [blame] | 50 | ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true) |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 51 | LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING |
Mathias Agopian | 6722681 | 2010-10-11 17:54:43 -0700 | [diff] [blame] | 52 | endif |
| 53 | |
Jesse Hall | c354eff | 2013-10-25 10:44:41 -0700 | [diff] [blame] | 54 | ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) |
| 55 | LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS |
Naseer Ahmed | 6a96846 | 2013-10-04 16:15:22 -0400 | [diff] [blame] | 56 | endif |
| 57 | |
Jamie Gennis | cdbaecb | 2012-10-12 14:18:10 -0700 | [diff] [blame] | 58 | ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),) |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 59 | LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS) |
Jamie Gennis | cdbaecb | 2012-10-12 14:18:10 -0700 | [diff] [blame] | 60 | endif |
| 61 | |
Jamie Gennis | faf77cc | 2013-07-30 15:10:32 -0700 | [diff] [blame] | 62 | ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true) |
| 63 | LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK |
| 64 | endif |
| 65 | |
| 66 | # See build/target/board/generic/BoardConfig.mk for a description of this setting. |
| 67 | ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),) |
| 68 | LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS) |
| 69 | else |
| 70 | LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0 |
| 71 | endif |
| 72 | |
Jamie Gennis | 0a645cc | 2013-10-14 20:52:46 -0700 | [diff] [blame] | 73 | # See build/target/board/generic/BoardConfig.mk for a description of this setting. |
| 74 | ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),) |
| 75 | LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS) |
| 76 | else |
| 77 | LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0 |
| 78 | endif |
| 79 | |
Jamie Gennis | faf77cc | 2013-07-30 15:10:32 -0700 | [diff] [blame] | 80 | ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),) |
| 81 | LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS) |
| 82 | else |
| 83 | LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0 |
| 84 | endif |
| 85 | |
Dan Stoza | 1f3efb1 | 2014-10-15 16:34:55 -0700 | [diff] [blame] | 86 | ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),) |
| 87 | LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION) |
| 88 | else |
| 89 | LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0 |
| 90 | endif |
| 91 | |
Michael Lentine | 7306c67 | 2014-07-30 13:00:37 -0700 | [diff] [blame] | 92 | LOCAL_CFLAGS += -fvisibility=hidden -Werror=format |
Dan Stoza | 1665c8e | 2015-01-27 10:32:10 -0800 | [diff] [blame] | 93 | LOCAL_CFLAGS += -std=c++11 |
Mathias Agopian | b6df7d0 | 2013-05-09 14:53:35 -0700 | [diff] [blame] | 94 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 95 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 96 | libcutils \ |
| 97 | liblog \ |
| 98 | libdl \ |
| 99 | libhardware \ |
| 100 | libutils \ |
| 101 | libEGL \ |
| 102 | libGLESv1_CM \ |
| 103 | libGLESv2 \ |
| 104 | libbinder \ |
| 105 | libui \ |
| 106 | libgui \ |
| 107 | libpowermanager |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 108 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 109 | LOCAL_MODULE := libsurfaceflinger |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 110 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 111 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 112 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 113 | include $(BUILD_SHARED_LIBRARY) |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 114 | |
| 115 | ############################################################### |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 116 | # build surfaceflinger's executable |
| 117 | include $(CLEAR_VARS) |
| 118 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 119 | LOCAL_CLANG := true |
Mathias Agopian | 4f4f094 | 2013-08-19 17:26:18 -0700 | [diff] [blame] | 120 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 121 | LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic |
| 122 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
| 123 | LOCAL_CPPFLAGS := -std=c++11 |
| 124 | |
| 125 | LOCAL_SRC_FILES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 126 | main_surfaceflinger.cpp |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 127 | |
| 128 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 129 | libsurfaceflinger \ |
| 130 | libcutils \ |
| 131 | liblog \ |
| 132 | libbinder \ |
| 133 | libutils \ |
| 134 | libdl |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 135 | |
Dmitriy Ivanov | 4340a14 | 2014-10-20 14:17:26 -0700 | [diff] [blame] | 136 | LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain |
| 137 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 138 | LOCAL_MODULE := surfaceflinger |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 139 | |
Colin Cross | 89450d4 | 2014-02-20 15:36:21 -0800 | [diff] [blame] | 140 | ifdef TARGET_32_BIT_SURFACEFLINGER |
| 141 | LOCAL_32_BIT_ONLY := true |
| 142 | endif |
| 143 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 144 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 145 | |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 146 | include $(BUILD_EXECUTABLE) |
| 147 | |
| 148 | ############################################################### |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 149 | # uses jni which may not be available in PDK |
| 150 | ifneq ($(wildcard libnativehelper/include),) |
| 151 | include $(CLEAR_VARS) |
Mathias Agopian | 1b3aeb4 | 2012-10-07 16:41:12 -0700 | [diff] [blame] | 152 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 153 | LOCAL_CLANG := true |
| 154 | |
| 155 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
| 156 | LOCAL_CPPFLAGS := -std=c++11 |
| 157 | |
| 158 | LOCAL_SRC_FILES := \ |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 159 | DdmConnection.cpp |
| 160 | |
| 161 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 162 | libcutils \ |
| 163 | liblog \ |
| 164 | libdl |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 165 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 166 | LOCAL_MODULE := libsurfaceflinger_ddmconnection |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 167 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 168 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 169 | |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 170 | include $(BUILD_SHARED_LIBRARY) |
| 171 | endif # libnativehelper |