blob: 56c539f6053a2768b0fc0e4110ee980c8565cfc6 [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_SRC_FILES:= \
Jesse Hall99c7dbb2013-03-14 14:29:29 -07005 Client.cpp \
6 DisplayDevice.cpp \
Jamie Gennisfaf77cc2013-07-30 15:10:32 -07007 DispSync.cpp \
Jamie Gennisd1700752013-10-14 12:22:52 -07008 EventControlThread.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -07009 EventThread.cpp \
10 FrameTracker.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070011 Layer.cpp \
12 LayerDim.cpp \
13 MessageQueue.cpp \
Dan Stozab9b08832014-03-13 11:55:57 -070014 MonitoredProducer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070015 SurfaceFlinger.cpp \
16 SurfaceFlingerConsumer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070017 Transform.cpp \
18 DisplayHardware/FramebufferSurface.cpp \
19 DisplayHardware/HWComposer.cpp \
20 DisplayHardware/PowerHAL.cpp \
21 DisplayHardware/VirtualDisplaySurface.cpp \
Mathias Agopianff2ed702013-09-01 21:36:12 -070022 Effects/Daltonizer.cpp \
Mathias Agopian85cce372013-06-04 21:50:31 -070023 EventLog/EventLogTags.logtags \
Mathias Agopian875d8e12013-06-07 15:35:48 -070024 EventLog/EventLog.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070025 RenderEngine/Description.cpp \
26 RenderEngine/Mesh.cpp \
27 RenderEngine/Program.cpp \
28 RenderEngine/ProgramCache.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070029 RenderEngine/GLExtensions.cpp \
30 RenderEngine/RenderEngine.cpp \
Mathias Agopian49457ac2013-08-14 18:20:17 -070031 RenderEngine/Texture.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070032 RenderEngine/GLES10RenderEngine.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070033 RenderEngine/GLES11RenderEngine.cpp \
34 RenderEngine/GLES20RenderEngine.cpp
Mathias Agopian875d8e12013-06-07 15:35:48 -070035
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080036
Mathias Agopian076b1cc2009-04-10 14:24:30 -070037LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
38LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080039
Mathias Agopian5df99622012-06-18 17:27:56 -070040ifeq ($(TARGET_BOARD_PLATFORM),omap4)
Mathias Agopian57bf9e72011-10-07 15:42:53 -070041 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
42endif
Mathias Agopian5df99622012-06-18 17:27:56 -070043ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070044 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070045endif
46
Mathias Agopian5df99622012-06-18 17:27:56 -070047ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070048 LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
Mathias Agopian67226812010-10-11 17:54:43 -070049endif
50
Jesse Hallc354eff2013-10-25 10:44:41 -070051ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
52 LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
Naseer Ahmed6a968462013-10-04 16:15:22 -040053endif
54
Jamie Genniscdbaecb2012-10-12 14:18:10 -070055ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
56 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
57endif
58
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070059ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
60 LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
61endif
62
63# See build/target/board/generic/BoardConfig.mk for a description of this setting.
64ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
65 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
66else
67 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
68endif
69
Jamie Gennis0a645cc2013-10-14 20:52:46 -070070# See build/target/board/generic/BoardConfig.mk for a description of this setting.
71ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
72 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
73else
74 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
75endif
76
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070077ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
78 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
79else
80 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
81endif
82
Mathias Agopianb6df7d02013-05-09 14:53:35 -070083LOCAL_CFLAGS += -fvisibility=hidden
84
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080085LOCAL_SHARED_LIBRARIES := \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070086 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -070087 liblog \
Mathias Agopianc1d359d2012-08-04 20:09:03 -070088 libdl \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080089 libhardware \
90 libutils \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080091 libEGL \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070092 libGLESv1_CM \
Mathias Agopian3f844832013-08-07 21:24:32 -070093 libGLESv2 \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070094 libbinder \
Mathias Agopian9cce3252010-02-09 17:46:37 -080095 libui \
Ruchi Kandoi4098f032014-04-04 18:09:30 -070096 libgui
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080097
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080098LOCAL_MODULE:= libsurfaceflinger
99
100include $(BUILD_SHARED_LIBRARY)
Keun young Park63f165f2012-08-31 10:53:36 -0700101
102###############################################################
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700103# build surfaceflinger's executable
104include $(CLEAR_VARS)
105
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700106LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
107
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700108LOCAL_SRC_FILES:= \
109 main_surfaceflinger.cpp
110
111LOCAL_SHARED_LIBRARIES := \
112 libsurfaceflinger \
Mathias Agopian9414d672013-08-23 15:56:38 -0700113 libcutils \
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700114 liblog \
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700115 libbinder \
116 libutils
117
118LOCAL_MODULE:= surfaceflinger
119
Colin Cross89450d42014-02-20 15:36:21 -0800120ifdef TARGET_32_BIT_SURFACEFLINGER
121LOCAL_32_BIT_ONLY := true
122endif
123
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700124include $(BUILD_EXECUTABLE)
125
126###############################################################
Keun young Park63f165f2012-08-31 10:53:36 -0700127# uses jni which may not be available in PDK
128ifneq ($(wildcard libnativehelper/include),)
129include $(CLEAR_VARS)
Mathias Agopian1b3aeb42012-10-07 16:41:12 -0700130LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
131
Keun young Park63f165f2012-08-31 10:53:36 -0700132LOCAL_SRC_FILES:= \
133 DdmConnection.cpp
134
135LOCAL_SHARED_LIBRARIES := \
136 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -0700137 liblog \
Keun young Park63f165f2012-08-31 10:53:36 -0700138 libdl
139
140LOCAL_MODULE:= libsurfaceflinger_ddmconnection
141
142include $(BUILD_SHARED_LIBRARY)
143endif # libnativehelper