blob: 3d71aa820a01368295e0f05a2a11139bca734acc [file] [log] [blame]
Dan Stoza01049c82014-11-11 10:32:31 -08001LOCAL_PATH := $(call my-dir)
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08002include $(CLEAR_VARS)
3
Jesse Hall24cd98e2014-07-13 14:37:16 -07004LOCAL_CLANG := true
5
Jesse Halle9b23b62014-07-14 15:32:59 -07006LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Dan Stoza01049c82014-11-11 10:32:31 -08007LOCAL_SRC_FILES := \
Jesse Hall99c7dbb2013-03-14 14:29:29 -07008 Client.cpp \
9 DisplayDevice.cpp \
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070010 DispSync.cpp \
Jamie Gennisd1700752013-10-14 12:22:52 -070011 EventControlThread.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070012 EventThread.cpp \
13 FrameTracker.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070014 Layer.cpp \
15 LayerDim.cpp \
16 MessageQueue.cpp \
Dan Stozab9b08832014-03-13 11:55:57 -070017 MonitoredProducer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070018 SurfaceFlinger.cpp \
19 SurfaceFlingerConsumer.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070020 Transform.cpp \
21 DisplayHardware/FramebufferSurface.cpp \
Dan Stoza651bf312015-10-23 17:03:17 -070022 DisplayHardware/HWC2.cpp \
Dan Stozac6998d22015-09-24 17:03:36 -070023 DisplayHardware/HWC2On1Adapter.cpp \
Jesse Hall99c7dbb2013-03-14 14:29:29 -070024 DisplayHardware/HWComposer.cpp \
25 DisplayHardware/PowerHAL.cpp \
26 DisplayHardware/VirtualDisplaySurface.cpp \
Mathias Agopianff2ed702013-09-01 21:36:12 -070027 Effects/Daltonizer.cpp \
Mathias Agopian85cce372013-06-04 21:50:31 -070028 EventLog/EventLogTags.logtags \
Mathias Agopian875d8e12013-06-07 15:35:48 -070029 EventLog/EventLog.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070030 RenderEngine/Description.cpp \
31 RenderEngine/Mesh.cpp \
32 RenderEngine/Program.cpp \
33 RenderEngine/ProgramCache.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070034 RenderEngine/GLExtensions.cpp \
35 RenderEngine/RenderEngine.cpp \
Mathias Agopian49457ac2013-08-14 18:20:17 -070036 RenderEngine/Texture.cpp \
Mathias Agopian875d8e12013-06-07 15:35:48 -070037 RenderEngine/GLES10RenderEngine.cpp \
Mathias Agopian3f844832013-08-07 21:24:32 -070038 RenderEngine/GLES11RenderEngine.cpp \
39 RenderEngine/GLES20RenderEngine.cpp
Mathias Agopian875d8e12013-06-07 15:35:48 -070040
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080041
Dan Stoza01049c82014-11-11 10:32:31 -080042LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
Mathias Agopian076b1cc2009-04-10 14:24:30 -070043LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080044
Mathias Agopian5df99622012-06-18 17:27:56 -070045ifeq ($(TARGET_BOARD_PLATFORM),omap4)
Andreas Gampe89fd4f72014-11-13 14:18:56 -080046 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
Mathias Agopian57bf9e72011-10-07 15:42:53 -070047endif
Mathias Agopian5df99622012-06-18 17:27:56 -070048ifeq ($(TARGET_BOARD_PLATFORM),s5pc110)
Andreas Gampe89fd4f72014-11-13 14:18:56 -080049 LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
Mathias Agopian7f42a9c2012-04-23 20:00:16 -070050endif
51
Mathias Agopian5df99622012-06-18 17:27:56 -070052ifeq ($(TARGET_DISABLE_TRIPLE_BUFFERING),true)
Andreas Gampe89fd4f72014-11-13 14:18:56 -080053 LOCAL_CFLAGS += -DTARGET_DISABLE_TRIPLE_BUFFERING
Mathias Agopian67226812010-10-11 17:54:43 -070054endif
55
Jesse Hallc354eff2013-10-25 10:44:41 -070056ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
57 LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
Naseer Ahmed6a968462013-10-04 16:15:22 -040058endif
59
Jamie Genniscdbaecb2012-10-12 14:18:10 -070060ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
Andreas Gampe89fd4f72014-11-13 14:18:56 -080061 LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
Jamie Genniscdbaecb2012-10-12 14:18:10 -070062endif
63
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070064ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
65 LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
66endif
67
68# See build/target/board/generic/BoardConfig.mk for a description of this setting.
69ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
70 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
71else
72 LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=0
73endif
74
Jamie Gennis0a645cc2013-10-14 20:52:46 -070075# See build/target/board/generic/BoardConfig.mk for a description of this setting.
76ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
77 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
78else
79 LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=0
80endif
81
Jamie Gennisfaf77cc2013-07-30 15:10:32 -070082ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
83 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
84else
85 LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
86endif
87
Dan Stoza1f3efb12014-10-15 16:34:55 -070088ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
89 LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
90else
91 LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=0
92endif
93
Michael Lentine7306c672014-07-30 13:00:37 -070094LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
Dan Stoza1665c8e2015-01-27 10:32:10 -080095LOCAL_CFLAGS += -std=c++11
Mathias Agopianb6df7d02013-05-09 14:53:35 -070096
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080097LOCAL_SHARED_LIBRARIES := \
Andreas Gampe89fd4f72014-11-13 14:18:56 -080098 libcutils \
99 liblog \
100 libdl \
101 libhardware \
102 libutils \
103 libEGL \
104 libGLESv1_CM \
105 libGLESv2 \
106 libbinder \
107 libui \
108 libgui \
109 libpowermanager
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800110
Dan Stoza01049c82014-11-11 10:32:31 -0800111LOCAL_MODULE := libsurfaceflinger
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800112
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800113LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
114
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800115include $(BUILD_SHARED_LIBRARY)
Keun young Park63f165f2012-08-31 10:53:36 -0700116
117###############################################################
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700118# build surfaceflinger's executable
119include $(CLEAR_VARS)
120
Dan Stoza01049c82014-11-11 10:32:31 -0800121LOCAL_CLANG := true
Mathias Agopian4f4f0942013-08-19 17:26:18 -0700122
Dan Stoza01049c82014-11-11 10:32:31 -0800123LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
124LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
125LOCAL_CPPFLAGS := -std=c++11
126
Tom Cherry74155992015-08-14 13:01:23 -0700127LOCAL_INIT_RC := surfaceflinger.rc
128
Tim Murrayac8d2392015-11-10 14:29:45 -0800129ifneq ($(ENABLE_CPUSETS),)
130 LOCAL_CFLAGS += -DENABLE_CPUSETS
131endif
132
Dan Stoza01049c82014-11-11 10:32:31 -0800133LOCAL_SRC_FILES := \
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800134 main_surfaceflinger.cpp
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700135
136LOCAL_SHARED_LIBRARIES := \
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800137 libsurfaceflinger \
138 libcutils \
139 liblog \
140 libbinder \
141 libutils \
142 libdl
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700143
Dmitriy Ivanov4340a142014-10-20 14:17:26 -0700144LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
145
Dan Stoza01049c82014-11-11 10:32:31 -0800146LOCAL_MODULE := surfaceflinger
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700147
Colin Cross89450d42014-02-20 15:36:21 -0800148ifdef TARGET_32_BIT_SURFACEFLINGER
149LOCAL_32_BIT_ONLY := true
150endif
151
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800152LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
153
Mathias Agopian7ffaa7c2013-07-22 12:20:28 -0700154include $(BUILD_EXECUTABLE)
155
156###############################################################
Keun young Park63f165f2012-08-31 10:53:36 -0700157# uses jni which may not be available in PDK
158ifneq ($(wildcard libnativehelper/include),)
159include $(CLEAR_VARS)
Mathias Agopian1b3aeb42012-10-07 16:41:12 -0700160
Dan Stoza01049c82014-11-11 10:32:31 -0800161LOCAL_CLANG := true
162
163LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
164LOCAL_CPPFLAGS := -std=c++11
165
166LOCAL_SRC_FILES := \
Keun young Park63f165f2012-08-31 10:53:36 -0700167 DdmConnection.cpp
168
169LOCAL_SHARED_LIBRARIES := \
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800170 libcutils \
171 liblog \
172 libdl
Keun young Park63f165f2012-08-31 10:53:36 -0700173
Dan Stoza01049c82014-11-11 10:32:31 -0800174LOCAL_MODULE := libsurfaceflinger_ddmconnection
Keun young Park63f165f2012-08-31 10:53:36 -0700175
Andreas Gampe89fd4f72014-11-13 14:18:56 -0800176LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
177
Keun young Park63f165f2012-08-31 10:53:36 -0700178include $(BUILD_SHARED_LIBRARY)
179endif # libnativehelper