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_SANITIZE                := integer_overflow
9LOCAL_VENDOR_MODULE           := true
10LOCAL_MODULE_TAGS             := optional
11LOCAL_C_INCLUDES              := $(common_includes) $(kernel_includes)
12LOCAL_C_INCLUDES              += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
13LOCAL_HEADER_LIBRARIES        := display_headers
14LOCAL_CFLAGS                  := -fno-operator-names -Wno-unused-parameter -DLOG_TAG=\"SDM\" \
15                                 $(common_flags)
16LOCAL_SHARED_LIBRARIES        := libdl libdisplaydebug libsdmutils
17
18ifneq ($(TARGET_IS_HEADLESS), true)
19    LOCAL_CFLAGS              += -isystem external/libdrm
20    LOCAL_SHARED_LIBRARIES    += libdrm libdrmutils libsdedrm
21    LOCAL_HW_INTF_PATH_2      := drm
22endif
23
24ifeq ($(TARGET_USES_DRM_PP),true)
25    LOCAL_CFLAGS              += -DPP_DRM_ENABLE
26endif
27
28LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
29LOCAL_SRC_FILES               := core_interface.cpp \
30                                 core_impl.cpp \
31                                 display_base.cpp \
32                                 display_builtin.cpp \
33                                 display_pluggable.cpp \
34                                 display_virtual.cpp \
35                                 comp_manager.cpp \
36                                 strategy.cpp \
37                                 resource_default.cpp \
38                                 color_manager.cpp \
39                                 hw_events_interface.cpp \
40                                 hw_info_interface.cpp \
41                                 hw_interface.cpp
42
43ifneq ($(TARGET_IS_HEADLESS), true)
44    LOCAL_SRC_FILES           += $(LOCAL_HW_INTF_PATH_2)/hw_info_drm.cpp \
45                                 $(LOCAL_HW_INTF_PATH_2)/hw_device_drm.cpp \
46                                 $(LOCAL_HW_INTF_PATH_2)/hw_peripheral_drm.cpp \
47                                 $(LOCAL_HW_INTF_PATH_2)/hw_tv_drm.cpp \
48                                 $(LOCAL_HW_INTF_PATH_2)/hw_events_drm.cpp \
49                                 $(LOCAL_HW_INTF_PATH_2)/hw_scale_drm.cpp \
50                                 $(LOCAL_HW_INTF_PATH_2)/hw_virtual_drm.cpp \
51                                 $(LOCAL_HW_INTF_PATH_2)/hw_color_manager_drm.cpp
52endif
53
54include $(BUILD_SHARED_LIBRARY)
55
56SDM_HEADER_PATH := ../../include
57include $(CLEAR_VARS)
58LOCAL_VENDOR_MODULE           := true
59LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/core
60LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/core/buffer_allocator.h \
61                                 $(SDM_HEADER_PATH)/core/buffer_sync_handler.h \
62                                 $(SDM_HEADER_PATH)/core/core_interface.h \
63                                 $(SDM_HEADER_PATH)/core/display_interface.h \
64                                 $(SDM_HEADER_PATH)/core/layer_buffer.h \
65                                 $(SDM_HEADER_PATH)/core/layer_stack.h \
66                                 $(SDM_HEADER_PATH)/core/sdm_types.h \
67                                 $(SDM_HEADER_PATH)/core/socket_handler.h \
68                                 $(SDM_HEADER_PATH)/core/dpps_interface.h
69include $(BUILD_COPY_HEADERS)
70
71include $(CLEAR_VARS)
72LOCAL_VENDOR_MODULE           := true
73LOCAL_COPY_HEADERS_TO         := $(common_header_export_path)/sdm/private
74LOCAL_COPY_HEADERS             = $(SDM_HEADER_PATH)/private/color_interface.h \
75                                 $(SDM_HEADER_PATH)/private/color_params.h \
76                                 $(SDM_HEADER_PATH)/private/extension_interface.h \
77                                 $(SDM_HEADER_PATH)/private/hw_info_types.h \
78                                 $(SDM_HEADER_PATH)/private/partial_update_interface.h \
79                                 $(SDM_HEADER_PATH)/private/resource_interface.h \
80                                 $(SDM_HEADER_PATH)/private/strategy_interface.h
81include $(BUILD_COPY_HEADERS)
82