aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sijmen J. Mulder <ik@sjmulder.nl>2018-12-16 18:01:24 +0100
committerGravatar Sijmen J. Mulder <ik@sjmulder.nl>2018-12-16 20:19:08 +0100
commit78337812218f12c1d6fc7ac35b4deff21b6a0d6b (patch)
tree6e671b419c2c6ae954c1c22c73ee959d49cfb101
parent599f4e82b7cc030eb3d10876677f44fabe5194b5 (diff)
downloadnnn-78337812218f12c1d6fc7ac35b4deff21b6a0d6b.tar.gz
Make curses flags configurable
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 7d983e8..e5b645e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,19 +8,22 @@ INSTALL ?= install
CFLAGS_OPTIMIZATION ?= -O3
-CFLAGS += -Wall -Wextra -Wno-unused-parameter
-CFLAGS += $(CFLAGS_OPTIMIZATION)
-
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
- CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
- LDLIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
+ CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
+ LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
else ifeq ($(shell $(PKG_CONFIG) ncurses && echo 1),1)
- CFLAGS += $(shell $(PKG_CONFIG) --cflags ncurses)
- LDLIBS += $(shell $(PKG_CONFIG) --libs ncurses)
+ CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncurses)
+ LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncurses)
else
- LDLIBS += -lncurses
+ LDLIBS_CURSES ?= -lncurses
endif
+CFLAGS += -Wall -Wextra -Wno-unused-parameter
+CFLAGS += $(CFLAGS_OPTIMIZATION)
+CFLAGS += $(CFLAGS_CURSES)
+
+LDLIBS += $(LDLIBS_CURSES)
+
DISTFILES = src nnn.1 Makefile README.md LICENSE
SRC = src/nnn.c
BIN = nnn