Add -Ikernel/arch/include to include path and support .S as a GAS extension

This commit is contained in:
NotYourFox 2025-01-13 23:41:00 +03:00
parent b7200ff2b1
commit d6974a03a0

View File

@ -2,7 +2,7 @@ SRCS := $(shell find kernel/ -name "*.c" -o -name "*.s")
OBJS := $(patsubst %.c, %.o, $(patsubst %.s, %.o, $(SRCS)))
$(shell mkdir -p $(dir $(OBJS)))
CFLAGS = -m64 -Wall -Werror -std=gnu2x -Ikernel/include -ffreestanding -O0 -fno-stack-protector
CFLAGS = -m64 -Wall -Werror -std=gnu2x -Ikernel/include -Ikernel/arch/include -ffreestanding -O0 -fno-stack-protector -Wno-format
ASFLAGS = -64
.PHONY: all run test clean format
@ -23,7 +23,7 @@ kernel/kernel.elf: $(OBJS)
%.o: %.c
gcc $(CFLAGS) -c -o $@ $<
%.o: %.s
%.o: %.s %.S
as $(ASFLAGS) -o $@ $<
serial.log: cis-os.iso