1#Common headers
2common_includes := $(LOCAL_PATH)/../libgralloc
3common_includes += $(LOCAL_PATH)/../liboverlay
4common_includes += $(LOCAL_PATH)/../libcopybit
5common_includes += $(LOCAL_PATH)/../libqdutils
6common_includes += $(LOCAL_PATH)/../libhwcomposer
7common_includes += $(LOCAL_PATH)/../libexternal
8common_includes += $(LOCAL_PATH)/../libqservice
9common_includes += $(LOCAL_PATH)/../libvirtual
10
11ifeq ($(TARGET_USES_POST_PROCESSING),true)
12    common_flags     += -DUSES_POST_PROCESSING
13    common_includes  += $(TARGET_OUT_HEADERS)/pp/inc
14endif
15
16common_header_export_path := qcom/display
17
18#Common libraries external to display HAL
19common_libs := liblog libutils libcutils libhardware
20
21#Common C flags
22common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
23#TODO: Add -Werror back once all the current warnings are fixed
24common_flags += -Wconversion -Wall
25
26ifeq ($(ARCH_ARM_HAVE_NEON),true)
27    common_flags += -D__ARM_HAVE_NEON
28endif
29
30ifneq (,$(call is-board-platform-in-list2, msm8974 msm8226 msm8610 apq8084 mpq8092 msm_bronze msm8916 msm8994))
31    common_flags += -DVENUS_COLOR_FORMAT
32    common_flags += -DMDSS_TARGET
33endif
34
35ifeq ($(TARGET_HAS_VSYNC_FAILURE_FALLBACK), true)
36    common_flags += -DVSYNC_FAILURE_FALLBACK
37endif
38
39ifeq ($(DISPLAY_DEBUG_SWAPINTERVAL),true)
40    common_flags += -DDEBUG_SWAPINTERVAL
41endif
42
43common_flags += -D__STDC_FORMAT_MACROS
44
45common_deps  :=
46kernel_includes :=
47
48# Executed only on QCOM BSPs
49ifeq ($(TARGET_USES_QCOM_BSP),true)
50# Enable QCOM Display features
51    common_flags += -DQCOM_BSP
52endif
53
54ifneq (,$(DISPLAY_FEATURE_MAX_ROT_SESSION))
55    common_flags += -DTARGET_SPECIFIC_MAX_ROT_SESSION=$(DISPLAY_FEATURE_MAX_ROT_SESSION)
56endif
57
58ifneq (,$(call is-vendor-board-qcom))
59# This check is to pick the kernel headers from the right location.
60# If the macro above is defined, we make the assumption that we have the kernel
61# available in the build tree.
62# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
63# failing which, they are picked from bionic.
64    common_deps += $(BOARD_KERNEL_HEADER_DEPENDENCIES)
65    kernel_includes += $(BOARD_KERNEL_HEADER_DIR)
66endif
67