optimisation of size #1
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -2,7 +2,7 @@
|
||||||
# Auteur : Farès BELHADJ
|
# Auteur : Farès BELHADJ
|
||||||
# Email : amsi@up8.edu
|
# Email : amsi@up8.edu
|
||||||
# Date : 28/04/2020
|
# 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
|
# Définition des commandes utilisées
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
@ -20,9 +20,10 @@ TAIL = tail
|
||||||
GREP = grep
|
GREP = grep
|
||||||
AWK = awk
|
AWK = awk
|
||||||
STRIP = strip -s
|
STRIP = strip -s
|
||||||
|
UPX = upx
|
||||||
|
|
||||||
# Déclaration des options du compilateur
|
# Déclaration des options du compilateur
|
||||||
COPTI = -O3 -flto
|
COPTI = -O3
|
||||||
CFLAGS = -Wall $(COPTI) -std=gnu17
|
CFLAGS = -Wall $(COPTI) -std=gnu17
|
||||||
CPPFLAGS = -I.
|
CPPFLAGS = -I.
|
||||||
LDFLAGS = -lm
|
LDFLAGS = -lm
|
||||||
|
@ -69,6 +70,9 @@ CPPFLAGS += $(shell sdl2-config --cflags)
|
||||||
LDFLAGS += -lGL4Dummies $(shell sdl2-config --libs) -lSDL2_mixer -lSDL2_image -lSDL2_ttf
|
LDFLAGS += -lGL4Dummies $(shell sdl2-config --libs) -lSDL2_mixer -lSDL2_image -lSDL2_ttf
|
||||||
|
|
||||||
all: $(PROGNAME)
|
all: $(PROGNAME)
|
||||||
|
all: strip
|
||||||
|
all: upx
|
||||||
|
|
||||||
$(PROGNAME): $(OBJ)
|
$(PROGNAME): $(OBJ)
|
||||||
$(CC) $(OBJ) $(LDFLAGS) -o $(PROGNAME)
|
$(CC) $(OBJ) $(LDFLAGS) -o $(PROGNAME)
|
||||||
|
|
||||||
|
@ -84,6 +88,9 @@ debug: $(PROGNAME)
|
||||||
strip:
|
strip:
|
||||||
$(STRIP) $(PROGNAME)
|
$(STRIP) $(PROGNAME)
|
||||||
|
|
||||||
|
upx:
|
||||||
|
$(UPX) $(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