kernel/Makefile: add itself to dependency of built files and disable flanterm bump

This commit is contained in:
Matheus
2025-11-02 21:40:39 -03:00
parent 07a4c41199
commit bc6dd3ae65
+4 -3
View File
@@ -5,6 +5,7 @@ INCDIR=$(shell pwd)/include
ARCHINCDIR=$(shell pwd)/include/$(TARGET)/
ARCHDIR=$(shell pwd)/arch/$(TARGET)/
LDFLAGS=-ffreestanding -nostdlib -lgcc -Wl,-T,"$(ARCHDIR)/kernel.ld" -g
FLANTERMOPTS=-DFLANTERM_FB_DISABLE_BUMP_ALLOC
# required for mpaland printf so it doesn't compile with floating point support, which results in build failures
PRINTFOPTS=-DPRINTF_DISABLE_SUPPORT_FLOAT
# flanterm includes break if the headers are moved into the include dir in the tree
@@ -12,7 +13,7 @@ FLANTERMINCDIR=$(shell pwd)/flanterm
UACPIINCDIR=$(shell pwd)/io/acpi/uacpi/include
UACPIOPTS=-DUACPI_OVERRIDE_LIBC -DUACPI_KERNEL_INITIALIZATION -DUACPI_NATIVE_ALLOC_ZEROED
KERNELCONFIG=#-DX86_64_ENABLE_E9 -DSYSCALL_LOGGING
CFLAGS=-g -ffreestanding -mcmodel=kernel -O2 -mno-red-zone -mgeneral-regs-only -mno-mmx -mno-sse -mno-sse2 -nostdlib -Wall -MMD -I "${INCDIR}" -I "$(ARCHINCDIR)" -I "$(FLANTERMINCDIR)" -I "$(UACPIINCDIR)" $(UACPIOPTS) $(PRINTFOPTS) $(KERNELCONFIG)
CFLAGS=-g -ffreestanding -mcmodel=kernel -O2 -mno-red-zone -mgeneral-regs-only -mno-mmx -mno-sse -mno-sse2 -nostdlib -Wall -MMD -I "${INCDIR}" -I "$(ARCHINCDIR)" -I "$(FLANTERMINCDIR)" -I "$(UACPIINCDIR)" $(UACPIOPTS) $(PRINTFOPTS) $(KERNELCONFIG) $(FLANTERMOPTS)
ASFLAGS=-felf64
DEPS=$(CSOURCES:.c=.d)
@@ -30,11 +31,11 @@ astral: $(OBJS)
@echo [LD] $@
@$(LD) $(LDFLAGS) -o $@ $^
%.o: %.c
%.o: %.c Makefile
@echo [CC] $@
@$(CC) $(CFLAGS) -c -o $@ $<
%.asmo: %.asm
%.asmo: %.asm Makefile
@echo [AS] $@
@nasm $(ASFLAGS) -o $@ $<