BurritOS/Makefile

56 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2023-02-08 16:01:41 +01:00
TOPDIR=.
include $(TOPDIR)/Makefile.config
2023-05-10 11:19:08 +02:00
#
# Demo vars
#
FLAGS=--offline -r --
CARGO=RUSTFLAGS=-Awarnings cargo run ${FLAGS}
2023-03-28 17:54:05 +02:00
2023-04-05 17:05:55 +02:00
all: dumps user_lib instruction_tests syscall
2023-02-08 16:01:41 +01:00
#
# Main targets
#
2023-03-28 17:54:05 +02:00
2023-04-05 12:53:34 +02:00
instruction_tests:
$(MAKE) build -C test/riscv_instructions/
2023-03-28 17:54:05 +02:00
2023-03-01 13:44:48 +01:00
dumps:
2023-04-05 12:53:34 +02:00
$(MAKE) dumps -C test/riscv_instructions/
2023-03-08 13:02:03 +01:00
mkdir -p ${TOPDIR}/target/dumps/
find . -path ${TOPDIR}/target -prune -o -name '*.dump' -exec mv {} ${TOPDIR}/target/dumps/ \;
2023-03-08 13:02:03 +01:00
user_lib:
$(MAKE) -C userlib/
2023-04-05 15:09:10 +02:00
syscall: user_lib
$(MAKE) build -C test/syscall_tests/
$(RM) test/syscall_tests/*.o
2023-03-08 13:02:03 +01:00
mkdir -p ${TOPDIR}/target/guac/
find . -name '*.guac' -exec mv {} ${TOPDIR}/target/guac/ \;
2023-02-08 16:01:41 +01:00
clean:
2023-03-28 17:54:05 +02:00
$(MAKE) clean -C userlib/
2023-04-05 17:05:55 +02:00
$(MAKE) clean -C test/
2023-03-28 17:54:05 +02:00
$(RM) -rf $(TOPDIR)/target
2023-05-10 11:19:08 +02:00
#
# Demo targets
#
halt: syscall
2023-05-10 12:23:04 +02:00
${CARGO} -x ./target/guac/halt.guac -d3
2023-05-10 11:19:08 +02:00
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