BurritOS/Makefile
2023-05-10 11:19:08 +02:00

56 lines
1.1 KiB
Makefile

TOPDIR=.
include $(TOPDIR)/Makefile.config
#
# Demo vars
#
FLAGS=--offline -r --
CARGO=RUSTFLAGS=-Awarnings cargo run ${FLAGS}
all: dumps user_lib instruction_tests syscall
#
# Main targets
#
instruction_tests:
$(MAKE) build -C test/riscv_instructions/
dumps:
$(MAKE) dumps -C test/riscv_instructions/
mkdir -p ${TOPDIR}/target/dumps/
find . -path ${TOPDIR}/target -prune -o -name '*.dump' -exec mv {} ${TOPDIR}/target/dumps/ \;
user_lib:
$(MAKE) -C userlib/
syscall: user_lib
$(MAKE) build -C test/syscall_tests/
$(RM) test/syscall_tests/*.o
mkdir -p ${TOPDIR}/target/guac/
find . -name '*.guac' -exec mv {} ${TOPDIR}/target/guac/ \;
clean:
$(MAKE) clean -C userlib/
$(MAKE) clean -C test/
$(RM) -rf $(TOPDIR)/target
#
# Demo targets
#
halt: syscall
${CARGO} -x ./target/guac/halt.guac -d2
pc: syscall
${CARGO} -x ./target/guac/producteur_consommateur.guac -d2
matmult: syscall
${CARGO} -x ./target/guac/matmult.guac -d2
lr: syscall
${CARGO} -x ./target/guac/lecteur_redacteur.guac -d2
prints: syscall
${CARGO} -x ./target/guac/prints.guac -d2