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