summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-03-26 13:30:47 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-03-26 13:30:47 +0100
commit5a0c8f2f3115c322759459b93ff056268b955706 (patch)
tree8003264e13b5d5731ee73b67a5ba85329d300ef2
parent93639c5e9cbf777ba9c9702414480f09a694c25e (diff)
downloadteachos-toolchain-5a0c8f2f3115c322759459b93ff056268b955706.tar.xz
teachos-toolchain-5a0c8f2f3115c322759459b93ff056268b955706.zip
build: clean up makefile
-rw-r--r--.gitignore4
-rw-r--r--Makefile30
2 files changed, 24 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 08a5b84..aaec6d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
-/downloads \ No newline at end of file
+/downloads
+/teachos-*.tar
+/teachos-*.tar.xz
diff --git a/Makefile b/Makefile
index 240844c..448461a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+DEPENDS=.depends.mk
+
BINUTILS_VERSION ?= 2.46.0
GCC_VERSION ?= 15.2.0
GDB_VERSION ?= 17.1
@@ -16,20 +18,30 @@ MPC_VERSION ?= 1.3.1
TARGET ?= x86_64-pc-elf
PLATFORM ?= x86-64
+REGISTRY ?= registry.gitlab.ost.ch:45023
+
IMAGE_BUILD ?= 4
-IMAGE_NAME = "registry.gitlab.ost.ch:45023/teachos/devcontainers"
-IMAGE_TAG = "$(PLATFORM):$(GCC_VERSION)-$(IMAGE_BUILD)"
-ARCHIVE_NAME = "teachos-$(PLATFORM)-$(GCC_VERSION)-$(IMAGE_BUILD).tar.xz"
+IMAGE_BASENAME = teachos/devcontainers
+IMAGE_NAME = $(REGISTRY)/$(IMAGE_BASENAME)
+IMAGE_TAG = $(PLATFORM):$(GCC_VERSION)-$(IMAGE_BUILD)
+ARCHIVE_NAME = teachos-$(PLATFORM)-$(GCC_VERSION)-$(IMAGE_BUILD).tar
+
+.PHONY: all clean container_image
+
+all: $(ARCHIVE_NAME).xz
+
+clean:
+ rm -f $(ARCHIVE_NAME)
+ rm -f $(ARCHIVE_NAME).xz
-all: toolchain_archive
+$(ARCHIVE_NAME): container_image
+ podman run --rm --volume $(mkfile_dir):/mnt $(IMAGE_NAME)/$(IMAGE_TAG) tar -C /opt/toolchain -c -a -f /mnt/$(ARCHIVE_NAME) .
-toolchain_archive: container_image
- podman run --name teachos-toolchain-archive $(IMAGE_NAME)/$(IMAGE_TAG) tar -C /opt/toolchain -c -a -f /$(ARCHIVE_NAME) .
- podman cp teachos-toolchain-archive:/$(ARCHIVE_NAME) $(ARCHIVE_NAME)
- podman rm teachos-toolchain-archive
+$(ARCHIVE_NAME).xz: $(ARCHIVE_NAME)
+ xz --keep --force --compress -9 --check=sha256 $(ARCHIVE_NAME)
-container_image:
+container_image: Containerfile
podman pull docker.io/ubuntu:questing
podman build \
--volume $(mkfile_dir)downloads:/downloads \