blob: d44a66420924eaa1f0877cc7d270a1077165566c [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
Naseer Ahmedb6b936d2016-08-05 16:23:32 -04007
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -07008ifeq ($(call is-board-platform-in-list, msmcobalt msm8998), true)
9common_flags += -DUSE_COLOR_METADATA
10endif
11
Naseer Ahmedb92e73f2016-03-12 02:03:48 -050012use_hwc2 := false
Naseer Ahmedad8ae632016-06-09 16:48:22 -040013ifeq ($(TARGET_USES_HWC2), true)
14 use_hwc2 := true
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040015 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
Naseer Ahmedad8ae632016-06-09 16:48:22 -040016endif
Naseer Ahmedb92e73f2016-03-12 02:03:48 -050017
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040018common_includes := $(display_top)/libqdutils
19common_includes += $(display_top)/libqservice
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053020ifneq ($(TARGET_IS_HEADLESS), true)
21 common_includes += $(display_top)/libcopybit
22endif
23
Arun Kumar K.Rb2771bf2016-10-03 21:38:23 -070024common_includes += $(display_top)/include
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040025common_includes += $(display_top)/sdm/include
Naseer Ahmed4d35af82012-07-11 23:43:42 -070026
Naseer Ahmedc55d60a2013-07-11 17:42:26 -040027common_header_export_path := qcom/display
28
Naseer Ahmed4d35af82012-07-11 23:43:42 -070029#Common libraries external to display HAL
30common_libs := liblog libutils libcutils libhardware
31
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053032ifeq ($(TARGET_IS_HEADLESS), true)
33 LOCAL_CLANG := false
34else
35 LOCAL_CLANG := true
36endif
37
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053038ifneq ($(TARGET_USES_GRALLOC1), true)
39 common_flags += -isystem $(display_top)/libgralloc
40else
41 common_flags += -isystem $(display_top)/libgralloc1
42endif
Naseer Ahmedb16edac2012-07-15 23:56:21 -070043
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053044ifeq ($(TARGET_USES_POST_PROCESSING),true)
45 common_flags += -DUSES_POST_PROCESSING
46 common_includes += $(TARGET_OUT_HEADERS)/pp/inc
47endif
48
Naseer Ahmed4d35af82012-07-11 23:43:42 -070049ifeq ($(ARCH_ARM_HAVE_NEON),true)
50 common_flags += -D__ARM_HAVE_NEON
51endif
52
Shalaj Jain103f6662014-09-18 11:47:52 -070053ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)), true)
54 common_flags += -DVENUS_COLOR_FORMAT
Sushil Chauhanc6bd6d92012-12-12 12:33:01 -080055endif
56
Shalaj Jain3c490412015-04-22 16:52:03 -070057ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
58 common_flags += -DMASTER_SIDE_CP
59endif
60
Naseer Ahmed4d35af82012-07-11 23:43:42 -070061common_deps :=
62kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070063
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070064# Executed only on QCOM BSPs
Namit Solankic4c6e2d2016-07-11 16:56:25 +053065ifeq ($(TARGET_USES_QCOM_BSP),true)
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070066# Enable QCOM Display features
Namit Solankic4c6e2d2016-07-11 16:56:25 +053067 common_flags += -DQTI_BSP
68endif
Naseer Ahmed34bad082016-04-27 22:35:00 -040069
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053070ifeq ($(TARGET_IS_HEADLESS),true)
71 common_flags += -DTARGET_HEADLESS
72endif
73
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040074ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040075# This check is to pick the kernel headers from the right location.
76# If the macro above is defined, we make the assumption that we have the kernel
77# available in the build tree.
78# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
79# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070080 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
81 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
82endif