blob: b2bc550c9ecf92cfa398e940e8a19f9848f873c5 [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
Jesse Hallc354eff2013-10-25 10:44:41 -070054ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
55 LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
Naseer Ahmed6a968462013-10-04 16:15:22 -040056endif
57
Jamie Genniscdbaecb2012-10-12 14:18:10 -070058ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
59 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
60endif
61
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070062ifeq ($(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
Jamie Gennis0a645cc2013-10-14 20:52:46 -070073# 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
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070080ifneq ($(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
Mathias Agopianb6df7d02013-05-09 14:53:35 -070086LOCAL_CFLAGS += -fvisibility=hidden
87
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080088LOCAL_SHARED_LIBRARIES := \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070089 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -070090 liblog \
Mathias Agopianc1d359d2012-08-04 20:09:03 -070091 libdl \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080092 libhardware \
93 libutils \
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080094 libEGL \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070095 libGLESv1_CM \
Mathias Agopian3f844832013-08-07 21:24:32 -070096 libGLESv2 \
Mathias Agopianaf54ab92009-07-02 19:04:39 -070097 libbinder \
Mathias Agopian9cce3252010-02-09 17:46:37 -080098 libui \
Mathias Agopiand87f1622011-03-25 18:42:40 -070099 libgui
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800100
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800101LOCAL_MODULE:= libsurfaceflinger
102
103include $(BUILD_SHARED_LIBRARY)
Keun young Park63f165f2012-08-31 10:53:36 -0700104
105###############################################################
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700106# build surfaceflinger's executable
107include $(CLEAR_VARS)
108
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700109LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
110
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700111LOCAL_SRC_FILES:= \
112 main_surfaceflinger.cpp
113
114LOCAL_SHARED_LIBRARIES := \
115 libsurfaceflinger \
Mathias Agopian9414d672013-08-23 15:56:38 -0700116 libcutils \
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700117 liblog \
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700118 libbinder \
119 libutils
120
121LOCAL_MODULE:= surfaceflinger
122
123include $(BUILD_EXECUTABLE)
124
125###############################################################
Keun young Park63f165f2012-08-31 10:53:36 -0700126# uses jni which may not be available in PDK
127ifneq ($(wildcard libnativehelper/include),)
128include $(CLEAR_VARS)
Mathias Agopian1b3aeb42012-10-07 16:41:12 -0700129LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
130
Keun young Park63f165f2012-08-31 10:53:36 -0700131LOCAL_SRC_FILES:= \
132 DdmConnection.cpp
133
134LOCAL_SHARED_LIBRARIES := \
135 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -0700136 liblog \
Keun young Park63f165f2012-08-31 10:53:36 -0700137 libdl
138
139LOCAL_MODULE:= libsurfaceflinger_ddmconnection
140
141include $(BUILD_SHARED_LIBRARY)
142endif # libnativehelper