blob: 66f0a111c58ebe7e406118252ccef6b4c8cdfb76 [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 Shahf84c4122017-04-07 10:34:40 -07007ifeq ($(TARGET_IS_HEADLESS), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -04008 common_flags += -DTARGET_HEADLESS
9 LOCAL_CLANG := false
Saurabh Shah7d476ed2016-06-27 16:40:58 -070010endif
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040011
Arun Kumar K.Rca196fc2016-12-07 19:28:30 -080012ifeq ($(TARGET_USES_COLOR_METADATA), true)
Naseer Ahmed4d78d032017-03-22 12:47:30 -040013 common_flags += -DUSE_COLOR_METADATA
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070014endif
15
Naseer Ahmed4d78d032017-03-22 12:47:30 -040016ifeq ($(TARGET_USES_QCOM_BSP),true)
17 common_flags += -DQTI_BSP
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053018endif
19
Naseer Ahmed4d35af82012-07-11 23:43:42 -070020ifeq ($(ARCH_ARM_HAVE_NEON),true)
21 common_flags += -D__ARM_HAVE_NEON
22endif
23
Shalaj Jain3c490412015-04-22 16:52:03 -070024ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
25 common_flags += -DMASTER_SIDE_CP
26endif
27
Naseer Ahmed4d78d032017-03-22 12:47:30 -040028use_hwc2 := false
29ifeq ($(TARGET_USES_HWC2), true)
30 use_hwc2 := true
31 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
32endif
33
34ifeq ($(TARGET_USES_GRALLOC1), true)
35 common_flags += -DUSE_GRALLOC1
36endif
37
Naseer Ahmed87895932017-05-30 17:01:44 -040038ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
39 common_flags += -DUSER_DEBUG
40endif
41
Naseer Ahmed4d78d032017-03-22 12:47:30 -040042common_includes := system/core/base/include
43CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
44PLATFORM_SDK_NOUGAT = 25
45ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
46ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
47version_flag := -D__NOUGAT__
48
49# These include paths are deprecated post N
50common_includes += $(display_top)/libqdutils
51common_includes += $(display_top)/libqservice
52common_includes += $(display_top)/gpu_tonemapper
53ifneq ($(TARGET_IS_HEADLESS), true)
54 common_includes += $(display_top)/libcopybit
Naseer Ahmed4d78d032017-03-22 12:47:30 -040055endif
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
Naseer Ahmed4d35af82012-07-11 23:43:42 -070067common_deps :=
68kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070069
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040070ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040071# 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.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070076 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
77 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
78endif