summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 7 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 6697fc6..84244de 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,19 @@
include config.mk
+CDIRS := boot device initrd klib memory task syscall
+CDIRS += memory/alloc
+CDIRS += boot/$(TARGET_BOOTLOADER)
+CDIRS += arch/$(TARGET_MACHINE)
+
CFILES := $(wildcard *.c)
-CFILES += $(wildcard */*.c)
-CFILES += $(wildcard boot/$(TARGET_BOOTLOADER)/*.c)
-CFILES += $(wildcard arch/$(TARGET_MACHINE)/*.c)
-CFILES += $(wildcard arch/$(TARGET_MACHINE)/*/*.c)
+CFILES += $(foreach dir, $(CDIRS), $(wildcard $(dir)/*.c))
SFILES := $(wildcard *.S)
-SFILES += $(wildcard */*.S)
-SFILES += $(wildcard arch/$(TARGET_MACHINE)/*.S)
-SFILES += $(wildcard arch/$(TARGET_MACHINE)/*/*.S)
+SFILES += $(foreach dir, $(CDIRS), $(wildcard $(dir)/*.S))
OBJFILES := $(patsubst %.c,%.o,$(CFILES))
OBJFILES += $(patsubst %.S,%.o,$(SFILES))
-DFILES := $(wildcard *.d)
-DFILES += $(wildcard */*.d)
-DFILES += $(wildcard arch/$(TARGET_MACHINE)/*.d)
-DFILES += $(wildcard arch/$(TARGET_MACHINE)/*/*.d)
-
BIN := jove.elf
all: $(BIN)