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 \ |
Wei Wang | b254fa3 | 2017-01-31 17:43:23 -0800 | [diff] [blame] | 12 | StartBootAnimThread.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 13 | EventThread.cpp \ |
| 14 | FrameTracker.cpp \ |
Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 15 | GpuService.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 16 | Layer.cpp \ |
| 17 | LayerDim.cpp \ |
Fabien Sanglard | 7b1563a | 2016-10-13 12:05:28 -0700 | [diff] [blame] | 18 | LayerRejecter.cpp \ |
Robert Carr | 2047fae | 2016-11-28 14:09:09 -0800 | [diff] [blame] | 19 | LayerVector.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 20 | MessageQueue.cpp \ |
Dan Stoza | b9b0883 | 2014-03-13 11:55:57 -0700 | [diff] [blame] | 21 | MonitoredProducer.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 22 | SurfaceFlingerConsumer.cpp \ |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 23 | SurfaceInterceptor.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 24 | Transform.cpp \ |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 25 | DisplayHardware/ComposerHal.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 26 | DisplayHardware/FramebufferSurface.cpp \ |
Dan Stoza | 651bf31 | 2015-10-23 17:03:17 -0700 | [diff] [blame] | 27 | DisplayHardware/HWC2.cpp \ |
Chia-I Wu | aaff73f | 2017-02-13 12:28:24 -0800 | [diff] [blame] | 28 | DisplayHardware/HWComposerBufferCache.cpp \ |
Jesse Hall | 99c7dbb | 2013-03-14 14:29:29 -0700 | [diff] [blame] | 29 | DisplayHardware/PowerHAL.cpp \ |
| 30 | DisplayHardware/VirtualDisplaySurface.cpp \ |
Mathias Agopian | ff2ed70 | 2013-09-01 21:36:12 -0700 | [diff] [blame] | 31 | Effects/Daltonizer.cpp \ |
Mathias Agopian | 85cce37 | 2013-06-04 21:50:31 -0700 | [diff] [blame] | 32 | EventLog/EventLogTags.logtags \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 33 | EventLog/EventLog.cpp \ |
Mathias Agopian | 3f84483 | 2013-08-07 21:24:32 -0700 | [diff] [blame] | 34 | RenderEngine/Description.cpp \ |
| 35 | RenderEngine/Mesh.cpp \ |
| 36 | RenderEngine/Program.cpp \ |
| 37 | RenderEngine/ProgramCache.cpp \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 38 | RenderEngine/GLExtensions.cpp \ |
| 39 | RenderEngine/RenderEngine.cpp \ |
Mathias Agopian | 49457ac | 2013-08-14 18:20:17 -0700 | [diff] [blame] | 40 | RenderEngine/Texture.cpp \ |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 41 | RenderEngine/GLES20RenderEngine.cpp \ |
Mathias Agopian | 875d8e1 | 2013-06-07 15:35:48 -0700 | [diff] [blame] | 42 | |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 43 | LOCAL_MODULE := libsurfaceflinger |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 44 | LOCAL_C_INCLUDES := \ |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 45 | frameworks/native/vulkan/include \ |
| 46 | external/vulkan-validation-layers/libs/vkjson \ |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 47 | system/libhwbinder/fast_msgq/include \ |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 48 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 49 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
Mathias Agopian | 076b1cc | 2009-04-10 14:24:30 -0700 | [diff] [blame] | 50 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES |
Dan Stoza | 9e56aa0 | 2015-11-02 13:00:03 -0800 | [diff] [blame] | 51 | |
Fabien Sanglard | 9d96de4 | 2016-10-11 00:15:18 +0000 | [diff] [blame] | 52 | ifeq ($(TARGET_USES_HWC2),true) |
| 53 | LOCAL_CFLAGS += -DUSE_HWC2 |
| 54 | LOCAL_SRC_FILES += \ |
| 55 | SurfaceFlinger.cpp \ |
Hendrik Wagenaar | 87670ff | 2017-02-01 12:10:46 -0800 | [diff] [blame] | 56 | VrStateCallbacks.cpp \ |
Fabien Sanglard | 9d96de4 | 2016-10-11 00:15:18 +0000 | [diff] [blame] | 57 | DisplayHardware/HWComposer.cpp |
Fabien Sanglard | b7432cc | 2016-11-11 09:40:27 -0800 | [diff] [blame] | 58 | ifeq ($(TARGET_USES_HWC2ON1ADAPTER), true) |
| 59 | LOCAL_CFLAGS += -DBYPASS_IHWC |
| 60 | endif |
Fabien Sanglard | 9d96de4 | 2016-10-11 00:15:18 +0000 | [diff] [blame] | 61 | else |
Fabien Sanglard | b7432cc | 2016-11-11 09:40:27 -0800 | [diff] [blame] | 62 | LOCAL_CFLAGS += -DBYPASS_IHWC |
Fabien Sanglard | 9d96de4 | 2016-10-11 00:15:18 +0000 | [diff] [blame] | 63 | LOCAL_SRC_FILES += \ |
| 64 | SurfaceFlinger_hwc1.cpp \ |
| 65 | DisplayHardware/HWComposer_hwc1.cpp |
| 66 | endif |
| 67 | |
Jesse Hall | c354eff | 2013-10-25 10:44:41 -0700 | [diff] [blame] | 68 | ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) |
| 69 | LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS |
Naseer Ahmed | 6a96846 | 2013-10-04 16:15:22 -0400 | [diff] [blame] | 70 | endif |
| 71 | |
Jamie Gennis | cdbaecb | 2012-10-12 14:18:10 -0700 | [diff] [blame] | 72 | ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),) |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 73 | LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS) |
Jamie Gennis | cdbaecb | 2012-10-12 14:18:10 -0700 | [diff] [blame] | 74 | endif |
| 75 | |
Jamie Gennis | faf77cc | 2013-07-30 15:10:32 -0700 | [diff] [blame] | 76 | ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true) |
| 77 | LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK |
| 78 | endif |
| 79 | |
Dan Stoza | 1f3efb1 | 2014-10-15 16:34:55 -0700 | [diff] [blame] | 80 | ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),) |
| 81 | LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION) |
| 82 | else |
| 83 | LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0 |
| 84 | endif |
| 85 | |
Michael Lentine | 7306c67 | 2014-07-30 13:00:37 -0700 | [diff] [blame] | 86 | LOCAL_CFLAGS += -fvisibility=hidden -Werror=format |
Mathias Agopian | b6df7d0 | 2013-05-09 14:53:35 -0700 | [diff] [blame] | 87 | |
Jaesoo Lee | 6c9875d | 2017-02-27 13:46:40 +0900 | [diff] [blame] | 88 | LOCAL_HEADER_LIBRARIES := \ |
| 89 | android.hardware.configstore-utils |
| 90 | |
Hendrik Wagenaar | 87670ff | 2017-02-01 12:10:46 -0800 | [diff] [blame] | 91 | LOCAL_STATIC_LIBRARIES := \ |
| 92 | libhwcomposer-command-buffer \ |
| 93 | libtrace_proto \ |
| 94 | libvkjson \ |
| 95 | libvr_manager \ |
| 96 | libvrflinger |
| 97 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 98 | LOCAL_SHARED_LIBRARIES := \ |
Daniel Nicoara | 2f5f8a5 | 2016-12-20 16:11:58 -0500 | [diff] [blame] | 99 | android.dvr.composer@1.0 \ |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 100 | android.hardware.graphics.allocator@2.0 \ |
| 101 | android.hardware.graphics.composer@2.1 \ |
Jiyong Park | 4b20c2e | 2017-01-14 19:45:11 +0900 | [diff] [blame] | 102 | android.hardware.configstore@1.0 \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 103 | libcutils \ |
| 104 | liblog \ |
| 105 | libdl \ |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 106 | libfmq \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 107 | libhardware \ |
Fabien Sanglard | e29055f | 2017-03-08 11:36:46 -0800 | [diff] [blame] | 108 | libhwc2on1adapter \ |
Yifan Hong | 67a4762 | 2016-11-17 13:02:06 -0800 | [diff] [blame] | 109 | libhidlbase \ |
| 110 | libhidltransport \ |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 111 | libhwbinder \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 112 | libutils \ |
| 113 | libEGL \ |
| 114 | libGLESv1_CM \ |
| 115 | libGLESv2 \ |
| 116 | libbinder \ |
| 117 | libui \ |
| 118 | libgui \ |
Jesse Hall | 8b0d55e | 2016-03-31 19:29:36 -0700 | [diff] [blame] | 119 | libpowermanager \ |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 120 | libvulkan \ |
Chia-I Wu | cd8d7f0 | 2016-11-16 11:02:31 +0800 | [diff] [blame] | 121 | libsync \ |
Colin Cross | 6354938 | 2016-10-26 12:52:53 -0700 | [diff] [blame] | 122 | libprotobuf-cpp-lite \ |
Ruchi Kandoi | b5ee178 | 2016-10-04 17:51:50 -0700 | [diff] [blame] | 123 | libbase \ |
Ruchi Kandoi | b5ee178 | 2016-10-04 17:51:50 -0700 | [diff] [blame] | 124 | android.hardware.power@1.0 |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 125 | |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 126 | LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := \ |
| 127 | android.hardware.graphics.allocator@2.0 \ |
| 128 | android.hardware.graphics.composer@2.1 \ |
Yifan Hong | 67a4762 | 2016-11-17 13:02:06 -0800 | [diff] [blame] | 129 | libhidlbase \ |
| 130 | libhidltransport \ |
Chia-I Wu | aab99f5 | 2016-10-05 12:59:58 +0800 | [diff] [blame] | 131 | libhwbinder |
| 132 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 133 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 134 | |
The Android Open Source Project | edbf3b6 | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 135 | include $(BUILD_SHARED_LIBRARY) |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 136 | |
| 137 | ############################################################### |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 138 | # build surfaceflinger's executable |
| 139 | include $(CLEAR_VARS) |
| 140 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 141 | LOCAL_CLANG := true |
Mathias Agopian | 4f4f094 | 2013-08-19 17:26:18 -0700 | [diff] [blame] | 142 | |
Dimitry Ivanov | f06248f | 2016-08-01 14:13:37 -0700 | [diff] [blame] | 143 | LOCAL_LDFLAGS_32 := -Wl,--version-script,art/sigchainlib/version-script32.txt -Wl,--export-dynamic |
| 144 | LOCAL_LDFLAGS_64 := -Wl,--version-script,art/sigchainlib/version-script64.txt -Wl,--export-dynamic |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 145 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 146 | |
Tom Cherry | 7415599 | 2015-08-14 13:01:23 -0700 | [diff] [blame] | 147 | LOCAL_INIT_RC := surfaceflinger.rc |
| 148 | |
Fabien Sanglard | 9d96de4 | 2016-10-11 00:15:18 +0000 | [diff] [blame] | 149 | ifeq ($(TARGET_USES_HWC2),true) |
| 150 | LOCAL_CFLAGS += -DUSE_HWC2 |
| 151 | endif |
| 152 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 153 | LOCAL_SRC_FILES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 154 | main_surfaceflinger.cpp |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 155 | |
| 156 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 157 | libsurfaceflinger \ |
| 158 | libcutils \ |
| 159 | liblog \ |
| 160 | libbinder \ |
| 161 | libutils \ |
Mathias Agopian | a934764 | 2017-02-13 16:42:28 -0800 | [diff] [blame] | 162 | libui \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 163 | libdl |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 164 | |
Dmitriy Ivanov | 4340a14 | 2014-10-20 14:17:26 -0700 | [diff] [blame] | 165 | LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain |
Irvel | c274c63 | 2016-06-13 16:44:08 -0700 | [diff] [blame] | 166 | LOCAL_STATIC_LIBRARIES := libtrace_proto |
Dmitriy Ivanov | 4340a14 | 2014-10-20 14:17:26 -0700 | [diff] [blame] | 167 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 168 | LOCAL_MODULE := surfaceflinger |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 169 | |
Colin Cross | 89450d4 | 2014-02-20 15:36:21 -0800 | [diff] [blame] | 170 | ifdef TARGET_32_BIT_SURFACEFLINGER |
| 171 | LOCAL_32_BIT_ONLY := true |
| 172 | endif |
| 173 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 174 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 175 | |
Mathias Agopian | 7ffaa7c | 2013-07-22 12:20:28 -0700 | [diff] [blame] | 176 | include $(BUILD_EXECUTABLE) |
| 177 | |
| 178 | ############################################################### |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 179 | # uses jni which may not be available in PDK |
| 180 | ifneq ($(wildcard libnativehelper/include),) |
| 181 | include $(CLEAR_VARS) |
Mathias Agopian | 1b3aeb4 | 2012-10-07 16:41:12 -0700 | [diff] [blame] | 182 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 183 | LOCAL_CLANG := true |
| 184 | |
| 185 | LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 186 | |
| 187 | LOCAL_SRC_FILES := \ |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 188 | DdmConnection.cpp |
| 189 | |
| 190 | LOCAL_SHARED_LIBRARIES := \ |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 191 | libcutils \ |
| 192 | liblog \ |
| 193 | libdl |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 194 | |
Dan Stoza | 01049c8 | 2014-11-11 10:32:31 -0800 | [diff] [blame] | 195 | LOCAL_MODULE := libsurfaceflinger_ddmconnection |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 196 | |
Andreas Gampe | 89fd4f7 | 2014-11-13 14:18:56 -0800 | [diff] [blame] | 197 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
| 198 | |
Keun young Park | 63f165f | 2012-08-31 10:53:36 -0700 | [diff] [blame] | 199 | include $(BUILD_SHARED_LIBRARY) |
| 200 | endif # libnativehelper |