diff --git a/Makefile b/Makefile index 768d515..c64f685 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ CPPFLAGS = -MMD AS=nasm ASFLAGS += -f elf32 -LDFLAGS += -g -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector -CFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector -CXXFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie +LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector +CFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector +CXXFLAGS += -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie SUBDIRS := core drivers tests @@ -44,8 +44,10 @@ self_test: clean kernel test:kernel qemu-system-x86_64 -kernel $< +debug: CFLAGS += -g -Og +debug: CXXFLAGS += -g -Og debug:kernel kernel.sym - qemu-system-x86_64 -s -S -kernel kernel + qemu-system-x86_64 -s -S -kernel kernel& gdb -s kernel.sym -ex "target remote localhost:1234" clean: