remove all unnecessary extra files when building the slimest archive possible

This commit is contained in:
Mylloon 2023-05-03 13:42:14 +02:00
parent c81205d865
commit aeed60cef4
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -108,9 +108,12 @@ clean:
@$(RM) -r $(PROGNAME) $(OBJ) *~ $(distdir).tgz $(distdir).zip $(distdir)/ \
gmon.out core.* documentation/*~ shaders/*~ documentation/html
distminified: distdirminified dist
# Remove all unnecessary extra files
distdirminified: EXTRAFILES := $(filter-out $(VSCFILES) $(DOXYFILE),$(EXTRAFILES))
distdirminified: DISTFILES := $(filter-out $(DOXYFILE),$(DISTFILES))
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