--- a/makefile
+++ b/makefile
@@ -5,16 +5,19 @@
 gstart: gtkstatusicon-starter-program.c
 	gcc  pkg-config --cflags gtk+-3.0 pkg-config --libs gtk+-3.0  -o gstart gtkstatusicon-starter-program.c
 
+version.c:
+	printf '#define VERSION "$(shell git describe --always)"\nconst char * _version=VERSION;\n' >version.c
+
 notification.o: notification.c
 
-notification-view: notification-view.c notification.h notification.o
-	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-view notification-view.c notification.o
+notification-view: notification-view.c notification.h notification.o version.o
+	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-view notification-view.c notification.o version.o
 
-notification-table: notification-table.c notification.h notification.o
-	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-table notification-table.c notification.o
+notification-table: notification-table.c notification.h notification.o version.o
+	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-table notification-table.c notification.o version.o
 
-notification-tail: notification-tail.c notification.h notification.o
-	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-tail notification-tail.c notification.o
+notification-tail: notification-tail.c notification.h notification.o version.o
+	gcc -g -pg $(shell pkg-config --cflags gtk+-3.0) $(shell pkg-config --libs gtk+-3.0) -o notification-tail notification-tail.c notification.o version.o
 
 nv: notification-view
 
@@ -56,4 +59,4 @@
 
 
 clean:
-	rm -f *.o *.exe *~ *.bb *.bbg *.da *.gcov notification-view notification-table notification-tail gmon.out vgdump tail-test.txt view.png table.tab
+	rm -f *.o *.exe *~ *.bb *.bbg *.da *.gcov notification-view notification-table notification-tail gmon.out vgdump tail-test.txt view.png table.tab version.c