From 017edcd63dd3d7a32c82010399cb9aa743cbb2e6 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 26 Dec 2020 14:02:13 +0100 Subject: [PATCH] android: pan/bi: Generate bi_opcodes.{c,h} Porting of commits 25c9946883ce and f9084b6c3f13 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: 25c9946883ce ("pan/bi: Generate bi_opcodes.c") Fixes: f9084b6c3f13 ("pan/bi: Generate bi_opcodes.h") Signed-off-by: Mauro Rossi Acked-by: Alyssa Rosenzweig Part-of: --- src/panfrost/Android.bifrost.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/panfrost/Android.bifrost.mk b/src/panfrost/Android.bifrost.mk index ad280fc43b6..3dfa573f8fb 100644 --- a/src/panfrost/Android.bifrost.mk +++ b/src/panfrost/Android.bifrost.mk @@ -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/ \