1#Common headers 2display_top := $(call my-dir) 3 4#Common C flags 5common_flags := -Wno-missing-field-initializers 6common_flags += -Wall -Werror 7common_flags += -DUSE_GRALLOC1 8ifeq ($(TARGET_IS_HEADLESS), true) 9 common_flags += -DTARGET_HEADLESS 10endif 11 12ifeq ($(TARGET_USES_COLOR_METADATA), true) 13 common_flags += -DUSE_COLOR_METADATA 14endif 15 16ifeq ($(TARGET_USES_5.4_KERNEL),true) 17 common_flags += -DKERNEL_5_4 18endif 19 20ifeq ($(TARGET_USES_QCOM_BSP),true) 21 common_flags += -DQTI_BSP 22endif 23 24ifeq ($(ARCH_ARM_HAVE_NEON),true) 25 common_flags += -D__ARM_HAVE_NEON 26endif 27 28ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST))) 29 common_flags += -DMASTER_SIDE_CP 30endif 31 32use_hwc2 := false 33ifeq ($(TARGET_USES_HWC2), true) 34 use_hwc2 := true 35 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE 36endif 37 38ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 39 common_flags += -DUSER_DEBUG 40endif 41 42ifeq ($(LLVM_SA), true) 43 common_flags += --compile-and-analyze --analyzer-perf --analyzer-Werror 44endif 45 46common_includes := system/libbase/include 47CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi) 48PLATFORM_SDK_NOUGAT = 25 49ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" 50ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true) 51version_flag := -D__NOUGAT__ 52 53# These include paths are deprecated post N 54common_includes += $(display_top)/libqdutils 55common_includes += $(display_top)/libqservice 56common_includes += $(display_top)/gpu_tonemapper 57ifneq ($(TARGET_IS_HEADLESS), true) 58 common_includes += $(display_top)/libcopybit 59endif 60 61common_includes += $(display_top)/include 62common_includes += $(display_top)/sdm/include 63common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display 64endif 65endif 66 67common_header_export_path := qcom/display 68 69#Common libraries external to display HAL 70common_libs := liblog libutils libcutils libhardware 71common_deps := 72kernel_includes := 73 74ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 75# This check is to pick the kernel headers from the right location. 76# If the macro above is defined, we make the assumption that we have the kernel 77# available in the build tree. 78# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX 79# failing which, they are picked from bionic. 80 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 81 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 82ifeq ($(TARGET_USES_5.4_KERNEL), true) 83 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/display 84 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/vidc 85endif 86endif 87