android: pan/bi: Generate bi_opcodes.{c,h}

Porting of commits 25c9946883 and f9084b6c3f to Android makefile

Fixes the following building error:

In file included from external/mesa/src/panfrost/bifrost/bifrost_compile.c:36:
external/mesa/src/panfrost/bifrost/compiler.h:31:10: fatal error: 'bi_opcodes.h' file not found
         ^~~~~~~~~~~~~~
1 error generated.

Fixes: 25c9946883 ("pan/bi: Generate bi_opcodes.c")
Fixes: f9084b6c3f ("pan/bi: Generate bi_opcodes.h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8239>
This commit is contained in:
Mauro Rossi 2020-12-26 14:02:13 +01:00
parent c0bae8d67f
commit 017edcd63d
1 changed files with 16 additions and 0 deletions

View File

@ -84,6 +84,8 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_GENERATED_SOURCES := \
$(intermediates)/bifrost_nir_algebraic.c \
$(intermediates)/bi_generated_pack.h \
$(intermediates)/bi_opcodes.c \
$(intermediates)/bi_opcodes.h \
$(MESA_GEN_GLSL_H)
bifrost_nir_algebraic_gen := $(LOCAL_PATH)/bifrost/bifrost_nir_algebraic.py
@ -101,6 +103,20 @@ $(intermediates)/bi_generated_pack.h: $(bi_generated_pack_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $(bi_generated_pack_gen) $< > $@
bi_opcodes_c_gen := $(LOCAL_PATH)/bifrost/bi_opcodes.c.py
bi_opcodes_c_deps := $(LOCAL_PATH)/bifrost/ISA.xml $(LOCAL_PATH)/bifrost/bifrost_isa.py
$(intermediates)/bi_opcodes.c: $(bi_opcodes_c_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $(bi_opcodes_c_gen) $< > $@
bi_opcodes_h_gen := $(LOCAL_PATH)/bifrost/bi_opcodes.h.py
bi_opcodes_h_deps := $(LOCAL_PATH)/bifrost/ISA.xml $(LOCAL_PATH)/bifrost/bifrost_isa.py
$(intermediates)/bi_opcodes.h: $(bi_opcodes_h_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $(bi_opcodes_h_gen) $< > $@
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(MESA_TOP)/src/panfrost/bifrost/ \