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
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)