blob: f10533055442225747b1d2c5872609e4938a5dd6 [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
9endif
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040010
Arun Kumar K.Rca196fc2016-12-07 19:28:30 -080011ifeq ($(TARGET_USES_COLOR_METADATA), true)
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070012common_flags += -DUSE_COLOR_METADATA
13endif
14
Naseer Ahmedfeaed062017-01-17 15:34:02 -050015CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
16PLATFORM_SDK_NOUGAT = 25
17ifeq "REL" "$(PLATFORM_VERSION_CODENAME)"
18ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true)
19version_flag := -D__NOUGAT__
20endif
21endif
22
Naseer Ahmedb92e73f2016-03-12 02:03:48 -050023use_hwc2 := false
Naseer Ahmedad8ae632016-06-09 16:48:22 -040024ifeq ($(TARGET_USES_HWC2), true)
25 use_hwc2 := true
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040026 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
Naseer Ahmedad8ae632016-06-09 16:48:22 -040027endif
Naseer Ahmedb92e73f2016-03-12 02:03:48 -050028
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040029common_includes := $(display_top)/libqdutils
30common_includes += $(display_top)/libqservice
Arun Kumar K.R2b75da32016-11-11 14:37:20 -080031common_includes += $(display_top)/gpu_tonemapper
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053032ifneq ($(TARGET_IS_HEADLESS), true)
33 common_includes += $(display_top)/libcopybit
Saurabh Shah7d476ed2016-06-27 16:40:58 -070034 common_includes += $(display_top)/libdrmutils
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053035endif
36
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070037common_includes += $(display_top)/include
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040038common_includes += $(display_top)/sdm/include
David Ngf7207012016-10-07 11:50:09 -070039common_includes += system/core/base/include
Naseer Ahmed4d35af82012-07-11 23:43:42 -070040
Naseer Ahmedc55d60a2013-07-11 17:42:26 -040041common_header_export_path := qcom/display
42
Naseer Ahmed4d35af82012-07-11 23:43:42 -070043#Common libraries external to display HAL
44common_libs := liblog libutils libcutils libhardware
45
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053046ifeq ($(TARGET_IS_HEADLESS), true)
47 LOCAL_CLANG := false
48else
49 LOCAL_CLANG := true
50endif
51
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053052ifneq ($(TARGET_USES_GRALLOC1), true)
53 common_flags += -isystem $(display_top)/libgralloc
54else
55 common_flags += -isystem $(display_top)/libgralloc1
56endif
Naseer Ahmedb16edac2012-07-15 23:56:21 -070057
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053058ifeq ($(TARGET_USES_POST_PROCESSING),true)
59 common_flags += -DUSES_POST_PROCESSING
60 common_includes += $(TARGET_OUT_HEADERS)/pp/inc
61endif
62
Naseer Ahmed4d35af82012-07-11 23:43:42 -070063ifeq ($(ARCH_ARM_HAVE_NEON),true)
64 common_flags += -D__ARM_HAVE_NEON
65endif
66
Shalaj Jain3c490412015-04-22 16:52:03 -070067ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
68 common_flags += -DMASTER_SIDE_CP
69endif
70
Naseer Ahmed4d35af82012-07-11 23:43:42 -070071common_deps :=
72kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070073
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070074# Executed only on QCOM BSPs
Namit Solankic4c6e2d2016-07-11 16:56:25 +053075ifeq ($(TARGET_USES_QCOM_BSP),true)
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070076# Enable QCOM Display features
Namit Solankic4c6e2d2016-07-11 16:56:25 +053077 common_flags += -DQTI_BSP
78endif
Naseer Ahmed34bad082016-04-27 22:35:00 -040079
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053080ifeq ($(TARGET_IS_HEADLESS),true)
81 common_flags += -DTARGET_HEADLESS
82endif
83
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040084ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040085# This check is to pick the kernel headers from the right location.
86# If the macro above is defined, we make the assumption that we have the kernel
87# available in the build tree.
88# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
89# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070090 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
91 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
92endif