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
18ifeq ($(TARGET_EXCLUDES_DISPLAY_PP), true)
19LOCAL_CFLAGS += -DEXCLUDE_DISPLAY_PP
20endif
21
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 libhidltransport \
29                                 libui libgpu_tonemapper
30
31ifneq ($(TARGET_USES_GRALLOC1), true)
32    LOCAL_SHARED_LIBRARIES += libmemalloc
33endif
34
35ifeq ($(display_config_version), DISPLAY_CONFIG_1_1)
36LOCAL_SHARED_LIBRARIES        += vendor.display.config@1.1
37endif
38
39LOCAL_SRC_FILES               := hwc_session.cpp \
40                                 hwc_session_services.cpp \
41                                 hwc_display.cpp \
42                                 hwc_display_primary.cpp \
43                                 hwc_display_external.cpp \
44                                 hwc_display_virtual.cpp \
45                                 ../hwc/hwc_debugger.cpp \
46                                 ../hwc/hwc_buffer_sync_handler.cpp \
47                                 hwc_color_manager.cpp \
48                                 hwc_layers.cpp \
49                                 hwc_callbacks.cpp \
50                                 ../hwc/cpuhint.cpp \
51                                 ../hwc/hwc_socket_handler.cpp \
52                                 display_null.cpp \
53                                 hwc_tonemapper.cpp \
54                                 hwc_display_external_test.cpp
55
56ifneq ($(TARGET_USES_GRALLOC1), true)
57    LOCAL_SRC_FILES += ../hwc/hwc_buffer_allocator.cpp
58else
59    LOCAL_SRC_FILES += hwc_buffer_allocator.cpp
60endif
61
62ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY), true)
63    LOCAL_CFLAGS += -DFEATURE_WIDE_COLOR
64endif
65
66include $(BUILD_SHARED_LIBRARY)
67endif
68