From d6974a03a0b6db6eaffe7b43a7e7dbd6f403bc07 Mon Sep 17 00:00:00 2001 From: NotYourFox Date: Mon, 13 Jan 2025 23:41:00 +0300 Subject: [PATCH] Add -Ikernel/arch/include to include path and support .S as a GAS extension --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2b74d95..0a7b820 100644 --- a/Makefile +++ b/Makefile @@ -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