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_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
9LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
10LOCAL_MODULE_RELATIVE_PATH    := hw
11LOCAL_PROPRIETARY_MODULE      := true
12LOCAL_MODULE_TAGS             := optional
13LOCAL_C_INCLUDES              := $(common_includes)
14
15LOCAL_CFLAGS                  := -Wno-missing-field-initializers -Wno-unused-parameter \
16                                 -fcolor-diagnostics\
17                                 -DLOG_TAG=\"SDM\" $(common_flags) \
18                                 -I $(display_top)/sdm/libs/hwc
19
20LOCAL_CLANG                   := true
21
22LOCAL_SHARED_LIBRARIES        := libsdmcore libqservice libbinder libhardware libhardware_legacy \
23                                 libutils libcutils libsync libqdutils libqdMetaData libdl \
24                                 libsdmutils libc++ liblog
25
26ifneq ($(TARGET_USES_GRALLOC1), true)
27    LOCAL_SHARED_LIBRARIES += libmemalloc
28endif
29
30# Allow implicit fallthroughs in hwc_display.cpp until they are fixed.
31LOCAL_CFLAGS                  += -Wno-implicit-fallthrough
32
33LOCAL_SRC_FILES               := hwc_session.cpp \
34                                 hwc_display.cpp \
35                                 hwc_display_primary.cpp \
36                                 hwc_display_external.cpp \
37                                 hwc_display_virtual.cpp \
38                                 ../hwc/hwc_debugger.cpp \
39                                 ../hwc/hwc_buffer_sync_handler.cpp \
40                                 hwc_color_manager.cpp \
41                                 hwc_layers.cpp \
42                                 hwc_callbacks.cpp \
43                                 ../hwc/cpuhint.cpp
44
45ifneq ($(TARGET_USES_GRALLOC1), true)
46    LOCAL_SRC_FILES += ../hwc/hwc_buffer_allocator.cpp
47else
48    LOCAL_SRC_FILES += hwc_buffer_allocator.cpp
49endif
50
51include $(BUILD_SHARED_LIBRARY)
52endif
53