flto only on release mode + add strip target

This commit is contained in:
Mylloon 2023-05-07 20:54:24 +02:00
parent a0bd0b8772
commit 7b04ae7797
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -19,10 +19,11 @@ DU = du --bytes --human-readable
TAIL = tail TAIL = tail
GREP = grep GREP = grep
AWK = awk AWK = awk
STRIP = strip -s
# Déclaration des options du compilateur # Déclaration des options du compilateur
COPTI = -O3 COPTI = -O3 -flto
CFLAGS = -Wall $(COPTI) -std=c17 -flto CFLAGS = -Wall $(COPTI) -std=c17
CPPFLAGS = -I. CPPFLAGS = -I.
LDFLAGS = -lm LDFLAGS = -lm
@ -80,6 +81,9 @@ debug: $(PROGNAME)
%.o: %.c %.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
strip:
$(STRIP) $(PROGNAME)
dist: distdir dist: distdir
$(CHMOD) -R a+r $(distdir) $(CHMOD) -R a+r $(distdir)
$(TAR) zcvf $(distdir).tgz $(distdir) $(TAR) zcvf $(distdir).tgz $(distdir)