]> git.sur5r.net Git - i3/i3status/blobdiff - Makefile
Merge pull request #114 from ixjlyons/fix-man-url
[i3/i3status] / Makefile
index 1823f3d25bd812c7244b28d584d4bf64dfc657e6..31bfc6fd54bde6b79850e64ffc17dd302c921a35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,8 @@ CFLAGS+=-Iinclude
 LIBS+=-lconfuse
 LIBS+=-lyajl
 LIBS+=-lpulse
+LIBS+=-lm
+LIBS+=-lpthread
 
 VERSION:=$(shell git describe --tags --abbrev=0)
 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
@@ -30,7 +32,8 @@ OS:=$(shell uname)
 ifeq ($(OS),Linux)
 CPPFLAGS+=-DLINUX
 CPPFLAGS+=-D_GNU_SOURCE
-LIBS+=-liw
+CFLAGS += $(shell pkg-config --cflags libnl-genl-3.0)
+LIBS += $(shell pkg-config --libs libnl-genl-3.0)
 LIBS+=-lasound
 endif
 
@@ -43,10 +46,6 @@ CFLAGS+=-I/usr/local/include/
 LDFLAGS+=-L/usr/local/lib/
 endif
 
-ifeq ($(OS),OpenBSD)
-LIBS+=-lossaudio
-endif
-
 ifeq ($(OS),NetBSD)
 LIBS+=-lprop
 endif
@@ -72,6 +71,11 @@ CFLAGS += -idirafter yajl-fallback
 OBJS:=$(wildcard src/*.c *.c)
 OBJS:=$(OBJS:.c=.o)
 
+ifeq ($(OS),OpenBSD)
+OBJS:=$(filter-out src/pulse.o, $(OBJS))
+LIBS:=$(filter-out -lpulse, $(LIBS))
+endif
+
 src/%.o: src/%.c include/i3status.h
        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
        @echo " CC $<"
@@ -108,7 +112,7 @@ install:
 release:
        [ -f i3status-${VERSION} ] || rm -rf i3status-${VERSION}
        mkdir i3status-${VERSION}
-       find . -maxdepth 1 -type f \( -regex ".*\.\(c\|conf\|h\)" -or -name "README" -or -name "Makefile" -or -name "LICENSE" -or -name "CHANGELOG" \) -exec cp '{}' i3status-${VERSION} \;
+       find . -maxdepth 1 -type f \( -regex ".*\.\(c\|conf\|h\)" -or -name "README.md" -or -name "Makefile" -or -name "LICENSE" -or -name "CHANGELOG" \) -exec cp '{}' i3status-${VERSION} \;
        mkdir i3status-${VERSION}/src
        mkdir i3status-${VERSION}/man
        find src -maxdepth 1 -type f \( -regex ".*\.\(c\|h\)" \) -exec cp '{}' i3status-${VERSION}/src \;