]> Sergey Matveev's repositories - nnn.git/commitdiff
Makefile: use libncurses instead of libncursesw on Darwin
authorZhiming Wang <zmwangx@gmail.com>
Sun, 16 Apr 2017 06:17:50 +0000 (02:17 -0400)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 16 Apr 2017 07:37:42 +0000 (13:07 +0530)
macOS 10.12.4 and many earlier versions have libncurses 5.4 with wide character
support, but not libncursesw.

Makefile
Makefile.generic

index 54088a7936eb369ea2eeddfab456a9e48cf64643..c07e9501cf2569407a300a855d57ee918b954482 100644 (file)
--- 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
index 488675a278f951cb658326d3fc176d25b78d56b7..f96cecfc5191c9c78ee42994b606e0b14e1e6524 100644 (file)
@@ -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