android: panfrost: Redirect cmdstream includes through GenXML

Fixes the following building error:

external/mesa/src/panfrost/lib/decode.c:26:10: fatal error: 'midgard_pack.h' file not found
         ^~~~~~~~~~~~~~~~
1 error generated.

Fixes: 88dc4c21e ("panfrost: Redirect cmdstream includes through GenXML")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6317>
diff --git a/src/panfrost/Android.lib.mk b/src/panfrost/Android.lib.mk
index cda7038..ab5d212 100644
--- a/src/panfrost/Android.lib.mk
+++ b/src/panfrost/Android.lib.mk
@@ -21,23 +21,35 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := libpanfrost_lib
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+intermediates := $(call local-generated-sources-dir)
 
 LOCAL_SRC_FILES := \
 	$(lib_FILES)
 
+LOCAL_GENERATED_SOURCES := \
+	$(intermediates)/panfrost/lib/midgard_pack.h
+
 LOCAL_C_INCLUDES := \
 	$(MESA_TOP)/src/gallium/auxiliary/ \
 	$(MESA_TOP)/src/gallium/include/ \
 	$(MESA_TOP)/src/panfrost/lib/ \
-	$(MESA_TOP)/src/panfrost/include/
+	$(MESA_TOP)/src/panfrost/include/ \
+	$(intermediates)/panfrost/lib/
 
 LOCAL_STATIC_LIBRARIES := \
 	libmesa_nir
 
-LOCAL_GENERATED_SOURCES := \
+midgard_pack_gen := $(LOCAL_PATH)/lib/gen_pack.py
+midgard_pack_deps := $(LOCAL_PATH)/lib/midgard.xml
+
+$(intermediates)/panfrost/lib/midgard_pack.h: $(midgard_pack_deps)
+	@mkdir -p $(dir $@)
+	$(hide) $(MESA_PYTHON2) $(midgard_pack_gen) $< > $@
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
 	$(MESA_TOP)/src/panfrost/lib/ \
+	$(intermediates)
 
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)