From 7b04ae77977d730c45ab443b69c963d95cbde4bf Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 7 May 2023 20:54:24 +0200 Subject: [PATCH] flto only on release mode + add strip target --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8a13f36..fcf596c 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,11 @@ DU = du --bytes --human-readable TAIL = tail GREP = grep AWK = awk +STRIP = strip -s # Déclaration des options du compilateur -COPTI = -O3 -CFLAGS = -Wall $(COPTI) -std=c17 -flto +COPTI = -O3 -flto +CFLAGS = -Wall $(COPTI) -std=c17 CPPFLAGS = -I. LDFLAGS = -lm @@ -80,6 +81,9 @@ debug: $(PROGNAME) %.o: %.c $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ +strip: + $(STRIP) $(PROGNAME) + dist: distdir $(CHMOD) -R a+r $(distdir) $(TAR) zcvf $(distdir).tgz $(distdir)