1 CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare
6 CFLAGS+=-DVERSION=\"${GIT_VERSION}\"
10 VERSION:=$(shell git describe --tags --abbrev=0)
11 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
13 ifeq ($(shell uname),Linux)
16 LDFLAGS+=-liw -lasound
19 ifeq ($(shell uname),GNU/kFreeBSD)
23 CFLAGS+=$(EXTRA_CFLAGS)
25 OBJS:=$(wildcard src/*.c *.c)
29 @$(CC) $(CFLAGS) -c -o $@ $<
33 @$(CC) $(CFLAGS) -c -o $@ $<
39 @$(CC) -o $@ src/*.o *.o $(LDFLAGS)
52 install -m 755 -d $(DESTDIR)/usr/bin
53 install -m 755 -d $(DESTDIR)/etc
54 install -m 755 -d $(DESTDIR)/usr/share/man/man1
55 install -m 755 i3status $(DESTDIR)/usr/bin/i3status
56 # Allow network configuration for getting the link speed
57 (which setcap && setcap cap_net_admin=ep $(DESTDIR)/usr/bin/i3status) || true
58 install -m 644 i3status.conf $(DESTDIR)/etc/i3status.conf
59 install -m 644 man/i3status.1 $(DESTDIR)/usr/share/man/man1
62 [ -f i3status-${VERSION} ] || rm -rf i3status-${VERSION}
63 mkdir i3status-${VERSION}
64 find . -maxdepth 1 -type f \( -regex ".*\.\(c\|conf\|h\)" -or -name "Makefile" -or -name "LICENSE" \) -exec cp '{}' i3status-${VERSION} \;
65 mkdir i3status-${VERSION}/src
66 mkdir i3status-${VERSION}/man
67 find src -maxdepth 1 -type f \( -regex ".*\.\(c\|h\)" \) -exec cp '{}' i3status-${VERSION}/src \;
68 find man -maxdepth 1 -type f \( -regex ".*\.\(1\|man\|conf\)" -or -name "Makefile" \) -exec cp '{}' i3status-${VERSION}/man \;
69 sed -e 's/^GIT_VERSION:=\(.*\)/GIT_VERSION=${GIT_VERSION}/g;s/^VERSION:=\(.*\)/VERSION=${VERSION}/g' Makefile > i3status-${VERSION}/Makefile
70 tar cjf i3status-${VERSION}.tar.bz2 i3status-${VERSION}
71 rm -rf i3status-${VERSION}