Start of new fw
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user