65X-DOS/config/kernel.mk

20 lines
663 B
Makefile

KERNEL_ASM_SRC := $(wildcard src/kernel/*.s) \
$(wildcard src/kernel/*/*.s) \
$(wildcard src/kernel/*/*/*.s) \
$(wildcard src/kernel/*/*/*/*.s) \
$(wildcard src/kernel/*/*/*/*.s)
KERNEL_C_SRC := $(wildcard src/kernel/*.c) \
$(wildcard src/kernel/*/*.c) \
$(wildcard src/kernel/*/*/*.c) \
$(wildcard src/kernel/*/*/*/*.c) \
$(wildcard src/kernel/*/*/*/*/*.c)
KERNEL_OBJ := $(KERNEL_ASM_SRC:.s=.o)
KERNEL_OBJ += $(KERNEL_C_SRC:.c=.o)
KERNEL_LDFLAGS := --list-file build/kernel.lst
build/kernel.bin: $(KERNEL_OBJ)
echo "Linking $@..."
$(LD) -o $@ config/kernel.scm $(LDFLAGS) $(KERNEL_LDFLAGS) $^
mv build/kernel.raw $@