cheets: Fix Wayland generated header deps

Source files for clients of the libraries could be compiled before the
public/exported headers were generated.

This patch ensures they are generated before a client tries to use them.

Change-Id: Ie47b6e2c41a8e55ae724eae145d7c6b599216d34
diff --git a/Android.mk b/Android.mk
index c424972..e32970b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -106,6 +106,12 @@
 	$(transform-generated-source)
 # Note: The line above must be indented with tabs.
 
+# Ensure we generate the headers before they are used by any clients of the
+# library.
+# TODO(lpique): Introduce and upstream a LOCAL_EXPORT_C_GEN_INCLUDES setting
+# which adds this in build/core/binary.mk, to avoid relying on build internals.
+$(call local-intermediates-dir)/export_includes : $(GEN)
+
 # --- Generate wayland-version.h from wayland-version.h.in
 # We must put the output where the users of the library can see it.
 GEN := $(addprefix $(LOCAL_PATH)/src/, \
@@ -118,4 +124,10 @@
 	$(transform-generated-source)
 # Note: The line above must be indented with tabs.
 
+# Ensure we generate the headers before they are used by any clients of the
+# library.
+# TODO(lpique): Introduce and upstream a LOCAL_EXPORT_C_GEN_INCLUDES setting
+# which adds this in build/core/binary.mk, to avoid relying on build internals.
+$(call local-intermediates-dir)/export_includes : $(GEN)
+
 include $(BUILD_STATIC_LIBRARY)
\ No newline at end of file