blob: 888d2f81142d6dd0df3a0f9fcaec3a3f500103b2 [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
Jesse Hall24cd98e2014-07-13 14:37:16 -07004LOCAL_CLANG := true
5
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08006LOCAL_SRC_FILES:= \
Jesse Hall99c7dbb2013-03-14 14:29:29 -07007 Client.cpp \
8 DisplayDevice.cpp \
Jamie Gennisfaf77cc2013-07-30 15:10:32 -07009 DispSync.cpp \
Jamie Gennisd1700752013-10-14 12:22:52 -070010 EventControlThread.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070011 EventThread.cpp \
12 FrameTracker.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070013 Layer.cpp \
14 LayerDim.cpp \
15 MessageQueue.cpp \
Dan Stozab9b08832014-03-13 11:55:57 -070016 MonitoredProducer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070017 SurfaceFlinger.cpp \
18 SurfaceFlingerConsumer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070019 Transform.cpp \
20 DisplayHardware/FramebufferSurface.cpp \
21 DisplayHardware/HWComposer.cpp \
22 DisplayHardware/PowerHAL.cpp \
23 DisplayHardware/VirtualDisplaySurface.cpp \
Mathias Agopianff2ed702013-09-01 21:36:12 -070024 Effects/Daltonizer.cpp \
Mathias Agopian85cce372013-06-04 21:50:31 -070025 EventLog/EventLogTags.logtags \
Mathias Agopian875d8e12013-06-07 15:35:48 -070026 EventLog/EventLog.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070027 RenderEngine/Description.cpp \
28 RenderEngine/Mesh.cpp \
29 RenderEngine/Program.cpp \
30 RenderEngine/ProgramCache.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070031 RenderEngine/GLExtensions.cpp \
32 RenderEngine/RenderEngine.cpp \
Mathias Agopian49457ac2013-08-14 18:20:17 -070033 RenderEngine/Texture.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070034 RenderEngine/GLES10RenderEngine.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070035 RenderEngine/GLES11RenderEngine.cpp \
36 RenderEngine/GLES20RenderEngine.cpp
Mathias Agopian875d8e12013-06-07 15:35:48 -070037
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080038
Mathias Agopian076b1cc2009-04-10 14:24:30 -070039LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
40LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080041
Mathias Agopian5df99622012-06-18 17:27:56 -070042ifeq ($(TARGET_BOARD_PLATFORM),omap4)
Mathias Agopian57bf9e72011-10-07 15:42:53 -070043 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
44endif
Mathias Agopian5df99622012-06-18 17:27:56 -070045ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070046 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070047endif
48
Mathias Agopian5df99622012-06-18 17:27:56 -070049ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070050 LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
Mathias Agopian67226812010-10-11 17:54:43 -070051endif
52
Jesse Hallc354eff2013-10-25 10:44:41 -070053ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
54 LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
Naseer Ahmed6a968462013-10-04 16:15:22 -040055endif
56
Jamie Genniscdbaecb2012-10-12 14:18:10 -070057ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
58 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
59endif
60
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070061ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
62 LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
63endif
64
65# See build/target/board/generic/BoardConfig.mk for a description of this setting.
66ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
67 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
68else
69 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
70endif
71
Jamie Gennis0a645cc2013-10-14 20:52:46 -070072# See build/target/board/generic/BoardConfig.mk for a description of this setting.
73ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
74 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
75else
76 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
77endif
78
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070079ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
80 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
81else
82 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
83endif
84
Mathias Agopianb6df7d02013-05-09 14:53:35 -070085LOCAL_CFLAGS += -fvisibility=hidden
Jesse Hall24cd98e2014-07-13 14:37:16 -070086LOCAL_CFLAGS += -std=c++11
Mathias Agopianb6df7d02013-05-09 14:53:35 -070087
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 \
Ruchi Kandoief472ec2014-04-02 12:50:06 -070099 libgui \
100 libpowermanager
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800101
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800102LOCAL_MODULE:= libsurfaceflinger
103
104include $(BUILD_SHARED_LIBRARY)
Keun young Park63f165f2012-08-31 10:53:36 -0700105
106###############################################################
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700107# build surfaceflinger's executable
108include $(CLEAR_VARS)
109
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700110LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
111
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700112LOCAL_SRC_FILES:= \
113 main_surfaceflinger.cpp
114
115LOCAL_SHARED_LIBRARIES := \
116 libsurfaceflinger \
Mathias Agopian9414d672013-08-23 15:56:38 -0700117 libcutils \
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700118 liblog \
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700119 libbinder \
120 libutils
121
122LOCAL_MODULE:= surfaceflinger
123
Colin Cross89450d42014-02-20 15:36:21 -0800124ifdef TARGET_32_BIT_SURFACEFLINGER
125LOCAL_32_BIT_ONLY := true
126endif
127
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700128include $(BUILD_EXECUTABLE)
129
130###############################################################
Keun young Park63f165f2012-08-31 10:53:36 -0700131# uses jni which may not be available in PDK
132ifneq ($(wildcard libnativehelper/include),)
133include $(CLEAR_VARS)
Mathias Agopian1b3aeb42012-10-07 16:41:12 -0700134LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
135
Keun young Park63f165f2012-08-31 10:53:36 -0700136LOCAL_SRC_FILES:= \
137 DdmConnection.cpp
138
139LOCAL_SHARED_LIBRARIES := \
140 libcutils \
Ying Wang8a0cb4e2013-04-09 21:55:39 -0700141 liblog \
Keun young Park63f165f2012-08-31 10:53:36 -0700142 libdl
143
144LOCAL_MODULE:= libsurfaceflinger_ddmconnection
145
146include $(BUILD_SHARED_LIBRARY)
147endif # libnativehelper