1#Common headers
2display_top := $(call my-dir)
3
4#Common C flags
5common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
6common_flags += -Wconversion -Wall -Werror -std=c++11
7ifneq ($(TARGET_IS_HEADLESS), true)
8    common_flags += -DCOMPILE_DRM
9endif
10
11ifeq ($(TARGET_USES_COLOR_METADATA), true)
12common_flags += -DUSE_COLOR_METADATA
13endif
14
15use_hwc2 := false
16ifeq ($(TARGET_USES_HWC2), true)
17    use_hwc2 := true
18    common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
19endif
20
21common_includes := $(display_top)/libqdutils
22common_includes += $(display_top)/libqservice
23common_includes += $(display_top)/gpu_tonemapper
24ifneq ($(TARGET_IS_HEADLESS), true)
25    common_includes += $(display_top)/libcopybit
26    common_includes += $(display_top)/libdrmutils
27endif
28
29common_includes += $(display_top)/include
30common_includes += $(display_top)/sdm/include
31common_includes += system/core/base/include
32
33common_header_export_path := qcom/display
34
35#Common libraries external to display HAL
36common_libs := liblog libutils libcutils libhardware
37
38ifeq ($(TARGET_IS_HEADLESS), true)
39    LOCAL_CLANG := false
40else
41    LOCAL_CLANG := true
42endif
43
44ifneq ($(TARGET_USES_GRALLOC1), true)
45    common_flags += -isystem $(display_top)/libgralloc
46else
47    common_flags += -isystem $(display_top)/libgralloc1
48    common_flags += -DUSE_GRALLOC1
49endif
50
51ifeq ($(TARGET_USES_POST_PROCESSING),true)
52    common_flags     += -DUSES_POST_PROCESSING
53    common_includes  += $(TARGET_OUT_HEADERS)/pp/inc
54endif
55
56ifeq ($(ARCH_ARM_HAVE_NEON),true)
57    common_flags += -D__ARM_HAVE_NEON
58endif
59
60ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
61    common_flags += -DMASTER_SIDE_CP
62endif
63
64common_deps  :=
65kernel_includes :=
66
67# Executed only on QCOM BSPs
68ifeq ($(TARGET_USES_QCOM_BSP),true)
69# Enable QCOM Display features
70   common_flags += -DQTI_BSP
71endif
72
73ifeq ($(TARGET_IS_HEADLESS),true)
74    common_flags += -DTARGET_HEADLESS
75endif
76
77ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
78# This check is to pick the kernel headers from the right location.
79# If the macro above is defined, we make the assumption that we have the kernel
80# available in the build tree.
81# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
82# failing which, they are picked from bionic.
83    common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
84    kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
85endif
86