BurritOS/Makefile

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/ 2> /dev/null \;
clean:
$(MAKE) clean -C userlib/
$(MAKE) clean -C test/
$(RM) -rf $(TOPDIR)/target
#
# Demo targets
#
halt: syscall
${CARGO} -x ./target/guac/halt.guac -d3
pc: syscall
${CARGO} -x ./target/guac/producteur_consommateur.guac -d2
matmult: syscall
${CARGO} -x ./target/guac/matmult.guac -d2
lock: syscall
${CARGO} -x ./target/guac/lock.guac -d2
prints: syscall
${CARGO} -x ./target/guac/prints.guac -d2