]> git.sur5r.net Git - i3/i3lock/blobdiff - Makefile
print version number when invoked with -v
[i3/i3lock] / Makefile
index 9d3fb50bec4c3a12254f4e7c18cee611fcec2c50..6b00e9a86b71c6551ebd59b63d6e23e75fa2039a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,15 @@ CFLAGS += -pipe
 CFLAGS += -Wall
 CFLAGS += -D_GNU_SOURCE
 CFLAGS += $(shell pkg-config --cflags cairo xcb-keysyms xcb-dpms)
-LDFLAGS += $(shell pkg-config --libs cairo xcb-keysyms xcb-dpms)
+LDFLAGS += $(shell pkg-config --libs cairo xcb-keysyms xcb-dpms xcb-image)
 LDFLAGS += -lpam
 
 FILES:=$(wildcard *.c)
 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