Makefile 947 B

1234567891011121314151617181920212223242526272829
  1. TARGET_PLATFORMS=amd64 aarch64
  2. ALL_IMAGES=$(addprefix image-,$(TARGET_PLATFORMS))
  3. TARGET_TRIPLE_aarch64=aarch64-unknown-linux-musl
  4. TARGET_TRIPLE_amd64=x86_64-unknown-linux-musl
  5. CONTAINER_ARCH_aarch64=--arch arm64 --variant v8
  6. CONTAINER_ARCH_amd64=--arch amd64
  7. .PHONY: help manifest
  8. help:
  9. @echo "Available targets:"
  10. @echo " help"
  11. @echo " manifest"
  12. @echo " $(ALL_IMAGES)"
  13. manifest: $(ALL_IMAGES) $(ALL_MANIFESTS)
  14. @echo 'podman manifest push --all localhost/uidc:latest <target> to push the manifest.'
  15. base-manifest:
  16. @-podman manifest rm localhost/uidc:latest 2>/dev/null
  17. podman manifest create localhost/uidc:latest
  18. manifest-%: base-manifest
  19. podman manifest add localhost/uidc:latest containers-storage:localhost/uidc:latest-$*
  20. image-%:
  21. cargo build --release --target $(TARGET_TRIPLE_$(*))
  22. podman build $(CONTAINER_ARCH_$(*)) -f Containerfile -t uidc:latest-$* --build-arg=TARGET_PATH=target/$(TARGET_TRIPLE_$(*))/release/