feat(buzbee): BUZBEE command tables now generated with bbmkcmds.c

This commit is contained in:
2025-10-01 17:24:32 -05:00
parent d7d8532021
commit eafc0ce98e
4 changed files with 77 additions and 41 deletions

View File

@@ -13,7 +13,7 @@ TARGREC := $(TARGET).s19
TARGROM := $(TARGET).bin
SRCDIR := src/
BUILDDIR := build/
GENS := $(SRCDIR)version.s
GENS := $(SRCDIR)version.s $(SRCDIR)bbcmds.s
SRCS := $(wildcard $(SRCDIR)*.s)
OBJS := $(patsubst $(SRCDIR)%.s,$(BUILDDIR)%.o,$(SRCS))
INCS := $(wildcard $(SRCDIR)*.inc)
@@ -48,11 +48,18 @@ $(OBJS): $(BUILDDIR)%.o : $(SRCDIR)%.s
-@mkdir -p $(BUILDDIR)
$(AS) $(ASFLAGS) -o $@ $<
# Pseudo target for generation step
generate: $(GENS)
$(GENS):
# Run generation scripts
$(GENS): bbmkcmds
./bbmkcmds > src/bbcmds.s
./genver.sh
# Build bbmkcmds, used to generate src/cmds.s
bbmkcmds: bbmkcmds.c
cc -o $@ $<
clean:
@echo 'Cleaning up intermediary files...'
@rm -rv $(TARGROM) $(TARGREC) map.txt $(BUILDDIR)