diff options
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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) |