From abaab98bd757cd0818cfcddc983eee25ab7672ed Mon Sep 17 00:00:00 2001 From: EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> Date: Tue, 7 May 2024 11:07:03 -0400 Subject: Made framebuffer class, serial write functions, and finally got makefile to build without having to make clean --- kernel/makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'kernel/makefile') diff --git a/kernel/makefile b/kernel/makefile index 8c2832d..33ab941 100644 --- a/kernel/makefile +++ b/kernel/makefile @@ -1,8 +1,11 @@ # Kernel makefile -CFLAGS := -ffreestanding -Wall -Wextra -g -std=gnu99 -O2 -Iinclude --sysroot=$(SYSROOT) -CXXFLAGS := -ffreestanding -Wall -Wextra -fno-exceptions -fno-rtti -g -O2 -Iinclude --sysroot=$(SYSROOT) -LDFLAGS := -T arch/$(ARCH)/linker.ld -ffreestanding -g -O2 -Iinclude --sysroot=$(SYSROOT) +CFLAGS := -ffreestanding -Wall -Wextra -g -std=gnu99 -O2 -Iinclude --sysroot=$(SYSROOT) \ + -isystem="/usr/include" +CXXFLAGS := -ffreestanding -Wall -Wextra -fno-exceptions -fno-rtti -g -O2 -Iinclude --sysroot=$(SYSROOT) \ + -isystem="/usr/include" +LDFLAGS := -T arch/$(ARCH)/linker.ld -ffreestanding -g -O2 -Iinclude --sysroot=$(SYSROOT) \ + -isystem="/usr/include" ASMFLAGS := ifeq ($(ARCH),x86_64) @@ -21,7 +24,7 @@ LIBS = -nostdlib -lc -lgcc #Find all the source files CPP_SRCS := $(shell find . -type f -name '*.cpp' -not -path './arch/*') \ $(shell find $(PWD)/kernel/arch/$(ARCH) -type f -name '*.cpp') -#HEADERS := $(shell find $(PWD) -type f -name '*.h') +HEADERS := $(shell find ./include -type f -name '*.h') #ASMFILES := $(shell find $(PWD) -type f -name '*.asm' -prune $(PWD)/arch) \ $(shell find $(PWD)/kernel/arch/$(ARCH) -type f -name '*.asm') @@ -50,11 +53,11 @@ kernel.bin: ${OBJS} $(CXX) ${LDFLAGS} -o $@ $(LINKLST) %.o: %.cpp - $(info [INFO] Compiling $<) +# $(info [INFO] Compiling $<) $(CXX) ${CXXFLAGS} -MMD -MP -c $< -o $@ %.o: %.c - $(info [INFO] Compiling $<) +# $(info [INFO] Compiling $<) $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ %.o: %.asm @@ -67,9 +70,9 @@ kernel.bin: ${OBJS} # crtn.o: # $(NASM) arch/$(ARCH)/crtn.asm $(ASMFLAGS) -o $@ -install-headers: +install-headers: $(HEADERS) cp -r --preserve=timestamps include/. $(SYSROOT)/usr/include clean: $(info [INFO] Cleaning) - $(RM) ${OBJS} $(DEPFILES) \ No newline at end of file + $(RM) ${OBJS} $(DEPFILES) kernel.bin \ No newline at end of file -- cgit v1.2.3-70-g09d2