summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.mk20
-rw-r--r--config/gdbinit2
-rw-r--r--config/grub.cfg2
3 files changed, 22 insertions, 2 deletions
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..c9cc9df
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,20 @@
+
+AS ?= as
+AR ?= ar
+CC ?= cc
+LD ?= ld
+CPP ?= cpp
+
+CPPFLAGS += -Iinclude
+
+CFLAGS += -O2
+CFLAGS += -std=c11
+CFLAGS += -Wall -Wextra -pedantic
+CFLAGS += -no-pie -fno-stack-protector
+CFLAGS += -fno-omit-frame-pointer -ffreestanding
+CFLAGS += -nostdlib -fno-builtin -mno-red-zone
+CFLAGS += -D DEBUG -g
+CFLAGS += $(CPPFLAGS)
+
+LDFLAGS += -nmagic -nostdlib
+LDFLAGS += -z noexecstack
diff --git a/config/gdbinit b/config/gdbinit
index 30497c6..e253379 100644
--- a/config/gdbinit
+++ b/config/gdbinit
@@ -1,4 +1,4 @@
set architecture i386:x86-64
target remote localhost:1337
-symbol-file bin/kernel.bin
+symbol-file kernel/bin/kernel
display/i $pc
diff --git a/config/grub.cfg b/config/grub.cfg
index 76e28f3..62c9792 100644
--- a/config/grub.cfg
+++ b/config/grub.cfg
@@ -3,6 +3,6 @@ set default=0
insmod all_video
menuentry "kern" {
- multiboot2 /boot/kernel.bin
+ multiboot2 /boot/kernel
boot
}