mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
pkg-config for ncurses (#25)
This commit is contained in:
parent
cbbe03247e
commit
9eed24bbac
9
Makefile
9
Makefile
|
@ -5,12 +5,15 @@ MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
|
CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
|
||||||
LDLIBS = -lreadline
|
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
|
else
|
||||||
LDLIBS += -lncursesw
|
LDLIBS += -lncurses
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = nlay nnn.c config.def.h nnn.1 Makefile README.md LICENSE
|
DISTFILES = nlay nnn.c config.def.h nnn.1 Makefile README.md LICENSE
|
||||||
LOCALCONFIG = config.h
|
LOCALCONFIG = config.h
|
||||||
SRC = nnn.c
|
SRC = nnn.c
|
||||||
|
|
4
nnn.c
4
nnn.c
|
@ -6,11 +6,7 @@
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifdef __linux__
|
|
||||||
#include <ncursesw/curses.h>
|
|
||||||
#else
|
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
#endif
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
Loading…
Reference in a new issue