common.mk revision d62c8a289ff6b4838e543e82b655dc436f387574
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 7 8ifeq ($(call is-board-platform-in-list, msmcobalt msm8998), true) 9common_flags += -DUSE_COLOR_METADATA 10endif 11 12use_hwc2 := false 13ifeq ($(TARGET_USES_HWC2), true) 14 use_hwc2 := true 15 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE 16endif 17 18common_includes := $(display_top)/libqdutils 19common_includes += $(display_top)/libqservice 20ifneq ($(TARGET_IS_HEADLESS), true) 21 common_includes += $(display_top)/libcopybit 22endif 23 24common_includes += $(display_top)/include 25common_includes += $(display_top)/sdm/include 26 27common_header_export_path := qcom/display 28 29#Common libraries external to display HAL 30common_libs := liblog libutils libcutils libhardware 31 32ifeq ($(TARGET_IS_HEADLESS), true) 33 LOCAL_CLANG := false 34else 35 LOCAL_CLANG := true 36endif 37 38ifneq ($(TARGET_USES_GRALLOC1), true) 39 common_flags += -isystem $(display_top)/libgralloc 40else 41 common_flags += -isystem $(display_top)/libgralloc1 42endif 43 44ifeq ($(TARGET_USES_POST_PROCESSING),true) 45 common_flags += -DUSES_POST_PROCESSING 46 common_includes += $(TARGET_OUT_HEADERS)/pp/inc 47endif 48 49ifeq ($(ARCH_ARM_HAVE_NEON),true) 50 common_flags += -D__ARM_HAVE_NEON 51endif 52 53ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)), true) 54 common_flags += -DVENUS_COLOR_FORMAT 55endif 56 57ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true) 58 common_flags += -DMASTER_SIDE_CP 59endif 60 61common_deps := 62kernel_includes := 63 64# Executed only on QCOM BSPs 65ifeq ($(TARGET_USES_QCOM_BSP),true) 66# Enable QCOM Display features 67 common_flags += -DQTI_BSP 68endif 69 70ifeq ($(TARGET_IS_HEADLESS),true) 71 common_flags += -DTARGET_HEADLESS 72endif 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 82endif 83