blob: a620d0619a640980cb416f040c9d9c3e15d764a2 [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)
Naseer Ahmeda699e792017-11-09 15:08:31 -05003display_config_version := $(shell \
4 if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.1" ];\
5 then echo DISPLAY_CONFIG_1_1; fi)
Dileep Marchyaf3ce11f2018-04-30 23:35:46 +05306display_config_version := $(shell \
7 if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.2" ];\
8 then echo DISPLAY_CONFIG_1_2; fi)
Naseer Ahmedb6b936d2016-08-05 16:23:32 -04009#Common C flags
Saurabh Shah546f77b2017-12-13 14:10:39 -080010common_flags := -Wno-missing-field-initializers
Dileep Marchya6860b2b2017-04-07 15:56:47 +053011common_flags += -Wconversion -Wall -Werror -std=c++14
Naseer Ahmed85020082017-05-17 14:36:46 -040012common_flags += -DUSE_GRALLOC1
Saurabh Shahf84c4122017-04-07 10:34:40 -070013ifeq ($(TARGET_IS_HEADLESS), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -040014 common_flags += -DTARGET_HEADLESS
15 LOCAL_CLANG := false
Saurabh Shah7d476ed2016-06-27 16:40:58 -070016endif
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040017
Naseer Ahmeda699e792017-11-09 15:08:31 -050018ifeq ($(display_config_version), DISPLAY_CONFIG_1_1)
19 common_flags += -DDISPLAY_CONFIG_1_1
20endif
Dileep Marchyaf3ce11f2018-04-30 23:35:46 +053021ifeq ($(display_config_version), DISPLAY_CONFIG_1_2)
22 common_flags += -DDISPLAY_CONFIG_1_2 -DDISPLAY_CONFIG_1_1
23endif
Naseer Ahmeda699e792017-11-09 15:08:31 -050024
Arun Kumar K.Rca196fc2016-12-07 19:28:30 -080025ifeq ($(TARGET_USES_COLOR_METADATA), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -040026 common_flags += -DUSE_COLOR_METADATA
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070027endif
28
Naseer Ahmed4d78d032017-03-22 12:47:30 -040029ifeq ($(TARGET_USES_QCOM_BSP),true)
30 common_flags += -DQTI_BSP
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053031endif
32
Naseer Ahmed4d35af82012-07-11 23:43:42 -070033ifeq ($(ARCH_ARM_HAVE_NEON),true)
34 common_flags += -D__ARM_HAVE_NEON
35endif
36
Shalaj Jain3c490412015-04-22 16:52:03 -070037ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
38 common_flags += -DMASTER_SIDE_CP
39endif
40
Naseer Ahmed4d78d032017-03-22 12:47:30 -040041use_hwc2 := false
42ifeq ($(TARGET_USES_HWC2), true)
43 use_hwc2 := true
44 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
45endif
46
Naseer Ahmed87895932017-05-30 17:01:44 -040047ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
48 common_flags += -DUSER_DEBUG
49endif
50
Ramakant Singh80a15d72017-07-14 13:52:15 +053051ifeq ($(LLVM_SA), true)
52 common_flags += --compile-and-analyze --analyzer-perf --analyzer-Werror
53endif
54
Naseer Ahmed4d78d032017-03-22 12:47:30 -040055common_includes := system/core/base/include
56CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
57PLATFORM_SDK_NOUGAT = 25
58ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
59ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
60version_flag := -D__NOUGAT__
61
62# These include paths are deprecated post N
63common_includes += $(display_top)/libqdutils
64common_includes += $(display_top)/libqservice
65common_includes += $(display_top)/gpu_tonemapper
66ifneq ($(TARGET_IS_HEADLESS), true)
67 common_includes += $(display_top)/libcopybit
Naseer Ahmed4d78d032017-03-22 12:47:30 -040068endif
69
70common_includes += $(display_top)/include
71common_includes += $(display_top)/sdm/include
72common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display
73endif
74endif
75
76common_header_export_path := qcom/display
77
78#Common libraries external to display HAL
79common_libs := liblog libutils libcutils libhardware
Naseer Ahmed4d35af82012-07-11 23:43:42 -070080common_deps :=
81kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070082
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040083ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040084# This check is to pick the kernel headers from the right location.
85# If the macro above is defined, we make the assumption that we have the kernel
86# available in the build tree.
87# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
88# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070089 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
90 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
91endif