Home | History | Annotate | Download | only in surfaceflinger
      1 LOCAL_PATH := $(call my-dir)
      2 include $(CLEAR_VARS)
      3 
      4 LOCAL_CLANG := true
      5 
      6 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
      7 LOCAL_SRC_FILES := \
      8     Client.cpp \
      9     DisplayDevice.cpp \
     10     DispSync.cpp \
     11     EventControlThread.cpp \
     12     EventThread.cpp \
     13     FenceTracker.cpp \
     14     FrameTracker.cpp \
     15     GpuService.cpp \
     16     Layer.cpp \
     17     LayerDim.cpp \
     18     MessageQueue.cpp \
     19     MonitoredProducer.cpp \
     20     SurfaceFlingerConsumer.cpp \
     21     Transform.cpp \
     22     DisplayHardware/FramebufferSurface.cpp \
     23     DisplayHardware/HWC2.cpp \
     24     DisplayHardware/HWC2On1Adapter.cpp \
     25     DisplayHardware/PowerHAL.cpp \
     26     DisplayHardware/VirtualDisplaySurface.cpp \
     27     Effects/Daltonizer.cpp \
     28     EventLog/EventLogTags.logtags \
     29     EventLog/EventLog.cpp \
     30     RenderEngine/Description.cpp \
     31     RenderEngine/Mesh.cpp \
     32     RenderEngine/Program.cpp \
     33     RenderEngine/ProgramCache.cpp \
     34     RenderEngine/GLExtensions.cpp \
     35     RenderEngine/RenderEngine.cpp \
     36     RenderEngine/Texture.cpp \
     37     RenderEngine/GLES10RenderEngine.cpp \
     38     RenderEngine/GLES11RenderEngine.cpp \
     39     RenderEngine/GLES20RenderEngine.cpp
     40 
     41 LOCAL_C_INCLUDES := \
     42 	frameworks/native/vulkan/include \
     43 	external/vulkan-validation-layers/libs/vkjson
     44 
     45 LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
     46 LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
     47 
     48 ifeq ($(TARGET_USES_HWC2),true)
     49     LOCAL_CFLAGS += -DUSE_HWC2
     50     LOCAL_SRC_FILES += \
     51         SurfaceFlinger.cpp \
     52         DisplayHardware/HWComposer.cpp
     53 else
     54     LOCAL_SRC_FILES += \
     55         SurfaceFlinger_hwc1.cpp \
     56         DisplayHardware/HWComposer_hwc1.cpp
     57 endif
     58 
     59 ifeq ($(TARGET_BOARD_PLATFORM),omap4)
     60     LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
     61 endif
     62 ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
     63     LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
     64 endif
     65 
     66 ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
     67     LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
     68 endif
     69 
     70 ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
     71     LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
     72 endif
     73 
     74 ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
     75     LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
     76 endif
     77 
     78 ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
     79     LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
     80 endif
     81 
     82 # See build/target/board/generic/BoardConfig.mk for a description of this setting.
     83 ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
     84     LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
     85 else
     86     LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
     87 endif
     88 
     89 # See build/target/board/generic/BoardConfig.mk for a description of this setting.
     90 ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
     91     LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
     92 else
     93     LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
     94 endif
     95 
     96 ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
     97     LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
     98 else
     99     LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
    100 endif
    101 
    102 ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
    103     LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
    104 else
    105     LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0
    106 endif
    107 
    108 LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
    109 LOCAL_CFLAGS += -std=c++14
    110 
    111 LOCAL_STATIC_LIBRARIES := libvkjson
    112 LOCAL_SHARED_LIBRARIES := \
    113     libcutils \
    114     liblog \
    115     libdl \
    116     libhardware \
    117     libutils \
    118     libEGL \
    119     libGLESv1_CM \
    120     libGLESv2 \
    121     libbinder \
    122     libui \
    123     libgui \
    124     libpowermanager \
    125     libvulkan
    126 
    127 LOCAL_MODULE := libsurfaceflinger
    128 
    129 LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
    130 
    131 include $(BUILD_SHARED_LIBRARY)
    132 
    133 ###############################################################
    134 # build surfaceflinger's executable
    135 include $(CLEAR_VARS)
    136 
    137 LOCAL_CLANG := true
    138 
    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++14
    142 
    143 LOCAL_INIT_RC := surfaceflinger.rc
    144 
    145 ifneq ($(ENABLE_CPUSETS),)
    146     LOCAL_CFLAGS += -DENABLE_CPUSETS
    147 endif
    148 
    149 ifeq ($(TARGET_USES_HWC2),true)
    150     LOCAL_CFLAGS += -DUSE_HWC2
    151 endif
    152 
    153 LOCAL_SRC_FILES := \
    154     main_surfaceflinger.cpp
    155 
    156 LOCAL_SHARED_LIBRARIES := \
    157     libsurfaceflinger \
    158     libcutils \
    159     liblog \
    160     libbinder \
    161     libutils \
    162     libdl
    163 
    164 LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
    165 
    166 LOCAL_MODULE := surfaceflinger
    167 
    168 ifdef TARGET_32_BIT_SURFACEFLINGER
    169 LOCAL_32_BIT_ONLY := true
    170 endif
    171 
    172 LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
    173 
    174 include $(BUILD_EXECUTABLE)
    175 
    176 ###############################################################
    177 # uses jni which may not be available in PDK
    178 ifneq ($(wildcard libnativehelper/include),)
    179 include $(CLEAR_VARS)
    180 
    181 LOCAL_CLANG := true
    182 
    183 LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
    184 LOCAL_CPPFLAGS := -std=c++14
    185 
    186 LOCAL_SRC_FILES := \
    187     DdmConnection.cpp
    188 
    189 LOCAL_SHARED_LIBRARIES := \
    190     libcutils \
    191     liblog \
    192     libdl
    193 
    194 LOCAL_MODULE := libsurfaceflinger_ddmconnection
    195 
    196 LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
    197 
    198 include $(BUILD_SHARED_LIBRARY)
    199 endif # libnativehelper
    200