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