Android.mk 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. LOCAL_PATH := $(call my-dir)
  2. include $(CLEAR_VARS)
  3. LOCAL_CLANG := true
  4. LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
  5. LOCAL_SRC_FILES := \
  6. Client.cpp \
  7. DisplayDevice.cpp \
  8. DispSync.cpp \
  9. EventControlThread.cpp \
  10. EventThread.cpp \
  11. FrameTracker.cpp \
  12. Layer.cpp \
  13. LayerDim.cpp \
  14. LayerBlur.cpp \
  15. MessageQueue.cpp \
  16. MonitoredProducer.cpp \
  17. SurfaceFlinger.cpp \
  18. SurfaceFlingerConsumer.cpp \
  19. Transform.cpp \
  20. DisplayHardware/FramebufferSurface.cpp \
  21. DisplayHardware/HWComposer.cpp \
  22. DisplayHardware/PowerHAL.cpp \
  23. DisplayHardware/VirtualDisplaySurface.cpp \
  24. Effects/Daltonizer.cpp \
  25. EventLog/EventLogTags.logtags \
  26. EventLog/EventLog.cpp \
  27. RenderEngine/Description.cpp \
  28. RenderEngine/Mesh.cpp \
  29. RenderEngine/Program.cpp \
  30. RenderEngine/ProgramCache.cpp \
  31. RenderEngine/GLExtensions.cpp \
  32. RenderEngine/RenderEngine.cpp \
  33. RenderEngine/Texture.cpp \
  34. RenderEngine/GLES10RenderEngine.cpp \
  35. RenderEngine/GLES11RenderEngine.cpp \
  36. RenderEngine/GLES20RenderEngine.cpp \
  37. DisplayUtils.cpp
  38. LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
  39. ifeq ($(TARGET_BUILD_VARIANT),userdebug)
  40. LOCAL_CFLAGS += -DDEBUG_CONT_DUMPSYS
  41. endif
  42. LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
  43. ifeq ($(TARGET_BOARD_PLATFORM),omap4)
  44. LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
  45. endif
  46. ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
  47. LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
  48. endif
  49. ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
  50. LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
  51. endif
  52. ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
  53. LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
  54. endif
  55. ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
  56. LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
  57. endif
  58. ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
  59. LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
  60. endif
  61. # See build/target/board/generic/BoardConfig.mk for a description of this setting.
  62. ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
  63. LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
  64. else
  65. LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
  66. endif
  67. # See build/target/board/generic/BoardConfig.mk for a description of this setting.
  68. ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
  69. LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
  70. else
  71. LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
  72. endif
  73. ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
  74. LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
  75. else
  76. LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
  77. endif
  78. ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
  79. LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
  80. else
  81. LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0
  82. endif
  83. ifeq ($(BOARD_USE_BGRA_8888),true)
  84. LOCAL_CFLAGS += -DUSE_BGRA_8888
  85. endif
  86. LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
  87. LOCAL_CFLAGS += -std=c++11
  88. LOCAL_SHARED_LIBRARIES := \
  89. libcutils \
  90. liblog \
  91. libdl \
  92. libhardware \
  93. libutils \
  94. libEGL \
  95. libGLESv1_CM \
  96. libGLESv2 \
  97. libbinder \
  98. libui \
  99. libgui \
  100. libpowermanager
  101. ifeq ($(TARGET_USES_QCOM_BSP), true)
  102. LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc
  103. LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libqdutils
  104. LOCAL_SHARED_LIBRARIES += libqdutils
  105. LOCAL_SHARED_LIBRARIES += libqdMetaData
  106. LOCAL_CFLAGS += -DQTI_BSP
  107. ifeq ($(call is-board-platform-in-list,msm8996),true)
  108. LOCAL_CFLAGS += -DSDM_TARGET
  109. endif
  110. LOCAL_SRC_FILES += \
  111. ExSurfaceFlinger/ExLayer.cpp \
  112. ExSurfaceFlinger/ExSurfaceFlinger.cpp \
  113. ExSurfaceFlinger/ExVirtualDisplaySurface.cpp \
  114. ExSurfaceFlinger/ExHWComposer.cpp
  115. endif
  116. ifeq ($(BOARD_USES_HWC_SERVICES), true)
  117. LOCAL_CFLAGS += -DUSES_HWC_SERVICES
  118. LOCAL_SHARED_LIBRARIES += libExynosHWCService
  119. LOCAL_C_INCLUDES += \
  120. $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
  121. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/$(TARGET_BOARD_PLATFORM)/libhwcService \
  122. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/$(TARGET_BOARD_PLATFORM)/include \
  123. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/$(TARGET_SOC)/include \
  124. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/$(TARGET_SOC)/libhwcmodule \
  125. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/exynos/libhwc \
  126. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/exynos/include \
  127. $(TOP)/hardware/samsung_slsi-$(TARGET_SLSI_VARIANT)/exynos/libexynosutils \
  128. $(TOP)/system/core/libsync/include
  129. LOCAL_ADDITIONAL_DEPENDENCIES := \
  130. $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
  131. endif
  132. LOCAL_MODULE := libsurfaceflinger
  133. LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
  134. include $(BUILD_SHARED_LIBRARY)
  135. ###############################################################
  136. # build surfaceflinger's executable
  137. include $(CLEAR_VARS)
  138. LOCAL_CLANG := true
  139. LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
  140. LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
  141. LOCAL_CPPFLAGS := -std=c++11
  142. ifneq ($(ENABLE_CPUSETS),)
  143. LOCAL_CFLAGS += -DENABLE_CPUSETS
  144. endif
  145. LOCAL_SRC_FILES := \
  146. main_surfaceflinger.cpp
  147. LOCAL_SHARED_LIBRARIES := \
  148. libsurfaceflinger \
  149. libcutils \
  150. liblog \
  151. libbinder \
  152. libutils \
  153. libdl
  154. LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
  155. LOCAL_MODULE := surfaceflinger
  156. ifdef TARGET_32_BIT_SURFACEFLINGER
  157. LOCAL_32_BIT_ONLY := true
  158. endif
  159. LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
  160. include $(BUILD_EXECUTABLE)
  161. ###############################################################
  162. # uses jni which may not be available in PDK
  163. ifneq ($(wildcard libnativehelper/include),)
  164. include $(CLEAR_VARS)
  165. LOCAL_CLANG := true
  166. LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
  167. LOCAL_CPPFLAGS := -std=c++11
  168. LOCAL_SRC_FILES := \
  169. DdmConnection.cpp
  170. LOCAL_SHARED_LIBRARIES := \
  171. libcutils \
  172. liblog \
  173. libdl
  174. LOCAL_MODULE := libsurfaceflinger_ddmconnection
  175. LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
  176. include $(BUILD_SHARED_LIBRARY)
  177. endif # libnativehelper