build: musl static by default, glibc optional, strip the release binary

This commit is contained in:
2026-09-09 16:10:17 -04:00
parent e5c6c8d3f0
commit e52e97a825
2 changed files with 35 additions and 0 deletions
+6
View File
@@ -3,10 +3,16 @@ AM_CFLAGS = -Wall -Wextra -O2 -pthread
bin_PROGRAMS = fastwc
fastwc_SOURCES = src/main.c
# configure.ac fills this in with -static when the default musl toolchain
# was selected (empty for --enable-glibc builds).
fastwc_LDFLAGS = @STATIC_LDFLAGS@
# Release build consumed by benchmarks/ (expects bin/release/fastwc).
# Strip the copy, not the tree binary: the debug build stays debuggable.
release: all
$(MKDIR_P) bin/release
cp -f fastwc bin/release/fastwc
$(STRIP) bin/release/fastwc
# Convenience: build the release binary, then run every benchmark suite.
bench: release