From 39bb50a992b1914262d729362d5a799e748f0bae Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 15 Nov 2023 13:59:12 -0500 Subject: [PATCH] Makefile: only search for files in KDIRS --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9b35045..390ab5e 100644 --- a/Makefile +++ b/Makefile @@ -56,9 +56,11 @@ ifeq ($(shell $(LD) --help 2>&1 | grep 'no-pie' >/dev/null 2>&1; echo $$?),0) override LDFLAGS += -no-pie endif +KDIRS := dev/ fs/ lib/ mem/ sched/ init/ + # 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 ASFILES := $(shell find . -type f -name '*.S') +override CFILES := $(shell find $(KDIRS) -type f -name '*.c') +override ASFILES := $(shell find $(KDIRS) -type f -name '*.S') override OBJ := $(CFILES:.c=.o) $(ASFILES:.S=.o) override HEADER_DEPS := $(CFILES:.c=.d) $(ASFILES:.S=.d)