build: add a "user" arch to allow the kernel to run as a program on the host machine
This commit is contained in:
13
arch/user/extra.mk
Normal file
13
arch/user/extra.mk
Normal file
@@ -0,0 +1,13 @@
|
||||
run: $(BUILD_DIR)/$(KERNEL_EXEC)
|
||||
@printf " \033[1;93mEXEC\033[0m $<\n"
|
||||
|
||||
@$(BUILD_DIR)/$(KERNEL_EXEC)
|
||||
|
||||
debug: $(BUILD_DIR)/$(KERNEL_EXEC)
|
||||
@if command -v gdb &> /dev/null; then \
|
||||
gdb -tui $(BUILD_DIR)/$(KERNEL_EXEC) \
|
||||
elif commad -v lldb &> /dev/null; then \
|
||||
lldb -- $(BUILD_DIR)/$(KERNEL_EXEC) \
|
||||
else \
|
||||
printf "No debuggers available." \
|
||||
endif
|
||||
Reference in New Issue
Block a user