Makefile: add CONFiG variable, clean and vars targets

This commit is contained in:
Ryan Heywood 2024-01-31 21:28:43 -05:00
parent 373c050f14
commit 4c5ea2b66b
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 13 additions and 3 deletions

View File

@ -1,10 +1,20 @@
# Known configs:
# * airgap
.PHONY: default
default: out/archlinux-baseline-arch-airgap-x86_64.iso
CONFIG ?= airgap
out/archlinux-baseline-arch-%-x86_64.iso: configs/%
.PHONY: default
default: out/archlinux-baseline-arch-$(CONFIG)-x86_64.iso
.PHONY: vars
vars:
@echo "CONFIG ?= $(CONFIG)"
.PHONY: clean
clean:
rm -rf out work || true
out/archlinux-baseline-arch-%-x86_64.iso: configs/%/
$(MAKE) docker-airgap-builder
mkdir -p out
docker run --rm --privileged --volume "$(PWD)/out:/out" airgap-builder $<