]> git.sur5r.net Git - i3/i3status/commitdiff
Fix the build on NetBSD
authorArnaud Degroote <degroote@NetBSD.org>
Sun, 6 Oct 2013 18:12:16 +0000 (18:12 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 7 Oct 2013 17:30:32 +0000 (19:30 +0200)
Makefile

index 0c5bda4476543c61dc7a8a2bb7a0a8e63197b8cb..f454fe8b8607712935101f2d12c7ff6ae3b7a736 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,26 +21,28 @@ LIBS+=-lyajl
 
 VERSION:=$(shell git describe --tags --abbrev=0)
 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
+OS:=$(shell uname)
 
-ifeq ($(shell uname),Linux)
+ifeq ($(OS),Linux)
 CPPFLAGS+=-DLINUX
 CPPFLAGS+=-D_GNU_SOURCE
 LIBS+=-liw
 LIBS+=-lasound
 endif
 
-ifeq ($(shell uname),GNU/kFreeBSD)
+ifeq ($(OS),GNU/kFreeBSD)
 LIBS+=-lbsd
 endif
 
-ifeq ($(shell uname),OpenBSD)
+ifeq ($(OS),OpenBSD)
 CFLAGS+=-I/usr/local/include/
 LDFLAGS+=-L/usr/local/lib/
 LIBS+=-lossaudio
 endif
 
+
 # This probably applies for any pkgsrc based system
-ifeq ($(shell uname),DragonFly)
+ifneq (, $(filter $(OS), NetBSD DragonFly))
 CFLAGS+=-I/usr/pkg/include/
 LDFLAGS+=-L/usr/pkg/lib/
 endif