Update bootloader README and clean up makefile

This commit is contained in:
2025-09-02 15:46:55 -05:00
parent 0845370c43
commit a0427ad949
2 changed files with 28 additions and 24 deletions

View File

@@ -8,13 +8,14 @@
# Project Defaults & Folders
# ------------------------------------------------------------------------------
TARGET := boot
TARGROM := $(TARGET).bin
SRCDIR := src/
TARGET := boot
TARGREC := $(TARGET).s19
TARGROM := $(TARGET).bin
SRCDIR := src/
BUILDDIR := build/
SRCS := $(wildcard $(SRCDIR)*.s)
OBJS := $(patsubst $(SRCDIR)%.s,$(BUILDDIR)%.o,$(SRCS))
INCS := $(wildcard $(SRCDIR)*.inc)
SRCS := $(wildcard $(SRCDIR)*.s)
OBJS := $(patsubst $(SRCDIR)%.s,$(BUILDDIR)%.o,$(SRCS))
INCS := $(wildcard $(SRCDIR)*.inc)
# ------------------------------------------------------------------------------
# Toolchain Definitions
@@ -34,11 +35,11 @@ LDFLAGS := -f srec -m map.txt -s linkscript
all: $(TARGROM)
# Fix srec into flashable bin file
$(TARGROM): $(TARGET).s19
$(TARGROM): $(TARGREC)
$(FIX) -out $@ $<
# Link objects
$(TARGET).s19: $(OBJS)
$(TARGREC): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
# Assemble objects
@@ -46,7 +47,6 @@ $(OBJS): $(BUILDDIR)%.o : $(SRCDIR)%.s
-@mkdir -p $(BUILDDIR)
$(AS) $(ASFLAGS) -o $@ $<
.IGNORE: clean
clean:
@echo 'Cleaning up intermediary files...'
@rm -rv $(TARGROM) $(TARGET).s19 map.txt $(BUILDDIR)
@rm -rv $(TARGROM) $(TARGREC) map.txt $(BUILDDIR)