aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Johnathan Jenkins <john@nixheads.co.uk>2017-05-13 09:33:08 -0700
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-05-13 22:03:08 +0530
commit9eed24bbac968f85d40d6d2d9b05e834a6ab6614 (patch)
tree7ea99c73591bdee4dc93ee28431a09299923ab03 /Makefile
parentcbbe03247e70785404da4c9b70bf6fbaf61385a7 (diff)
downloadnnn-9eed24bbac968f85d40d6d2d9b05e834a6ab6614.tar.gz
pkg-config for ncurses (#25)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 69e19e3..efd9555 100644
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,15 @@ MANPREFIX = $(PREFIX)/share/man
CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
LDLIBS = -lreadline
-ifeq ($(shell uname), Darwin)
- LDLIBS += -lncurses
+
+ifeq ($(shell pkg-config ncursesw && echo 1),1)
+ CFLAGS += $(shell pkg-config --cflags ncursesw)
+ LDLIBS += $(shell pkg-config --libs ncursesw)
else
- LDLIBS += -lncursesw
+ LDLIBS += -lncurses
endif
+
DISTFILES = nlay nnn.c config.def.h nnn.1 Makefile README.md LICENSE
LOCALCONFIG = config.h
SRC = nnn.c