2010-08-07 03:50:22 +02:00
|
|
|
INSTALL=install
|
2011-02-05 15:20:40 +01:00
|
|
|
ifndef DEBUG
|
2010-08-07 03:50:22 +02:00
|
|
|
DEBUG=1
|
2011-02-05 15:20:40 +01:00
|
|
|
endif
|
2010-08-07 03:50:22 +02:00
|
|
|
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'))"
|
|
|
|
|
2011-04-28 20:23:12 +02:00
|
|
|
# Fallback for libyajl 1 which did not include yajl_version.h. We need
|
|
|
|
# YAJL_MAJOR from that file to decide which code path should be used.
|
|
|
|
CFLAGS += -idirafter yajl-fallback
|
|
|
|
|
2010-07-22 01:15:18 +02:00
|
|
|
CFLAGS += -Wall
|
|
|
|
CFLAGS += -pipe
|
|
|
|
CFLAGS += -Iinclude
|
|
|
|
CFLAGS += -g
|
2010-08-07 03:50:22 +02:00
|
|
|
CFLAGS += -DI3BAR_VERSION=\"${GIT_VERSION}\"
|
|
|
|
|
2010-07-22 01:15:18 +02:00
|
|
|
LDFLAGS += -lev
|
|
|
|
LDFLAGS += -lyajl
|
|
|
|
LDFLAGS += -lxcb
|
2010-08-25 16:23:30 +02:00
|
|
|
LDFLAGS += -lX11
|
2010-08-07 03:50:22 +02:00
|
|
|
LDFLAGS += -L/usr/local/lib
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
CFLAGS += -g3
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
|
2010-07-22 01:15:18 +02:00
|
|
|
.SILENT:
|
2010-08-07 03:50:22 +02:00
|
|
|
|
|
|
|
.PHONY: install clean
|