diff options
author | FreeArtMan <dos21h@gmail.com> | 2017-05-07 16:49:47 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2017-05-07 16:49:47 +0100 |
commit | 910c1942b21bd88fa9b2091a0f7322f6b2c96df7 (patch) | |
tree | 7b2569f9c72648e037fd1663075fd6b4df0e4565 | |
parent | 77b33a254d698fb65f83fe3df0e0e7410a2c78d6 (diff) | |
download | agni-910c1942b21bd88fa9b2091a0f7322f6b2c96df7.tar.gz agni-910c1942b21bd88fa9b2091a0f7322f6b2c96df7.zip |
Forgot add Makefile changes
-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) |