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)
14LOCAL_HW_INTF_PATH_1          := fb
15LOCAL_SHARED_LIBRARIES        := libdl libsdmutils
16
17ifneq ($(TARGET_IS_HEADLESS), true)
18    LOCAL_CFLAGS              += -DCOMPILE_DRM -isystem external/libdrm
19    LOCAL_SHARED_LIBRARIES    += libdrm libdrmutils
20    LOCAL_HW_INTF_PATH_2      := drm
21endif
22
23ifeq ($(TARGET_USES_DRM_PP),true)
24    LOCAL_CFLAGS              += -DPP_DRM_ENABLE
25endif
26
27LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
28LOCAL_SRC_FILES               := core_interface.cpp \
29                                 core_impl.cpp \
30                                 display_base.cpp \
31                                 display_primary.cpp \
32                                 display_hdmi.cpp \
33                                 display_virtual.cpp \
34                                 comp_manager.cpp \
35                                 strategy.cpp \
36                                 resource_default.cpp \
37                                 color_manager.cpp \
38                                 hw_events_interface.cpp \
39                                 hw_info_interface.cpp \
40                                 hw_interface.cpp \
41                                 $(LOCAL_HW_INTF_PATH_1)/hw_info.cpp \
42                                 $(LOCAL_HW_INTF_PATH_1)/hw_device.cpp \
43                                 $(LOCAL_HW_INTF_PATH_1)/hw_primary.cpp \
44                                 $(LOCAL_HW_INTF_PATH_1)/hw_hdmi.cpp \
45                                 $(LOCAL_HW_INTF_PATH_1)/hw_virtual.cpp \
46                                 $(LOCAL_HW_INTF_PATH_1)/hw_color_manager.cpp \
47                                 $(LOCAL_HW_INTF_PATH_1)/hw_scale.cpp \
48                                 $(LOCAL_HW_INTF_PATH_1)/hw_events.cpp
49
50ifneq ($(TARGET_IS_HEADLESS), true)
51    LOCAL_SRC_FILES           += $(LOCAL_HW_INTF_PATH_2)/hw_info_drm.cpp \
52                                 $(LOCAL_HW_INTF_PATH_2)/hw_device_drm.cpp \
53                                 $(LOCAL_HW_INTF_PATH_2)/hw_events_drm.cpp \
54                                 $(LOCAL_HW_INTF_PATH_2)/hw_scale_drm.cpp \
55                                 $(LOCAL_HW_INTF_PATH_2)/hw_color_manager_drm.cpp
56endif
57
58include $(BUILD_SHARED_LIBRARY)
59
60SDM_HEADER_PATH := ../../include
61include $(CLEAR_VARS)
62LOCAL_VENDOR_MODULE           := true
63LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/core
64LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/core/buffer_allocator.h \
65                                 $(SDM_HEADER_PATH)/core/buffer_sync_handler.h \
66                                 $(SDM_HEADER_PATH)/core/core_interface.h \
67                                 $(SDM_HEADER_PATH)/core/debug_interface.h \
68                                 $(SDM_HEADER_PATH)/core/display_interface.h \
69                                 $(SDM_HEADER_PATH)/core/layer_buffer.h \
70                                 $(SDM_HEADER_PATH)/core/layer_stack.h \
71                                 $(SDM_HEADER_PATH)/core/sdm_types.h \
72                                 $(SDM_HEADER_PATH)/core/socket_handler.h
73include $(BUILD_COPY_HEADERS)
74
75include $(CLEAR_VARS)
76LOCAL_VENDOR_MODULE           := true
77LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/private
78LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/private/color_interface.h \
79                                 $(SDM_HEADER_PATH)/private/color_params.h \
80                                 $(SDM_HEADER_PATH)/private/extension_interface.h \
81                                 $(SDM_HEADER_PATH)/private/hw_info_types.h \
82                                 $(SDM_HEADER_PATH)/private/partial_update_interface.h \
83                                 $(SDM_HEADER_PATH)/private/resource_interface.h \
84                                 $(SDM_HEADER_PATH)/private/strategy_interface.h \
85                                 $(SDM_HEADER_PATH)/private/dpps_control_interface.h
86include $(BUILD_COPY_HEADERS)
87