summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorSijmen J. Mulder <ik@sjmulder.nl>2018-07-13 22:54:19 +0200
committerSijmen J. Mulder <ik@sjmulder.nl>2018-07-13 22:54:19 +0200
commite2aa6f8bf79aef60e7b724100448e01506cfefc0 (patch)
tree3faeb427f7e00e54213c896600a748fff6303d3b /src/Makefile
parent54a72bccd42d13c07e6aa45ae8a1e430baa0273f (diff)
parentf2a9e957d1a174630ba1e726653c1fa10c31af8b (diff)
Merge branch 'freeze' into link-ncurses
Diffstat (limited to 'src/Makefile')
-rwxr-xr-xsrc/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index beae590..e42ce58 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -87,8 +87,8 @@ ifneq (, $(shell which gnuplot))
CFLAGS += -DGNUPLOT
endif
-# dynamic linking (should not be used in FreeBSD
-ifneq ($(shell uname -s),FreeBSD)
+# dynamic linking (not available in BSD)
+ifneq ($(shell uname -s | grep -o BSD),BSD)
LDLIBS += -ldl
endif
@@ -133,6 +133,16 @@ else ifeq ($(shell uname -s),Darwin)
# macOS' ncurses is built with wide-char support
LDFLAGS += -lncurses
+else ifeq ($(shell uname -s),NetBSD)
+ # NetBSD without pkg-config
+
+ CFLAGS += -I/usr/pkg/include
+ CFLAGS += -I/usr/pkg/include/ncursesw
+
+ LDFLAGS += -L/usr/pkg/lib
+ LDFLAGS += -Wl,-R/usr/pkg/lib
+
+ LDLIBS += -lncursesw
else
LDFLAGS += -lncursesw
endif