build: add -s flag to release builds

- Add symbol stripping (-s) to release builds
This commit is contained in:
2026-01-31 21:55:40 +01:00
parent 49ae5ed75e
commit 22c7da4336
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ else
RMDIR = rm -rf $(1)
endif
RELEASE_LDFLAGS := -s
CFLAGS_BASE := -Wall -Wpedantic -I$(INC_DIR) -std=c89 $(CFLAGS_PLAT)
.PHONY: all debug release clean
@@ -36,7 +37,7 @@ obj/debug/%.o: src/%.c
# Release Rules
$(BIN_DIR)/release/$(FULL_LIB): $(SRCS:src/%.c=obj/release/%.o)
@$(call MKDIR,$(@D))
$(CC) -shared -o $@ $^ $(LDFLAGS_PLAT)
$(CC) -shared $(RELEASE_LDFLAGS) -o $@ $^ $(LDFLAGS_PLAT)
obj/release/%.o: src/%.c
@$(call MKDIR,$(@D))