From c81205d86594fbfc6ea40862e773de691cdf58d4 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 3 May 2023 13:29:17 +0200 Subject: [PATCH] add minifier for fun --- Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 82eb8bf..28a7923 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,16 @@ # Modified : Anri KENNEL (anri.kennel@etud.univ-paris8.fr) - 03/05/2023 # Définition des commandes utilisées -CC = gcc -ECHO = echo -RM = rm -f -TAR = tar -ZIP = zip -MKDIR = mkdir -CHMOD = chmod -CP = rsync -R +CC = gcc +ECHO = echo +RM = rm -f +TAR = tar +ZIP = zip +MKDIR = mkdir +CHMOD = chmod +CP = rsync -R +MINIFIER = minifier +CURL = curl -s # Déclaration des options du compilateur CFLAGS = -Wall -O3 @@ -105,3 +107,10 @@ $(VSCFILES): clean: @$(RM) -r $(PROGNAME) $(OBJ) *~ $(distdir).tgz $(distdir).zip $(distdir)/ \ gmon.out core.* documentation/*~ shaders/*~ documentation/html + +distdirminified: distdir + @$(CURL) https://raw.githubusercontent.com/BaseMax/C-Minifier/main/Minifier.c | $(CC) -o $(MINIFIER) $(CFLAGS) -x c - + $(foreach f,$(SOURCES),./$(MINIFIER) $(f) $(distdir)/$(f);) + @$(RM) $(MINIFIER) + +distminified: distdirminified dist