blob: 941b0a441a4a45114e7c506e4589b54cec9dcbda [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
Naseer Ahmed043cec72016-09-02 18:39:48 -04006common_flags += -Wconversion -Wall -Werror -std=c++11
Saurabh Shah7d476ed2016-06-27 16:40:58 -07007ifneq ($(TARGET_IS_HEADLESS), true)
8 common_flags += -DCOMPILE_DRM
Naseer Ahmed4d78d032017-03-22 12:47:30 -04009else
10 common_flags += -DTARGET_HEADLESS
11 LOCAL_CLANG := false
Saurabh Shah7d476ed2016-06-27 16:40:58 -070012endif
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040013
Arun Kumar K.Rca196fc2016-12-07 19:28:30 -080014ifeq ($(TARGET_USES_COLOR_METADATA), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -040015 common_flags += -DUSE_COLOR_METADATA
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070016endif
17
Naseer Ahmed4d78d032017-03-22 12:47:30 -040018ifeq ($(TARGET_USES_QCOM_BSP),true)
19 common_flags += -DQTI_BSP
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053020endif
21
Naseer Ahmed4d35af82012-07-11 23:43:42 -070022ifeq ($(ARCH_ARM_HAVE_NEON),true)
23 common_flags += -D__ARM_HAVE_NEON
24endif
25
Shalaj Jain3c490412015-04-22 16:52:03 -070026ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
27 common_flags += -DMASTER_SIDE_CP
28endif
29
Naseer Ahmed4d78d032017-03-22 12:47:30 -040030use_hwc2 := false
31ifeq ($(TARGET_USES_HWC2), true)
32 use_hwc2 := true
33 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
34endif
35
36ifeq ($(TARGET_USES_GRALLOC1), true)
37 common_flags += -DUSE_GRALLOC1
38endif
39
40common_includes := system/core/base/include
41CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
42PLATFORM_SDK_NOUGAT = 25
43ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
44ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
45version_flag := -D__NOUGAT__
46
47# These include paths are deprecated post N
48common_includes += $(display_top)/libqdutils
49common_includes += $(display_top)/libqservice
50common_includes += $(display_top)/gpu_tonemapper
51ifneq ($(TARGET_IS_HEADLESS), true)
52 common_includes += $(display_top)/libcopybit
53 common_includes += $(display_top)/libdrmutils
54endif
55
56common_includes += $(display_top)/include
57common_includes += $(display_top)/sdm/include
58common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display
59endif
60endif
61
62common_header_export_path := qcom/display
63
64#Common libraries external to display HAL
65common_libs := liblog libutils libcutils libhardware
Naseer Ahmed4d35af82012-07-11 23:43:42 -070066common_deps :=
67kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070068
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040069ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040070# This check is to pick the kernel headers from the right location.
71# If the macro above is defined, we make the assumption that we have the kernel
72# available in the build tree.
73# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
74# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070075 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
76 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
77endif