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