Browse Source

Add BUILD_ID and GIT_VER

Georgi Chorbadzhiyski 13 years ago
parent
commit
745f8e66e5
2 changed files with 4 additions and 2 deletions
  1. 3
    1
      Makefile
  2. 1
    1
      tsdecrypt.c

+ 3
- 1
Makefile View File

@@ -1,6 +1,8 @@
1 1
 CC = $(CROSS)$(TARGET)gcc
2 2
 STRIP = $(CROSS)$(TARGET)strip
3
-CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2 -D_GNU_SOURCE
3
+BUILD_ID = $(shell date +%F_%R)
4
+GIT_VER = $(shell git describe --tags --dirty --always)
5
+CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2 -D_GNU_SOURCE -DBUILD_ID=\"$(BUILD_ID)\" -DGIT_VER=\"$(GIT_VER)\"
4 6
 RM = /bin/rm -f
5 7
 Q = @
6 8
 

+ 1
- 1
tsdecrypt.c View File

@@ -23,7 +23,7 @@ static void LOG_func(const char *msg) {
23 23
 }
24 24
 
25 25
 static void show_help(struct ts *ts) {
26
-	printf("tsdecrypt v1.0\n");
26
+	printf("tsdecrypt v1.0 (git %s) (build date %s)\n", GIT_VER, BUILD_ID);
27 27
 	printf("Copyright (c) 2011 Unix Solutions Ltd.\n");
28 28
 	printf("\n");
29 29
 	printf("	Usage: tsdecrypt [opts]\n");

Loading…
Cancel
Save