Start of new fw

This commit is contained in:
Joppe Blondel
2026-10-07 13:20:33 +02:00
parent 65e71d024c
commit ae419aa2f5
11 changed files with 14305 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
.SILENT:
ASM := zasm
ASMFLAGS := -w -b
BUILDDIR := build
FILES := bios
SUBDIRS := apps/basic
SOURCES := $(addprefix ./, $(addsuffix .asm, $(FILES)))
TARGETS := $(addprefix $(BUILDDIR)/, $(addsuffix .bin, $(FILES)))
TOPTARGETS := all clean size
$(TOPTARGETS): $(SUBDIRS)
all: $(BUILDDIR) $(TARGETS) size
clean:
rm -rf $(BUILDDIR)
$(BUILDDIR):
mkdir -p $(BUILDDIR)
$(BUILDDIR)/%.bin: ./%.asm
echo '>$<'
$(ASM) $(ASMFLAGS) $< $@
size:
@for file in $(TARGETS); do \
if [ -f "$$file" ]; then \
echo "$$file: $$(wc -c < "$$file") bytes"; \
else \
echo "$$file: Not built yet (run 'make')"; \
fi \
done
$(SUBDIRS):
$(MAKE) -C $@ $(or $(MAKECMDGOALS),all) --no-print-directory
.PHONY: $(TOPTARGETS) $(SUBDIRS)