display: makefile fixes

* Deprecate LOCAL_COPY_HEADERS on newer builds
* Use a display header export path instead
* Consolidate cflags

CRs-Fixed: 2023356
Change-Id: Ibb8900a77fc3fa47e6e54cd1649503eba12de8cd
diff --git a/include/Android.mk b/include/Android.mk
index 4d0d9f7..95c5d25 100644
--- a/include/Android.mk
+++ b/include/Android.mk
@@ -7,3 +7,19 @@
 
 include $(BUILD_COPY_HEADERS)
 
+include $(CLEAR_VARS)
+#TODO move all exported headers to this directory
+LOCAL_MODULE := display_headers
+LOCAL_EXPORT_C_INCLUDE_DIRS   := $(LOCAL_PATH) \
+                                 $(display_top)/libcopybit \
+                                 $(display_top)/libdrmutils \
+                                 $(display_top)/libqdutils \
+                                 $(display_top)/libqservice \
+                                 $(display_top)/sdm/include
+
+ifeq ($(TARGET_USES_GRALLOC1), true)
+    LOCAL_EXPORT_C_INCLUDE_DIRS += $(display_top)/libgralloc1
+else
+    LOCAL_EXPORT_C_INCLUDE_DIRS += $(display_top)/libgralloc
+endif
+include $(BUILD_HEADER_LIBRARY)