aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-02 12:55:24 +0200
committeruser <user@clank>2026-09-02 12:55:24 +0200
commit89dc98578d32cd9784869cd499ae7b9ea51da272 (patch)
tree8f9da270d6bdaeb4effaa7cede6a1a88b24a60a0
parentweb: cleanup (diff)
downloadslosh-89dc98578d32cd9784869cd499ae7b9ea51da272.tar.gz
slosh-89dc98578d32cd9784869cd499ae7b9ea51da272.tar.xz
slosh-89dc98578d32cd9784869cd499ae7b9ea51da272.zip
find zig on PATH instead of hardcoding ~/zig-0.16.0/zig
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9f5de27..2f56cf5 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,12 @@
# zig is the C compiler: it is already required to build libghostty-vt, and it
# gives us static musl linking and cross-compilation for free (D12).
-ZIG ?= $(HOME)/zig-0.16.0/zig
+# Honour an explicit ZIG=... on the command line or in the environment;
+# otherwise use whatever `zig` is on $PATH.
+ZIG ?= $(shell command -v zig 2>/dev/null)
+ifeq ($(ZIG),)
+ $(error zig not found on $$PATH -- install it or pass ZIG=/path/to/zig)
+endif
CC := $(ZIG) cc
VT := vendor/libghostty-vt
VT_OUT := $(VT)/zig-out