1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3 4LOCAL_SRC_FILES:= \ 5 Client.cpp \ 6 DisplayDevice.cpp \ 7 DispSync.cpp \ 8 EventControlThread.cpp \ 9 EventThread.cpp \ 10 FrameTracker.cpp \ 11 Layer.cpp \ 12 LayerDim.cpp \ 13 MessageQueue.cpp \ 14 SurfaceFlinger.cpp \ 15 SurfaceFlingerConsumer.cpp \ 16 SurfaceTextureLayer.cpp \ 17 Transform.cpp \ 18 DisplayHardware/FramebufferSurface.cpp \ 19 DisplayHardware/HWComposer.cpp \ 20 DisplayHardware/PowerHAL.cpp \ 21 DisplayHardware/VirtualDisplaySurface.cpp \ 22 Effects/Daltonizer.cpp \ 23 EventLog/EventLogTags.logtags \ 24 EventLog/EventLog.cpp \ 25 RenderEngine/Description.cpp \ 26 RenderEngine/Mesh.cpp \ 27 RenderEngine/Program.cpp \ 28 RenderEngine/ProgramCache.cpp \ 29 RenderEngine/GLExtensions.cpp \ 30 RenderEngine/RenderEngine.cpp \ 31 RenderEngine/Texture.cpp \ 32 RenderEngine/GLES10RenderEngine.cpp \ 33 RenderEngine/GLES11RenderEngine.cpp \ 34 RenderEngine/GLES20RenderEngine.cpp 35 36 37LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" 38LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES 39 40ifeq ($(TARGET_BOARD_PLATFORM),omap3) 41 LOCAL_CFLAGS += -DNO_RGBX_8888 42endif 43ifeq ($(TARGET_BOARD_PLATFORM),omap4) 44 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY 45endif 46ifeq ($(TARGET_BOARD_PLATFORM),s5pc110) 47 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY 48endif 49 50ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true) 51 LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING 52endif 53 54ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true) 55 LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS 56endif 57 58ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),) 59 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS) 60endif 61 62ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true) 63 LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK 64endif 65 66# See build/target/board/generic/BoardConfig.mk for a description of this setting. 67ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),) 68 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS) 69else 70 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0 71endif 72 73# See build/target/board/generic/BoardConfig.mk for a description of this setting. 74ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),) 75 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS) 76else 77 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0 78endif 79 80ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),) 81 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS) 82else 83 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0 84endif 85 86LOCAL_CFLAGS += -fvisibility=hidden 87 88LOCAL_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 101LOCAL_MODULE:= libsurfaceflinger 102 103include $(BUILD_SHARED_LIBRARY) 104 105############################################################### 106# build surfaceflinger's executable 107include $(CLEAR_VARS) 108 109LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" 110 111LOCAL_SRC_FILES:= \ 112 main_surfaceflinger.cpp 113 114LOCAL_SHARED_LIBRARIES := \ 115 libsurfaceflinger \ 116 libcutils \ 117 liblog \ 118 libbinder \ 119 libutils 120 121LOCAL_MODULE:= surfaceflinger 122 123include $(BUILD_EXECUTABLE) 124 125############################################################### 126# uses jni which may not be available in PDK 127ifneq ($(wildcard libnativehelper/include),) 128include $(CLEAR_VARS) 129LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" 130 131LOCAL_SRC_FILES:= \ 132 DdmConnection.cpp 133 134LOCAL_SHARED_LIBRARIES := \ 135 libcutils \ 136 liblog \ 137 libdl 138 139LOCAL_MODULE:= libsurfaceflinger_ddmconnection 140 141include $(BUILD_SHARED_LIBRARY) 142endif # libnativehelper 143