aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Zhiming Wang <zmwangx@gmail.com>2017-04-16 02:17:50 -0400
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-04-16 13:07:42 +0530
commitafa05409348fd3aa50ea9f491300ca00efb35c8d (patch)
tree2b38c6a07895b309e2a253950d94d81a7c393b68
parent5b68fa1a67b01fc159bdc357babc1c33e98bc992 (diff)
downloadnnn-afa05409348fd3aa50ea9f491300ca00efb35c8d.tar.gz
Makefile: use libncurses instead of libncursesw on Darwin
macOS 10.12.4 and many earlier versions have libncurses 5.4 with wide character support, but not libncursesw.
-rw-r--r--Makefile6
-rw-r--r--Makefile.generic6
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 54088a7..c07e950 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,11 @@ PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
-LDLIBS = -lncursesw
+ifeq ($(shell uname), Darwin)
+ LDLIBS = -lncurses
+else
+ LDLIBS = -lncursesw
+endif
DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
LOCALCONFIG = config.h
diff --git a/Makefile.generic b/Makefile.generic
index 488675a..f96cecf 100644
--- a/Makefile.generic
+++ b/Makefile.generic
@@ -4,7 +4,11 @@ PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
CFLAGS += -O2 -Wall -Wextra -Wno-unused-parameter
-LDLIBS = -lncursesw
+ifeq ($(shell uname), Darwin)
+ LDLIBS = -lncurses
+else
+ LDLIBS = -lncursesw
+endif
DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
LOCALCONFIG = config.h