optimisation of size (#1)

This commit is contained in:
Mylloon 2023-05-26 21:06:23 +02:00
parent 19eebadb17
commit 363288a8ca
Signed by: Forgejo
GPG key ID: E72245C752A07631

View file

@ -2,7 +2,7 @@
# Auteur : Farès BELHADJ
# Email : amsi@up8.edu
# Date : 28/04/2020
# Modified : Anri KENNEL (anri.kennel@etud.univ-paris8.fr) - 03/05/2023
# Modified : Anri KENNEL (anri.kennel@etud.univ-paris8.fr) - 26/05/2023
# Définition des commandes utilisées
CC = gcc
@ -20,9 +20,10 @@ TAIL = tail
GREP = grep
AWK = awk
STRIP = strip -s
UPX = upx
# Déclaration des options du compilateur
COPTI = -O3 -flto
COPTI = -O3
CFLAGS = -Wall $(COPTI) -std=gnu17
CPPFLAGS = -I.
LDFLAGS = -lm
@ -69,6 +70,9 @@ CPPFLAGS += $(shell sdl2-config --cflags)
LDFLAGS += -lGL4Dummies $(shell sdl2-config --libs) -lSDL2_mixer -lSDL2_image -lSDL2_ttf
all: $(PROGNAME)
all: strip
all: upx
$(PROGNAME): $(OBJ)
$(CC) $(OBJ) $(LDFLAGS) -o $(PROGNAME)
@ -84,6 +88,9 @@ debug: $(PROGNAME)
strip:
$(STRIP) $(PROGNAME)
upx:
$(UPX) $(PROGNAME)
dist: distdir
$(CHMOD) -R a+r $(distdir)
$(TAR) zcvf $(distdir).tgz $(distdir)