blob: 23181651667c01958ab8e422d9e1ef4a76fdae7d [file] [log] [blame]
Naseer Ahmed4d35af82012-07-11 23:43:42 -07001#Common headers
Naseer Ahmedd68b47d2016-04-05 17:40:02 -04002display_top := $(call my-dir)
3
Naseer Ahmedb6b936d2016-08-05 16:23:32 -04004#Common C flags
5common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
Dileep Marchya6860b2b2017-04-07 15:56:47 +05306common_flags += -Wconversion -Wall -Werror -std=c++14
Naseer Ahmed85020082017-05-17 14:36:46 -04007common_flags += -DUSE_GRALLOC1
Saurabh Shahf84c4122017-04-07 10:34:40 -07008ifeq ($(TARGET_IS_HEADLESS), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -04009 common_flags += -DTARGET_HEADLESS
10 LOCAL_CLANG := false
Saurabh Shah7d476ed2016-06-27 16:40:58 -070011endif
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040012
Arun Kumar K.Rca196fc2016-12-07 19:28:30 -080013ifeq ($(TARGET_USES_COLOR_METADATA), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -040014 common_flags += -DUSE_COLOR_METADATA
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070015endif
16
Naseer Ahmed4d78d032017-03-22 12:47:30 -040017ifeq ($(TARGET_USES_QCOM_BSP),true)
18 common_flags += -DQTI_BSP
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053019endif
20
Naseer Ahmed4d35af82012-07-11 23:43:42 -070021ifeq ($(ARCH_ARM_HAVE_NEON),true)
22 common_flags += -D__ARM_HAVE_NEON
23endif
24
Shalaj Jain3c490412015-04-22 16:52:03 -070025ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
26 common_flags += -DMASTER_SIDE_CP
27endif
28
Naseer Ahmed4d78d032017-03-22 12:47:30 -040029use_hwc2 := false
30ifeq ($(TARGET_USES_HWC2), true)
31 use_hwc2 := true
32 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
33endif
34
Naseer Ahmed87895932017-05-30 17:01:44 -040035ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
36 common_flags += -DUSER_DEBUG
37endif
38
Naseer Ahmed4d78d032017-03-22 12:47:30 -040039common_includes := system/core/base/include
40CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
41PLATFORM_SDK_NOUGAT = 25
42ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
43ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
44version_flag := -D__NOUGAT__
45
46# These include paths are deprecated post N
47common_includes += $(display_top)/libqdutils
48common_includes += $(display_top)/libqservice
49common_includes += $(display_top)/gpu_tonemapper
50ifneq ($(TARGET_IS_HEADLESS), true)
51 common_includes += $(display_top)/libcopybit
Naseer Ahmed4d78d032017-03-22 12:47:30 -040052endif
53
54common_includes += $(display_top)/include
55common_includes += $(display_top)/sdm/include
56common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display
57endif
58endif
59
60common_header_export_path := qcom/display
61
62#Common libraries external to display HAL
63common_libs := liblog libutils libcutils libhardware
Naseer Ahmed4d35af82012-07-11 23:43:42 -070064common_deps :=
65kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070066
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040067ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040068# This check is to pick the kernel headers from the right location.
69# If the macro above is defined, we make the assumption that we have the kernel
70# available in the build tree.
71# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
72# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070073 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
74 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
75endif