2010-08-06 21:50:22 -04:00
|
|
|
INSTALL=install
|
|
|
|
DEBUG=1
|
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
# The escaping is absurd, but we need to escape for shell, sed, make, define
|
|
|
|
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'))"
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
CFLAGS += -Wall
|
|
|
|
CFLAGS += -pipe
|
|
|
|
CFLAGS += -Iinclude
|
|
|
|
CFLAGS += -g
|
2010-08-06 21:50:22 -04:00
|
|
|
CFLAGS += -DI3BAR_VERSION=\"${GIT_VERSION}\"
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
LDFLAGS += -lev
|
|
|
|
LDFLAGS += -lyajl
|
|
|
|
LDFLAGS += -lxcb
|
|
|
|
LDFLAGS += -lxcb-atom
|
2010-08-06 21:50:22 -04:00
|
|
|
LDFLAGS += -L/usr/local/lib
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
CFLAGS += -g3
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
.SILENT:
|
2010-08-06 21:50:22 -04:00
|
|
|
|
|
|
|
.PHONY: install clean
|