From b7b97d32cbb6fbc928078ebe3a00714cbbebea86 Mon Sep 17 00:00:00 2001 From: EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:38:34 -0500 Subject: got grub memory map and added to kernel printf --- kernel/makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'kernel/makefile') diff --git a/kernel/makefile b/kernel/makefile index c1aa57f..6c563b8 100644 --- a/kernel/makefile +++ b/kernel/makefile @@ -44,6 +44,9 @@ OBJECTS := $(patsubst %.c,%.o,$(C_SOURCES)) OBJECTS += $(patsubst %.cpp,%.o,$(CPP_SOURCES)) OBJECTS += $(patsubst %.asm,%.o,$(ASMFILES)) +DEPFILES := $(patsubst %.c,%.d,$(SRCFILES)) +DEPFILES += $(patsubst %.cpp,%.d,$(SRCFILES)) + LINKLST := crti.o LINKLST += $(CRTBEGIN) LINKLST += $(OBJECTS) @@ -51,6 +54,8 @@ LINKLST += $(LIBS) LINKLST += $(CRTEND) LINKLST += crtn.o +-include $(DEPFILES) + .PHONY: all crt clean all: crti.o crtn.o kernel.bin @@ -61,11 +66,11 @@ kernel.bin: ${OBJECTS} %.o: %.cpp $(info [INFO] Compiling $<) - $(CXX) ${CXXFLAGS} -c $< -o $@ + $(CXX) ${CXXFLAGS} -MMD -MP -c $< -o $@ %.o: %.c $(info [INFO] Compiling $<) - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ %.o: %.asm $(info [INFO] Assembling $<) @@ -78,8 +83,8 @@ crtn.o: $(NASM) arch/$(ARCH)/crtn.asm -felf32 -o $@ install-headers: - cp -r --preserve=timestamps include $(SYSROOT)/usr/include + cp -r --preserve=timestamps include/. $(SYSROOT)/usr/include clean: $(info [INFO] Cleaning) - rm ${OBJECTS} crti.o crtn.o \ No newline at end of file + rm ${OBJECTS} ${DEPFILES} crti.o crtn.o \ No newline at end of file -- cgit v1.2.3-70-g09d2