build: Misc minor changes

This commit is contained in:
mintsuki 2022-07-15 19:17:46 +02:00
parent a0c5019fcf
commit bc0e2dee14

View file

@ -38,7 +38,6 @@ override INTERNALCFLAGS := \
-mabi=sysv \ -mabi=sysv \
-mno-80387 \ -mno-80387 \
-mno-mmx \ -mno-mmx \
-mno-3dnow \
-mno-sse \ -mno-sse \
-mno-sse2 \ -mno-sse2 \
-mno-red-zone \ -mno-red-zone \
@ -57,10 +56,10 @@ override INTERNALNASMFLAGS := \
# Use find to glob all *.c, *.S, and *.asm files in the directory and extract the object names. # Use find to glob all *.c, *.S, and *.asm files in the directory and extract the object names.
override CFILES := $(shell find ./ -type f -name '*.c') override CFILES := $(shell find ./ -type f -name '*.c')
override SFILES := $(shell find ./ -type f -name '*.S') override ASFILES := $(shell find ./ -type f -name '*.S')
override ASMFILES := $(shell find ./ -type f -name '*.asm') override NASMFILES := $(shell find ./ -type f -name '*.asm')
override OBJ := $(CFILES:.c=.o) $(SFILES:.S=.o) $(ASMFILES:.asm=.o) override OBJ := $(CFILES:.c=.o) $(ASFILES:.S=.o) $(NASMFILES:.asm=.o)
override HEADER_DEPS := $(CFILES:.c=.d) $(SFILES:.S=.d) override HEADER_DEPS := $(CFILES:.c=.d) $(ASFILES:.S=.d)
# Default target. # Default target.
.PHONY: all .PHONY: all
@ -73,7 +72,7 @@ limine.h:
$(KERNEL): $(OBJ) $(KERNEL): $(OBJ)
$(CC) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@ $(CC) $(OBJ) $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
# Include header dependencies # Include header dependencies.
-include $(HEADER_DEPS) -include $(HEADER_DEPS)
# Compilation rules for *.c files. # Compilation rules for *.c files.