TARGET_PLATFORMS=amd64 aarch64 ALL_IMAGES=$(addprefix image-,$(TARGET_PLATFORMS)) TARGET_TRIPLE_aarch64=aarch64-unknown-linux-musl TARGET_TRIPLE_amd64=x86_64-unknown-linux-musl CONTAINER_ARCH_aarch64=--arch arm64 --variant v8 CONTAINER_ARCH_amd64=--arch amd64 .PHONY: help manifest help: @echo "Available targets:" @echo " help" @echo " manifest" @echo " $(ALL_IMAGES)" manifest: $(ALL_IMAGES) $(ALL_MANIFESTS) @echo 'podman manifest push --all localhost/uidc:latest to push the manifest.' base-manifest: @-podman manifest rm localhost/uidc:latest 2>/dev/null podman manifest create localhost/uidc:latest manifest-%: base-manifest podman manifest add localhost/uidc:latest containers-storage:localhost/uidc:latest-$* image-%: cargo build --release --target $(TARGET_TRIPLE_$(*)) podman build $(CONTAINER_ARCH_$(*)) -f Containerfile -t uidc:latest-$* --build-arg=TARGET_PATH=target/$(TARGET_TRIPLE_$(*))/release/