aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.windows
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-28 15:38:27 +0200
committeruser <user@clank>2026-08-28 15:38:27 +0200
commit67e0330e5f18e4fe7f87db978071c6afa77ee91b (patch)
tree73c544d533bead3c4f8cfdeff8c66de7b77df94a /Makefile.windows
parentwindows watcher: rebuild the watch set instead of freezing it (diff)
downloadslosh-67e0330e5f18e4fe7f87db978071c6afa77ee91b.tar.gz
slosh-67e0330e5f18e4fe7f87db978071c6afa77ee91b.tar.xz
slosh-67e0330e5f18e4fe7f87db978071c6afa77ee91b.zip
windows release: a zip in dist/, built beside the linux tarballs
make -f Makefile.windows dist stages slosh.exe as slosh-<version>-windows-<arch>.zip -- a zip, not a tarball, because Windows is the machine that will open it -- carrying the same licensing paperwork as the linux tarballs, with docs/windows.md riding along instead of the manpages. `make release` now builds both architectures via release-windows, so the windows zips land under the same SHA256SUMS as everything else.
Diffstat (limited to 'Makefile.windows')
-rw-r--r--Makefile.windows21
1 files changed, 20 insertions, 1 deletions
diff --git a/Makefile.windows b/Makefile.windows
index 6a5e68f..adaff3a 100644
--- a/Makefile.windows
+++ b/Makefile.windows
@@ -21,6 +21,13 @@ VT_VERSION := $(shell sed -n 's/^[[:space:]]*\.version = "\([^"]*\)".*/\1/p' $(V
OUT := build/win-$(ARCH)
VERSION := $(shell contrib/version 2>/dev/null || cat VERSION)
+DIST ?= dist
+STEM := slosh-$(VERSION)-windows-$(ARCH)
+# The zip carries the same licensing paperwork as the linux tarballs
+# (libghostty-vt and stb_image are linked in -- see THIRD-PARTY-LICENSES).
+# The manpages are useless on Windows, so docs/windows.md rides along instead.
+REL_DOCS := README.md LICENSE THIRD-PARTY-LICENSES docs/windows.md
+
CFLAGS := -std=c23 -O1 -g -Wall -Wextra -Wno-unused-parameter -MMD -MP \
-Icompat/win -I$(VT_INC) -Iinclude -I$(OUT) \
-DGHOSTTY_STATIC \
@@ -41,7 +48,7 @@ else
say = @:
endif
-.PHONY: all clean vendor-win FORCE
+.PHONY: all dist clean vendor-win FORCE
.DEFAULT_GOAL := all
all: $(BIN)
@@ -87,6 +94,18 @@ $(OUT)/logo.h: logo.txt | $(OUT)
sed -e 's/\\\\/\\\\\\\\/g' -e 's/"/\\\\"/g' -e 's/^/ "/' -e 's/$$/",/' logo.txt; \
printf '};\n'; } > $@
+# The release artifact: the binary plus the paperwork, as a zip, because a
+# tarball is the wrong shape on the machine that will open it.
+dist: $(BIN)
+ @mkdir -p $(DIST)
+ @rm -rf "$(DIST)/$(STEM)" "$(DIST)/$(STEM).zip"
+ @mkdir -p "$(DIST)/$(STEM)"
+ @cp "$(BIN)" "$(DIST)/$(STEM)/slosh.exe"
+ @cp $(REL_DOCS) "$(DIST)/$(STEM)/"
+ @(cd $(DIST) && zip -qr "$(STEM).zip" "$(STEM)")
+ @rm -rf "$(DIST)/$(STEM)"
+ $(call say,[ZIP],$(DIST)/$(STEM).zip)
+
$(VT_LIB): vendor-win
vendor-win: