The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 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 |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -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 | |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 40 | LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" |
| 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) |
Mathias Agopian | 57bf9e7 | 2011-10-07 15:42:53 -0700 | [diff] [blame] | 44 | LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY |
| 45 | endif |
Mathias Agopian | 5df9962 | 2012-06-18 17:27:56 -0700 | [diff] [blame] | 46 | ifeq ($(TARGET_BOARD_PLATFORM),s5pc110) |
Mathias Agopian | 7f42a9c | 2012-04-23 20:00:16 -0700 | [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) |
Mathias Agopian | 7f42a9c | 2012-04-23 20:00:16 -0700 | [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),) |
| 59 | LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS) |
| 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 |
Jesse Hall | 24cd98e | 2014-07-13 14:37:16 -0700 | [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 := \ |
Mathias Agopian | af54ab9 | 2009-07-02 19:04:39 -0700 | [diff] [blame] | 96 | libcutils \ |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 97 | liblog \ |
Mathias Agopian | c1d359d | 2012-08-04 20:09:03 -0700 | [diff] [blame] | 98 | libdl \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 99 | libhardware \ |
| 100 | libutils \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 101 | libEGL \ |
Mathias Agopian | af54ab9 | 2009-07-02 19:04:39 -0700 | [diff] [blame] | 102 | libGLESv1_CM \ |
Mathias Agopian | 3f84483 | 2013-08-07 21:24:32 -0700 | [diff] [blame] | 103 | libGLESv2 \ |
Mathias Agopian | af54ab9 | 2009-07-02 19:04:39 -0700 | [diff] [blame] | 104 | libbinder \ |
Mathias Agopian | 9cce325 | 2010-02-09 17:46:37 -0800 | [diff] [blame] | 105 | libui \ |
Ruchi Kandoi | ef472ec | 2014-04-02 12:50:06 -0700 | [diff] [blame] | 106 | libgui \ |
| 107 | libpowermanager |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 108 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 109 | LOCAL_MODULE:= libsurfaceflinger |
| 110 | |
| 111 | include $(BUILD_SHARED_LIBRARY) |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 112 | |
| 113 | ############################################################### |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 114 | # build surfaceflinger's executable |
| 115 | include $(CLEAR_VARS) |
| 116 | |
Dmitriy Ivanov | 2b1f2da | 2014-10-07 13:40:41 -0700 | [diff] [blame] | 117 | LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic |
| 118 | LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" -Iart |
| 119 | LOCAL_CPPFLAGS:= -std=c++11 |
Mathias Agopian | 4f4f094 | 2013-08-19 17:26:18 -0700 | [diff] [blame] | 120 | |
Dmitriy Ivanov | 2b1f2da | 2014-10-07 13:40:41 -0700 | [diff] [blame] | 121 | # TODO: Trying to link libsigchain as a static library prevents |
| 122 | # static linker from exporting necessary symbols. So as a workaround |
| 123 | # we use sigchain.o |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 124 | LOCAL_SRC_FILES:= \ |
Dmitriy Ivanov | 2b1f2da | 2014-10-07 13:40:41 -0700 | [diff] [blame] | 125 | main_surfaceflinger.cpp \ |
| 126 | sigchain_proxy.cpp |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 127 | |
| 128 | LOCAL_SHARED_LIBRARIES := \ |
| 129 | libsurfaceflinger \ |
Mathias Agopian | 9414d67 | 2013-08-23 15:56:38 -0700 | [diff] [blame] | 130 | libcutils \ |
Mathias Agopian | 4f4f094 | 2013-08-19 17:26:18 -0700 | [diff] [blame] | 131 | liblog \ |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 132 | libbinder \ |
Dmitriy Ivanov | 2b1f2da | 2014-10-07 13:40:41 -0700 | [diff] [blame] | 133 | libutils \ |
| 134 | libdl |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 135 | |
| 136 | LOCAL_MODULE:= surfaceflinger |
| 137 | |
Colin Cross | 89450d4 | 2014-02-20 15:36:21 -0800 | [diff] [blame] | 138 | ifdef TARGET_32_BIT_SURFACEFLINGER |
| 139 | LOCAL_32_BIT_ONLY := true |
| 140 | endif |
| 141 | |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 142 | include $(BUILD_EXECUTABLE) |
| 143 | |
| 144 | ############################################################### |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 145 | # uses jni which may not be available in PDK |
| 146 | ifneq ($(wildcard libnativehelper/include),) |
| 147 | include $(CLEAR_VARS) |
Mathias Agopian | 1b3aeb4 | 2012-10-07 16:41:12 -0700 | [diff] [blame] | 148 | LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" |
| 149 | |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 150 | LOCAL_SRC_FILES:= \ |
| 151 | DdmConnection.cpp |
| 152 | |
| 153 | LOCAL_SHARED_LIBRARIES := \ |
| 154 | libcutils \ |
Ying Wang | 8a0cb4e | 2013-04-09 21:55:39 -0700 | [diff] [blame] | 155 | liblog \ |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 156 | libdl |
| 157 | |
| 158 | LOCAL_MODULE:= libsurfaceflinger_ddmconnection |
| 159 | |
| 160 | include $(BUILD_SHARED_LIBRARY) |
| 161 | endif # libnativehelper |