summaryrefslogtreecommitdiffstats
path: root/core/binary.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/binary.mk')
-rw-r--r--core/binary.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/binary.mk b/core/binary.mk
index 77612ad..7610dce 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -30,6 +30,15 @@ else
endif
endif
+# Many qcom modules don't correctly set a dependency on the kernel headers. Fix it for them,
+# but warn the user.
+ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,$(LOCAL_C_INCLUDES)))
+ ifeq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,$(LOCAL_ADDITIONAL_DEPENDENCIES)))
+ $(warning $(LOCAL_MODULE) uses kernel headers, but does not depend on them!)
+ LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+ endif
+endif
+
# The following LOCAL_ variables will be modified in this file.
# Because the same LOCAL_ variables may be used to define modules for both 1st arch and 2nd arch,
# we can't modify them in place.