blob: abd19ddfa5e9381210589d76fa6e21bded853dd1 [file] [log] [blame]
Thierry Strudel2ebc25b2016-09-07 13:08:11 -07001#Common headers
2display_top := $(call my-dir)
3
Thierry Strudelfa3d1d32016-10-12 12:20:31 -07004#Common C flags
5common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
Vic Yang3e827b12019-08-15 13:56:57 -07006common_flags += -Wconversion -Wall -Werror
Naseer Ahmed27226742017-07-18 17:34:16 -04007common_flags += -DUSE_GRALLOC1
Thierry Strudel6cfbcfa2017-03-08 10:37:34 -08008ifneq ($(TARGET_IS_HEADLESS), true)
9 common_flags += -DCOMPILE_DRM
Thierry Strudelcd663242017-04-06 09:54:26 -070010else
11 common_flags += -DTARGET_HEADLESS
12 LOCAL_CLANG := false
Thierry Strudel6cfbcfa2017-03-08 10:37:34 -080013endif
Thierry Strudelfa3d1d32016-10-12 12:20:31 -070014
Thierry Strudelb06147d2017-02-15 10:48:16 -080015ifeq ($(TARGET_USES_COLOR_METADATA), true)
Thierry Strudelcd663242017-04-06 09:54:26 -070016 common_flags += -DUSE_COLOR_METADATA
Thierry Strudeld62c8a22016-12-13 13:51:15 -080017endif
18
Thierry Strudelcd663242017-04-06 09:54:26 -070019ifeq ($(TARGET_USES_QCOM_BSP),true)
20 common_flags += -DQTI_BSP
Thierry Strudel2ebc25b2016-09-07 13:08:11 -070021endif
22
23ifeq ($(ARCH_ARM_HAVE_NEON),true)
24 common_flags += -D__ARM_HAVE_NEON
25endif
26
Sasha Smundak5ca67f52021-10-21 14:24:16 -070027ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST)))
Thierry Strudel2ebc25b2016-09-07 13:08:11 -070028 common_flags += -DMASTER_SIDE_CP
29endif
30
Thierry Strudelcd663242017-04-06 09:54:26 -070031use_hwc2 := false
32ifeq ($(TARGET_USES_HWC2), true)
33 use_hwc2 := true
34 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
35endif
36
Naseer Ahmeda831bfa2017-05-30 17:01:44 -040037ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
38 common_flags += -DUSER_DEBUG
39endif
40
Baligh Uddin4d706f62020-10-23 14:21:56 +000041common_includes := system/libbase/include
Thierry Strudelcd663242017-04-06 09:54:26 -070042CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
43PLATFORM_SDK_NOUGAT = 25
44ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
45ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
46version_flag := -D__NOUGAT__
47
48# These include paths are deprecated post N
49common_includes += $(display_top)/libqdutils
50common_includes += $(display_top)/libqservice
51common_includes += $(display_top)/gpu_tonemapper
52ifneq ($(TARGET_IS_HEADLESS), true)
53 common_includes += $(display_top)/libcopybit
54 common_includes += $(display_top)/libdrmutils
55endif
56
57common_includes += $(display_top)/include
58common_includes += $(display_top)/sdm/include
59common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display
60endif
61endif
62
63common_header_export_path := qcom/display
64
65#Common libraries external to display HAL
66common_libs := liblog libutils libcutils libhardware
Thierry Strudel2ebc25b2016-09-07 13:08:11 -070067common_deps :=
68kernel_includes :=
69
Thierry Strudel2ebc25b2016-09-07 13:08:11 -070070ifeq ($(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
78endif