From 363288a8ca189b64754f25bdb62b9425b53c284d Mon Sep 17 00:00:00 2001 From: Anri Kennel Date: Fri, 26 May 2023 21:06:23 +0200 Subject: [PATCH] optimisation of size (#1) --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3474287..9a685ac 100644 --- a/Makefile +++ b/Makefile @@ -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)