diff --git a/Makefile b/Makefile index 2f94692..3d77f18 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ C_FILES := $(shell find src/ -name '*.c') all: $(BUILD_DIR)/$(NAME) -# Top-level targets +# Top-level target : vriscv $(BUILD_DIR)/$(NAME): $(C_FILES) | $(BUILD_DIR) $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) @@ -19,7 +19,7 @@ $(BUILD_DIR)/$(NAME): $(C_FILES) | $(BUILD_DIR) $(BUILD_DIR): mkdir -p $(BUILD_DIR) -# Phony targets +# Clean : clean build directory .PHONY: clean clean: rm -rf $(BUILD_DIR) @@ -27,6 +27,7 @@ clean: rungdb: all echo $(shell objdump -h ../riscv-pk/build/bbl | grep .payload | awk '{print $4}') +# Linux and bootloader, for running linux $(BUILD_DIR)/linux: cd $(BUILD_DIR) && git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth 1 -b v6.6 @@ -51,11 +52,13 @@ $(BUILD_DIR)/riscv-pk/build/bbl: $(BUILD_DIR)/linux/vmlinux hardware/vriscv.dts --with-payload=../../linux/vmlinux cd $(BUILD_DIR)/riscv-pk/build && make && make install +# Run : run linux on the emulator .PHONY: run .SILENT: run run: all $(BUILD_DIR)/riscv-pk/build/bbl ./$(BUILD_DIR)/$(NAME) -m4096 $(BUILD_DIR)/riscv-pk/build/bbl +# Test : all the tests .PHONY: tests .SILENT: tests tests: all