From c84d38d051d677b949c3a842337e2b524bf2f073 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20Le=20Calvar?= <theo.le-calvar@imt-atlantique.fr>
Date: Fri, 28 Feb 2025 15:04:12 +0100
Subject: [PATCH] update Makefile to have run & debug targets

---
 Makefile | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 695cd32..1a48d15 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ CPP_Linux=g++
 LD_Linux=ld
 COMPOP_Linux=-fno-stack-protector -m32
 LIEUR_Linux=-m elf_i386
+QEMU=qemu-system-i386 
 
 #-------------------
 ##POUR WINDOWS
@@ -77,8 +78,17 @@ clean:
 	$(DELE) *.s
 	$(DELE) build/boot/*.elf
 
-run:
-	cd build/boot && qemu -no-kvm -M isapc -L "/usr/share/qemu" -net nic,model=ne2k_isa -net user -tftp ./ -cdrom grub.iso -soundhw pcspk -m 4 
+run: $(KERNEL_OBJ)
+	$(QEMU) -display curses -net nic,model=ne2k_isa -net user,tftp=./build/boot -cdrom ./build/boot/grub.iso
+
+run_gui: $(KERNEL_OBJ)
+	$(QEMU) -net nic,model=ne2k_isa -net user,tftp=./build/boot -cdrom ./build/boot/grub.iso
+
+debug: $(KERNEL_OBJ)
+	$(QEMU) -display curses -S -s  -net nic,model=ne2k_isa -net user,tftp=./build/boot -cdrom ./build/boot/grub.iso
+
+debug_gui: $(KERNEL_OBJ)
+	$(QEMU) -S -s  -net nic,model=ne2k_isa -net user,tftp=./build/boot -cdrom ./build/boot/grub.iso
 
 show:
 	@echo "objects:$(OBJECTS)"
-- 
GitLab