1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3include $(LOCAL_PATH)/../../../common.mk
4
5ifeq ($(use_hwc2),true)
6
7LOCAL_MODULE                  := hwcomposer.$(TARGET_BOARD_PLATFORM)
8LOCAL_VENDOR_MODULE           := true
9LOCAL_MODULE_RELATIVE_PATH    := hw
10LOCAL_MODULE_TAGS             := optional
11LOCAL_C_INCLUDES              := $(common_includes)
12LOCAL_HEADER_LIBRARIES        := display_headers
13
14LOCAL_CFLAGS                  := -Wno-missing-field-initializers -Wno-unused-parameter \
15                                 -std=c++11 -fcolor-diagnostics\
16                                 -DLOG_TAG=\"SDM\" $(common_flags) \
17                                 -I $(display_top)/sdm/libs/hwc
18
19ifeq ($(TARGET_EXCLUDES_DISPLAY_PP), true)
20LOCAL_CFLAGS                  += -DEXCLUDE_DISPLAY_PP
21endif
22LOCAL_CLANG                   := true
23
24# TODO: Remove libui after addressing gpu_tonemapper issues
25LOCAL_SHARED_LIBRARIES        := libsdmcore libqservice libbinder libhardware libhardware_legacy \
26                                 libutils libcutils libsync libqdutils libqdMetaData libdl libdrmutils \
27                                 libsdmutils libc++ liblog libgrallocutils libdl \
28                                 vendor.display.config@1.0 libhidlbase \
29                                 libui libgpu_tonemapper
30
31ifneq ($(TARGET_USES_GRALLOC1), true)
32    LOCAL_SHARED_LIBRARIES += libmemalloc
33endif
34
35# Allow implicit fallthroughs in hwc_display.cpp until they are fixed.
36LOCAL_CFLAGS                  += -Wno-implicit-fallthrough
37
38LOCAL_SRC_FILES               := hwc_session.cpp \
39                                 hwc_session_services.cpp \
40                                 hwc_display.cpp \
41                                 hwc_display_primary.cpp \
42                                 hwc_display_external.cpp \
43                                 hwc_display_virtual.cpp \
44                                 ../hwc/hwc_debugger.cpp \
45                                 ../hwc/hwc_buffer_sync_handler.cpp \
46                                 hwc_color_manager.cpp \
47                                 hwc_layers.cpp \
48                                 hwc_callbacks.cpp \
49                                 ../hwc/cpuhint.cpp \
50                                 ../hwc/hwc_socket_handler.cpp \
51                                 display_null.cpp \
52                                 hwc_tonemapper.cpp
53
54ifneq ($(TARGET_USES_GRALLOC1), true)
55    LOCAL_SRC_FILES += ../hwc/hwc_buffer_allocator.cpp
56else
57    LOCAL_SRC_FILES += hwc_buffer_allocator.cpp
58endif
59
60ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY), true)
61    LOCAL_CFLAGS += -DFEATURE_WIDE_COLOR
62endif
63
64include $(BUILD_SHARED_LIBRARY)
65endif
66