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