]> git.sur5r.net Git - i3/i3/blob - i3bar/common.mk
Merge i3bar into next
[i3/i3] / i3bar / common.mk
1 INSTALL=install
2 ifndef DEBUG
3 DEBUG=1
4 endif
5 PREFIX=/usr
6
7 # The escaping is absurd, but we need to escape for shell, sed, make, define
8 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f .git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' .git/HEAD || echo 'unknown'))"
9
10 # Fallback for libyajl 1 which did not include yajl_version.h. We need
11 # YAJL_MAJOR from that file to decide which code path should be used.
12 CFLAGS += -idirafter yajl-fallback
13
14 CFLAGS += -Wall
15 CFLAGS += -pipe
16 CFLAGS += -g
17
18 CPPFLAGS += -DI3BAR_VERSION=\"${GIT_VERSION}\"
19 CPPFLAGS += -Iinclude
20
21 LDFLAGS += -lev
22 LDFLAGS += -lyajl
23 LDFLAGS += -lxcb
24 LDFLAGS += -lX11
25 LDFLAGS += -L/usr/local/lib
26
27 ifeq ($(DEBUG),1)
28 CFLAGS += -g3
29 else
30 CFLAGS += -O2
31 endif
32
33 .SILENT:
34
35 .PHONY: install clean