blob: c3daa64d9f1c607f58ec3a96d6e249516c3f6683 [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 \
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 \
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),omap3)
Mathias Agopiana5529c82010-12-07 19:38:17 -080041 LOCAL_CFLAGS += -DNO_RGBX_8888
Mathias Agopiana8f3e4e2010-06-30 15:43:47 -070042endif
Mathias Agopian5df99622012-06-18 17:27:56 -070043ifeq ($(TARGET_BOARD_PLATFORM),omap4)
Mathias Agopian57bf9e72011-10-07 15:42:53 -070044 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
45endif
Mathias Agopian5df99622012-06-18 17:27:56 -070046ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070047 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070048endif
49
Mathias Agopian5df99622012-06-18 17:27:56 -070050ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070051 LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
Mathias Agopian67226812010-10-11 17:54:43 -070052endif
53
Jamie Genniscdbaecb2012-10-12 14:18:10 -070054ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
55 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
56endif
57
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070058ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
59 LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
60endif
61
62# See build/target/board/generic/BoardConfig.mk for a description of this setting.
63ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
64 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
65else
66 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
67endif
68
Jamie Gennis0a645cc2013-10-14 20:52:46 -070069# See build/target/board/generic/BoardConfig.mk for a description of this setting.
70ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
71 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
72else
73 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
74endif
75
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070076ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
77 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
78else
79 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
80endif
81
Mathias Agopianb6df7d02013-05-09 14:53:35 -070082LOCAL_CFLAGS += -fvisibility=hidden
83
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080084LOCAL_SHARED_LIBRARIES := \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070085 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -070086 liblog \
Mathias Agopianc1d359d2012-08-04 20:09:03 -070087 libdl \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080088 libhardware \
89 libutils \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080090 libEGL \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070091 libGLESv1_CM \
Mathias Agopian3f844832013-08-07 21:24:32 -070092 libGLESv2 \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070093 libbinder \
Mathias Agopian9cce3252010-02-09 17:46:37 -080094 libui \
Mathias Agopiand87f1622011-03-25 18:42:40 -070095 libgui
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080096
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080097LOCAL_MODULE:= libsurfaceflinger
98
99include $(BUILD_SHARED_LIBRARY)
Keun young Park63f165f2012-08-31 10:53:36 -0700100
101###############################################################
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700102# build surfaceflinger's executable
103include $(CLEAR_VARS)
104
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700105LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
106
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700107LOCAL_SRC_FILES:= \
108 main_surfaceflinger.cpp
109
110LOCAL_SHARED_LIBRARIES := \
111 libsurfaceflinger \
Mathias Agopian9414d672013-08-23 15:56:38 -0700112 libcutils \
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700113 liblog \
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700114 libbinder \
115 libutils
116
117LOCAL_MODULE:= surfaceflinger
118
119include $(BUILD_EXECUTABLE)
120
121###############################################################
Keun young Park63f165f2012-08-31 10:53:36 -0700122# uses jni which may not be available in PDK
123ifneq ($(wildcard libnativehelper/include),)
124include $(CLEAR_VARS)
Mathias Agopian1b3aeb42012-10-07 16:41:12 -0700125LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
126
Keun young Park63f165f2012-08-31 10:53:36 -0700127LOCAL_SRC_FILES:= \
128 DdmConnection.cpp
129
130LOCAL_SHARED_LIBRARIES := \
131 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -0700132 liblog \
Keun young Park63f165f2012-08-31 10:53:36 -0700133 libdl
134
135LOCAL_MODULE:= libsurfaceflinger_ddmconnection
136
137include $(BUILD_SHARED_LIBRARY)
138endif # libnativehelper