aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/makefile
diff options
context:
space:
mode:
authorEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-07-18 22:25:44 -0400
committerEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-09-03 14:07:04 -0400
commit8eda325ede02d3fc606a34f7fa3c4922b05a84e4 (patch)
tree881da3ba217871a002e6e79bdfc90149cc589e1d /kernel/makefile
parent82bcab74e6e0c581dcf4ac4d7997aec5c5e14aae (diff)
Remerged the std stuff into the kernel
Diffstat (limited to 'kernel/makefile')
-rw-r--r--kernel/makefile16
1 files changed, 9 insertions, 7 deletions
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)