9 CFLAGS += -I/usr/local/include
12 LDFLAGS += -lxcb-keysyms
13 LDFLAGS += -lxcb-xinerama
15 LDFLAGS += -L/usr/local/lib -L/usr/pkg/lib
16 ifeq ($(UNAME),NetBSD)
17 CFLAGS += -I/usr/pkg/include
18 LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
22 CFLAGS += -D_GNU_SOURCE
26 # Extended debugging flags, macros shall be available in gcc
33 FILES=$(patsubst %.c,%.o,$(wildcard src/*.c))
34 HEADERS=$(wildcard include/*.h)
36 src/%.o: src/%.c ${HEADERS}
37 $(CC) $(CFLAGS) -c -o $@ $<
40 $(CC) -o i3 ${FILES} $(LDFLAGS)
43 $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
44 $(INSTALL) -m 0755 i3 $(DESTDIR)/usr/bin/