From 910c1942b21bd88fa9b2091a0f7322f6b2c96df7 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Sun, 7 May 2017 16:49:47 +0100 Subject: Forgot add Makefile changes --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d628236..6fbc0fc 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROJECT=agni CC=gcc CFLAGS= -make: +make: version $(CC) $(CFLAGS) buf.c -c $(CC) $(CFLAGS) mmm.c -c $(CC) $(CFLAGS) darray.c -c @@ -27,6 +27,15 @@ make: cmd_rusage.c cmd_cmd.o sha1.o cmd_sha1.o agni.c \ -o $(PROJECT) -std=c11 -lrt +version: + #could have bug if commit message have somethign bad in it + rm -f version.h + echo "#ifndef __VERSION_H">>version.h + echo "#define __VERSION_H">>version.h + echo "#define VERSION_DATE \""`date`"\"">>version.h + echo "#define VERSION_COMMIT \""`git log -1 --oneline`"\"">>version.h + echo "#endif">>version.h + leak: valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./$(PROJECT) -- cgit v1.2.3