1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3include $(LOCAL_PATH)/../../../common.mk
4
5LOCAL_MODULE                  := libsdmcore
6LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
7LOCAL_LICENSE_CONDITIONS      := notice
8LOCAL_VENDOR_MODULE           := true
9LOCAL_MODULE_TAGS             := optional
10LOCAL_C_INCLUDES              := $(common_includes) $(kernel_includes)
11LOCAL_HEADER_LIBRARIES        := display_headers
12LOCAL_CFLAGS                  := -Wno-unused-parameter -DLOG_TAG=\"SDM\" \
13                                 $(common_flags)
14ifeq ($(use_hwc2),false)
15  LOCAL_CFLAGS += -DUSE_SPECULATIVE_FENCES
16endif
17LOCAL_HW_INTF_PATH_1          := fb
18LOCAL_SHARED_LIBRARIES        := libdl libsdmutils
19
20ifneq ($(TARGET_IS_HEADLESS), true)
21    LOCAL_CFLAGS              += -isystem external/libdrm
22    LOCAL_SHARED_LIBRARIES    += libdrm libdrmutils
23    LOCAL_HW_INTF_PATH_2      := drm
24endif
25
26ifeq ($(TARGET_USES_DRM_PP),true)
27    LOCAL_CFLAGS              += -DPP_DRM_ENABLE
28endif
29
30LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
31LOCAL_SRC_FILES               := core_interface.cpp \
32                                 core_impl.cpp \
33                                 display_base.cpp \
34                                 display_primary.cpp \
35                                 display_hdmi.cpp \
36                                 display_virtual.cpp \
37                                 comp_manager.cpp \
38                                 strategy.cpp \
39                                 resource_default.cpp \
40                                 dump_impl.cpp \
41                                 color_manager.cpp \
42                                 hw_events_interface.cpp \
43                                 hw_info_interface.cpp \
44                                 hw_interface.cpp \
45                                 $(LOCAL_HW_INTF_PATH_1)/hw_info.cpp \
46                                 $(LOCAL_HW_INTF_PATH_1)/hw_device.cpp \
47                                 $(LOCAL_HW_INTF_PATH_1)/hw_primary.cpp \
48                                 $(LOCAL_HW_INTF_PATH_1)/hw_hdmi.cpp \
49                                 $(LOCAL_HW_INTF_PATH_1)/hw_virtual.cpp \
50                                 $(LOCAL_HW_INTF_PATH_1)/hw_color_manager.cpp \
51                                 $(LOCAL_HW_INTF_PATH_1)/hw_scale.cpp \
52                                 $(LOCAL_HW_INTF_PATH_1)/hw_events.cpp
53
54ifneq ($(TARGET_IS_HEADLESS), true)
55    LOCAL_SRC_FILES           += $(LOCAL_HW_INTF_PATH_2)/hw_info_drm.cpp \
56                                 $(LOCAL_HW_INTF_PATH_2)/hw_device_drm.cpp \
57                                 $(LOCAL_HW_INTF_PATH_2)/hw_events_drm.cpp \
58                                 $(LOCAL_HW_INTF_PATH_2)/hw_color_manager_drm.cpp
59endif
60
61include $(BUILD_SHARED_LIBRARY)
62
63SDM_HEADER_PATH := ../../include
64include $(CLEAR_VARS)
65LOCAL_VENDOR_MODULE           := true
66LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/core
67LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/core/buffer_allocator.h \
68                                 $(SDM_HEADER_PATH)/core/buffer_sync_handler.h \
69                                 $(SDM_HEADER_PATH)/core/core_interface.h \
70                                 $(SDM_HEADER_PATH)/core/debug_interface.h \
71                                 $(SDM_HEADER_PATH)/core/display_interface.h \
72                                 $(SDM_HEADER_PATH)/core/dump_interface.h \
73                                 $(SDM_HEADER_PATH)/core/layer_buffer.h \
74                                 $(SDM_HEADER_PATH)/core/layer_stack.h \
75                                 $(SDM_HEADER_PATH)/core/sdm_types.h \
76                                 $(SDM_HEADER_PATH)/core/socket_handler.h
77include $(BUILD_COPY_HEADERS)
78
79include $(CLEAR_VARS)
80LOCAL_VENDOR_MODULE           := true
81LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/private
82LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/private/color_interface.h \
83                                 $(SDM_HEADER_PATH)/private/color_params.h \
84                                 $(SDM_HEADER_PATH)/private/extension_interface.h \
85                                 $(SDM_HEADER_PATH)/private/hw_info_types.h \
86                                 $(SDM_HEADER_PATH)/private/partial_update_interface.h \
87                                 $(SDM_HEADER_PATH)/private/resource_interface.h \
88                                 $(SDM_HEADER_PATH)/private/strategy_interface.h \
89                                 $(SDM_HEADER_PATH)/private/dpps_control_interface.h
90include $(BUILD_COPY_HEADERS)
91