X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=Makefile;h=c5427b9995b473780afc5ed077c095efdfa8d515;hb=a916481aab2d81b1882a25da34a2fe327d74cff4;hp=3084ae7ddfa67dbea4eb9399909a84b95a9fcc4e;hpb=ef5148c3e99bad1694278b80ab646bfda78784dc;p=i3%2Fi3status diff --git a/Makefile b/Makefile index 3084ae7..c5427b9 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ ifndef SYSCONFDIR endif endif +PKG_CONFIG ?= pkg-config CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare CFLAGS+=-g CFLAGS+=-std=gnu99 @@ -40,8 +41,8 @@ OS:=$(shell uname) ifeq ($(OS),Linux) CPPFLAGS+=-DLINUX CPPFLAGS+=-D_GNU_SOURCE -CFLAGS += $(shell pkg-config --cflags libnl-genl-3.0) -LIBS += $(shell pkg-config --libs libnl-genl-3.0) +CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-genl-3.0) +LIBS += $(shell $(PKG_CONFIG) --libs libnl-genl-3.0) LIBS+=-lasound endif @@ -98,6 +99,9 @@ i3status: ${OBJS} $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) @echo " LD $@" +test: i3status + LC_ALL=C ./travis/run-tests.pl + clean: rm -f *.o src/*.o @@ -112,8 +116,6 @@ install: install -m 755 -d $(DESTDIR)$(SYSCONFDIR) install -m 755 -d $(DESTDIR)$(MANPREFIX)/share/man/man1 install -m 755 i3status $(DESTDIR)$(PREFIX)/bin/i3status - # Allow network configuration for getting the link speed - (which setcap && setcap cap_net_admin=ep $(DESTDIR)$(PREFIX)/bin/i3status) || true install -m 644 i3status.conf $(DESTDIR)$(SYSCONFDIR)/i3status.conf install -m 644 man/i3status.1 $(DESTDIR)$(MANPREFIX)/share/man/man1