1 # Copyright (c) 2017 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 LOCAL_PATH:= $(call my-dir)
19 LOCAL_SHARED_LIBRARIES := \
32 system/core/include/utils \
33 $(LOCAL_PATH)/../public \
35 $(LOCAL_PATH)/compositor \
36 $(LOCAL_PATH)/compositor/gl \
37 $(LOCAL_PATH)/display \
40 $(LOCAL_PATH)/../os/android \
41 $(LOCAL_PATH)/../wsi \
42 $(LOCAL_PATH)/../wsi/drm
45 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
46 LOCAL_SHARED_LIBRARIES += \
48 LOCAL_STATIC_LIBRARIES += \
50 LOCAL_HEADER_LIBRARIES += \
56 ifeq ($(strip $(BOARD_CURSOR_WA)), true)
58 -DDISABLE_CURSOR_PLANE
62 # -DENABLE_DOWNSCALING
65 compositor/compositor.cpp \
66 compositor/compositorthread.cpp \
67 compositor/factory.cpp \
68 compositor/nativesurface.cpp \
69 compositor/renderstate.cpp \
72 core/resourcemanager.cpp \
73 core/framebuffermanager.cpp \
74 core/logicaldisplay.cpp \
75 core/logicaldisplaymanager.cpp \
76 core/mosaicdisplay.cpp \
77 core/overlaylayer.cpp \
78 display/displayplanemanager.cpp \
79 display/displayplanestate.cpp \
80 display/displayqueue.cpp \
81 display/vblankeventhandler.cpp \
82 display/virtualdisplay.cpp \
87 utils/disjoint_layers.cpp
89 ifeq ($(strip $(ENABLE_HYPER_DMABUF_SHARING)), true)
90 LOCAL_CPPFLAGS += -DENABLE_PANORAMA
91 LOCAL_SRC_FILES += display/virtualpanoramadisplay.cpp
94 ifneq ($(strip $(HWC_DISABLE_VA_DRIVER)), true)
95 LOCAL_SHARED_LIBRARIES += \
99 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libva
101 LOCAL_SRC_FILES += compositor/va/varenderer.cpp \
102 compositor/va/vautils.cpp
108 LOCAL_CPPFLAGS += -DDISABLE_VA
111 ifeq ($(strip $(ENABLE_HYPER_DMABUF_SHARING)), true)
112 LOCAL_CPPFLAGS += -DHYPER_DMABUF_SHARING
115 ifeq ($(strip $(TARGET_USES_HWC2)), false)
116 LOCAL_C_INCLUDES += \
117 system/core/libsync \
118 system/core/libsync/include
120 LOCAL_SHARED_LIBRARIES += \
123 LOCAL_CPPFLAGS += -DENABLE_DOUBLE_BUFFERING
127 -DHWC2_INCLUDE_STRINGIFICATION \
131 -D_FORTIFY_SOURCE=2 \
132 -fstack-protector-strong \
133 -Wformat -Wformat-security \
134 -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
135 -Wall -Wsign-compare -Wpointer-arith \
136 -Wcast-qual -Wcast-align \
137 -DLOCK_DIR_PREFIX='"/vendor/etc"' \
138 -DHWC_DISPLAY_INI_PATH='"/vendor/etc/hwc_display.ini"' \
139 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
140 -Wno-unused-parameter \
143 LOCAL_CPPFLAGS += -DVA_SUPPORT_COLOR_RANGE
145 ifeq ($(strip $(BOARD_USES_VULKAN)), true)
146 LOCAL_SHARED_LIBRARIES += \
151 -DDISABLE_EXPLICIT_SYNC
153 LOCAL_C_INCLUDES += \
154 $(LOCAL_PATH)/compositor/vk \
155 $(LOCAL_PATH)/../../mesa/include
158 compositor/vk/vkprogram.cpp \
159 compositor/vk/vkrenderer.cpp \
160 compositor/vk/vksurface.cpp \
161 compositor/vk/nativevkresource.cpp \
162 compositor/vk/vkshim.cpp
166 -DPREBUILT_SHADER_FILE_PATH='"/vendor/etc"'
169 compositor/gl/glprogram.cpp \
170 compositor/gl/glrenderer.cpp \
171 compositor/gl/glsurface.cpp \
172 compositor/gl/egloffscreencontext.cpp \
173 compositor/gl/nativeglresource.cpp \
174 compositor/gl/shim.cpp
177 LOCAL_C_INCLUDES += \
178 $(INTEL_MINIGBM)/cros_gralloc/
180 LOCAL_MODULE := libhwcomposer_common
181 LOCAL_CFLAGS += -fvisibility=default
182 LOCAL_LDFLAGS += -no-undefined
183 LOCAL_PROPRIETARY_MODULE := true
184 include $(BUILD_STATIC_LIBRARY)