[Makefile] Use actual filenames for opcodes target
@@ -162,17 +162,20 @@ update-deps:
apps:
make -C $(SOFTWARE_DIR) apps
-update_opcodes: update_opcodes_encoding update_opcodes_sverilog
+update_opcodes: software/runtime/encoding.h hardware/deps/snitch/src/riscv_instr.sv
-update_opcodes_encoding:
+software/runtime/encoding.h: toolchain/riscv-opcodes/*
make -C toolchain/riscv-opcodes encoding_out.h
- mv toolchain/riscv-opcodes/encoding_out.h software/runtime/encoding.h
- ln -fsr software/runtime/encoding.h toolchain/riscv-isa-sim/riscv/encoding.h
- ln -fsr software/runtime/encoding.h software/riscv-tests/env/encoding.h #this will change when riscv-tests is a submodule
+ mv toolchain/riscv-opcodes/encoding_out.h $@
+ ln -fsr $@ toolchain/riscv-isa-sim/riscv/encoding.h
+ ln -fsr $@ software/riscv-tests/env/encoding.h #this will change when riscv-tests is a submodule
-update_opcodes_sverilog:
+hardware/deps/snitch/src/riscv_instr.sv: toolchain/riscv-opcodes/*
make -C toolchain/riscv-opcodes inst.sverilog
- mv toolchain/riscv-opcodes/inst.sverilog hardware/deps/snitch/src/riscv_instr.sv
+ mv toolchain/riscv-opcodes/inst.sverilog $@
+
+toolchain/riscv-opcodes/*:
+ git submodule update --init --recursive -- toolchain/riscv-opcodes
format:
$(ROOT_DIR)/scripts/run_clang_format.py --clang-format-executable=$(LLVM_INSTALL_DIR)/bin/clang-format -i -r $(ROOT_DIR)
