8 SYSCONFDIR=$(PREFIX)/etc
10 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
11 VERSION:=$(shell git describe --tags --abbrev=0)
16 # unused-function, unused-label, unused-variable are turned on by -Wall
17 # We don’t want unused-parameter because of the use of many callbacks
18 CFLAGS += -Wunused-value
20 CFLAGS += -I/usr/local/include
21 CFLAGS += -DI3_VERSION=\"${GIT_VERSION}\"
24 LDFLAGS += -lxcb-event
25 LDFLAGS += -lxcb-property
26 LDFLAGS += -lxcb-keysyms
29 LDFLAGS += -lxcb-icccm
30 LDFLAGS += -lxcb-xinerama
31 LDFLAGS += -lxcb-randr
36 LDFLAGS += -L/usr/local/lib -L/usr/pkg/lib
38 ifeq ($(UNAME),NetBSD)
39 # We need -idirafter instead of -I to prefer the system’s iconv over GNU libiconv
40 CFLAGS += -idirafter /usr/pkg/include
41 LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
44 ifeq ($(UNAME),OpenBSD)
45 CFLAGS += -I${X11BASE}/include
47 LDFLAGS += -L${X11BASE}/lib
50 ifeq ($(UNAME),FreeBSD)
54 ifneq (,$(filter Linux GNU GNU/%, $(UNAME)))
55 CFLAGS += -D_GNU_SOURCE
59 # Extended debugging flags, macros shall be available in gcc
66 # Don’t print command lines which are run
69 # Always remake the following targets
70 .PHONY: install clean dist distclean