flto only on release mode + add strip target
This commit is contained in:
parent
a0bd0b8772
commit
7b04ae7797
1 changed files with 6 additions and 2 deletions
8
Makefile
8
Makefile
|
@ -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)
|
||||||
|
|
Reference in a new issue