From 113d100250b08c47d421884a3a355aca7b6ef5f2 Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Thu, 17 Aug 2023 15:39:14 +0300 Subject: [PATCH] Add an optional strip step to the Makefile It can be used like: > make clean && make -j CC=clang AR=llvm-ar STRIP=llvm-strip --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index f2afed00..5339d1e6 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,9 @@ libtree-sitter.$(SOEXTVER): $(OBJ) $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ ln -sf $@ libtree-sitter.$(SOEXT) ln -sf $@ libtree-sitter.$(SOEXTVER_MAJOR) +ifneq ($(STRIP),) + $(STRIP) $@ +endif install: all install -d '$(DESTDIR)$(LIBDIR)'