summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-07-01 16:11:07 +1000
committerMaxime Coste <mawww@kakoune.org>2025-07-01 16:11:07 +1000
commitce7ace466b05566d02d7a5162037a31e62a8dd2e (patch)
treeec17e9916b58c521885bd5dea1b887738bec2bb0
parentc24215b2b2935f86c2ac1fb26bd6294030ea00b1 (diff)
Add a static tag to when linking
This fixes going from static to non-static linking by having different output files, the final symlink will point to the latest built config, as usual.
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b1f70826..8858b01c 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@ gzip_man = yes
# to get format compatible with GitHub archive use "gzip -S .gz" here
compress_bin = bzip2
+tag-static-no=
+tag-static-yes=.static
+
compress-suffix-bzip2 = bz2
compress-suffix-zstd = zst
@@ -96,6 +99,7 @@ KAK_LIBS = \
$(LIBS)
tag = $(tag-debug-$(debug))$(tag-sanitize-$(sanitize))
+tagbin = $(tag)$(tag-static-$(static))
.SUFFIXES: $(tag).o .cc
.PHONY: src/kak
@@ -106,10 +110,10 @@ objects = $(sources:.cc=$(tag).o)
all: src/kak
-src/kak: src/kak$(tag)
- ln -sf kak$(tag) $@
+src/kak: src/kak$(tagbin)
+ ln -sf kak$(tagbin) $@
-src/kak$(tag): src/.version.o $(objects)
+src/kak$(tagbin): src/.version.o $(objects)
$(CXX) $(KAK_LDFLAGS) $(KAK_CXXFLAGS) $(objects) src/.version.o $(KAK_LIBS) -o $@
deps = $(shell touch src/.version$(tag).d && find src -type f -name '.*$(tag).d') # Ensure we find one deps for FreeBSD make