FILES:=$(FILES:.c=.o)
VERSION:=$(shell git describe --tags --abbrev=0)
+GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
+CFLAGS += -DVERSION=\"${GIT_VERSION}\"
.PHONY: install clean uninstall
while ((o = getopt_long(argc, argv, "vnbdi:c:tp:", longopts, &optind)) != -1) {
switch (o) {
case 'v':
- errx(EXIT_SUCCESS, "i3lock © 2010 Michael Stapelberg\n");
+ errx(EXIT_SUCCESS, "version " VERSION " © 2010 Michael Stapelberg\n");
case 'n':
dont_fork = true;
break;