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++14 7ifeq ($(TARGET_IS_HEADLESS), true) 8 common_flags += -DTARGET_HEADLESS 9 LOCAL_CLANG := false 10endif 11 12ifeq ($(TARGET_USES_COLOR_METADATA), true) 13 common_flags += -DUSE_COLOR_METADATA 14endif 15 16ifeq ($(TARGET_USES_QCOM_BSP),true) 17 common_flags += -DQTI_BSP 18endif 19 20ifeq ($(ARCH_ARM_HAVE_NEON),true) 21 common_flags += -D__ARM_HAVE_NEON 22endif 23 24ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true) 25 common_flags += -DMASTER_SIDE_CP 26endif 27 28use_hwc2 := false 29ifeq ($(TARGET_USES_HWC2), true) 30 use_hwc2 := true 31 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE 32endif 33 34ifeq ($(TARGET_USES_GRALLOC1), true) 35 common_flags += -DUSE_GRALLOC1 36endif 37 38common_includes := system/libbase/include 39CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi) 40PLATFORM_SDK_NOUGAT = 25 41ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" 42ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true) 43version_flag := -D__NOUGAT__ 44 45# These include paths are deprecated post N 46common_includes += $(display_top)/libqdutils 47common_includes += $(display_top)/libqservice 48common_includes += $(display_top)/gpu_tonemapper 49ifneq ($(TARGET_IS_HEADLESS), true) 50 common_includes += $(display_top)/libcopybit 51endif 52 53common_includes += $(display_top)/include 54common_includes += $(display_top)/sdm/include 55common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display 56endif 57endif 58 59common_header_export_path := qcom/display 60 61#Common libraries external to display HAL 62common_libs := liblog libutils libcutils libhardware 63common_deps := 64kernel_includes := 65 66ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 67# This check is to pick the kernel headers from the right location. 68# If the macro above is defined, we make the assumption that we have the kernel 69# available in the build tree. 70# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX 71# failing which, they are picked from bionic. 72 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 73 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 74endif 75