Files
switch-bootscripts/Makefile
T
2026-08-11 12:29:19 -08:00

19 lines
458 B
Makefile

SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TXT_FILES := $(wildcard $(SRCDIR)*.txt)
NAMES := $(notdir $(basename $(TXT_FILES)))
OUTS := $(addprefix out/,$(addsuffix /boot.scr,$(NAMES)))
# Default target: build everything
.PHONY: all
all: $(OUTS)
# Pattern rule
# out/<name>/boot.scr is built from <name>.txt
out/%/boot.scr: %.txt
@mkdir -p $(dir $@)
mkimage -A arm -T script -O linux -d $< $@
.PHONY: clean
clean:
rm -rf out