From 8eda325ede02d3fc606a34f7fa3c4922b05a84e4 Mon Sep 17 00:00:00 2001 From: EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:25:44 -0400 Subject: Remerged the std stuff into the kernel --- kernel/makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'kernel/makefile') diff --git a/kernel/makefile b/kernel/makefile index a855808..52f4d00 100644 --- a/kernel/makefile +++ b/kernel/makefile @@ -20,20 +20,22 @@ ifndef SYSROOT $(error No sysroot specified) endif -LIBS = -nostdlib -lc -lgcc +LIBS = -nostdlib -lgcc #Find all the source files +C_SRCS := $(shell find . -type f -name '*.c' -not -path './arch/*') \ + $(shell find $(PWD)/kernel/arch/$(ARCH) -type f -name '*.c') CPP_SRCS := $(shell find . -type f -name '*.cpp' -not -path './arch/*') \ $(shell find $(PWD)/kernel/arch/$(ARCH) -type f -name '*.cpp') HEADERS := $(shell find ./include -type f -name '*.h') ASMFILES := $(shell find . -type f -name '*.asm' -not -path './arch/*') \ $(shell find $(PWD)/kernel/arch/$(ARCH) -type f -name '*.asm') -#OBJS := $(patsubst %.c,%.o,$(C_SOURCES)) -OBJS := $(patsubst %.cpp,%.o,$(CPP_SRCS)) +OBJS := $(patsubst %.c,%.o,$(C_SRCS)) +OBJS += $(patsubst %.cpp,%.o,$(CPP_SRCS)) OBJS += $(patsubst %.asm,%.o,$(ASMFILES)) -#DEPFILES := $(patsubst %.c,%.d,$(C_SOURCES)) +DEPFILES := $(patsubst %.c,%.d,$(C_SOURCES)) DEPFILES := $(patsubst %.cpp,%.d,$(CPP_SRCS)) # LINKLST := crti.o @@ -62,7 +64,7 @@ kernel.bin: ${OBJS} $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ %.o: %.asm - $(info [INFO] Assembling $<) +# $(info [INFO] Assembling $<) $(NASM) $< $(ASMFLAGS) -o $@ -g # crti.o: @@ -71,8 +73,8 @@ kernel.bin: ${OBJS} # crtn.o: # $(NASM) arch/$(ARCH)/crtn.asm $(ASMFLAGS) -o $@ -install-headers: $(HEADERS) - cp -r --preserve=timestamps include/. $(SYSROOT)/usr/include +# install-headers: $(HEADERS) +# cp -r --preserve=timestamps include/. $(SYSROOT)/usr/include clean: $(info [INFO] Cleaning) -- cgit v1.2.3-70-g09d2