display: Use flag to distinguish QCOM BSP features
Earlier the presence of is-vendor-board-platform, QCOM was relied
on. However some builds could be using that macro and still be
builds without framework changes.
Change-Id: I9cf9494753086f8b86a0f69aed825230752cf240
diff --git a/common.mk b/common.mk
index f2ae8b2..ded2e75 100644
--- a/common.mk
+++ b/common.mk
@@ -36,8 +36,16 @@
kernel_includes :=
# Executed only on QCOM BSPs
-ifeq ($(call is-vendor-board-platform,QCOM),true)
+ifeq ($(TARGET_USES_QCOM_BSP),true)
+# This flag is used to compile out any features that depend on framework changes
common_flags += -DQCOM_BSP
+endif
+ifeq ($(call is-vendor-board-platform,QCOM),true)
+# This check is to pick the kernel headers from the right location.
+# If the macro above is defined, we make the assumption that we have the kernel
+# available in the build tree.
+# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
+# failing which, they are picked from bionic.
common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
endif