summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArnaud Degroote <degroote@NetBSD.org>2013-10-06 18:12:16 +0000
committerMichael Stapelberg <michael@stapelberg.de>2013-10-07 19:30:32 +0200
commit57730f726f3c824e633bc7eda35d679a3484fcbb (patch)
tree9db9efda7affd2f24aac7d647aaf623438532f99 /Makefile
parentbcc8932c865144741cabb3df316810afb8367fa0 (diff)
Fix the build on NetBSD
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0c5bda4..f454fe8 100644
--- 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