65X-DOS/config/kernel.mk

29 lines
822 B
Makefile
Raw Normal View History

2024-07-08 05:08:08 +02:00
KERNEL_ASM_SRC := $(wildcard src/kernel/*.s) \
$(wildcard src/kernel/*/*.s) \
$(wildcard src/kernel/*/*/*.s) \
$(wildcard src/kernel/*/*/*/*.s) \
$(wildcard src/kernel/*/*/*/*.s)
2024-07-12 08:55:55 +02:00
2024-07-08 05:08:08 +02:00
KERNEL_C_SRC := $(wildcard src/kernel/*.c) \
$(wildcard src/kernel/*/*.c) \
$(wildcard src/kernel/*/*/*.c) \
$(wildcard src/kernel/*/*/*/*.c) \
$(wildcard src/kernel/*/*/*/*/*.c)
2024-07-12 08:55:55 +02:00
FONT_SOURCES := $(wildcard src/kernel/hardware/vera/vera_font_*.ase)
2024-07-08 05:08:08 +02:00
KERNEL_OBJ := $(KERNEL_ASM_SRC:.s=.o)
KERNEL_OBJ += $(KERNEL_C_SRC:.c=.o)
FONTS := $(FONT_SOURCES:.ase=.fnt)
2024-07-12 08:55:55 +02:00
2024-07-08 05:08:08 +02:00
KERNEL_LDFLAGS := --list-file build/kernel.lst
.PHONY: fonts
fonts: $(FONTS)
2024-07-08 05:08:08 +02:00
build/kernel.bin: $(KERNEL_OBJ)
echo "Linking $@..."
2024-07-12 08:55:55 +02:00
echo "$(FONTS)"
2024-07-08 05:08:08 +02:00
$(LD) -o $@ config/kernel.scm $(LDFLAGS) $(KERNEL_LDFLAGS) $^
mv build/kernel.raw $@