mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Make curses flags configurable
This commit is contained in:
parent
599f4e82b7
commit
7833781221
21
Makefile
21
Makefile
|
@ -8,18 +8,21 @@ INSTALL ?= install
|
|||
|
||||
CFLAGS_OPTIMIZATION ?= -O3
|
||||
|
||||
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
||||
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
|
||||
else ifeq ($(shell $(PKG_CONFIG) ncurses && echo 1),1)
|
||||
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncurses)
|
||||
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncurses)
|
||||
else
|
||||
LDLIBS_CURSES ?= -lncurses
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter
|
||||
CFLAGS += $(CFLAGS_OPTIMIZATION)
|
||||
CFLAGS += $(CFLAGS_CURSES)
|
||||
|
||||
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
|
||||
CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
|
||||
LDLIBS += $(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)
|
||||
else
|
||||
LDLIBS += -lncurses
|
||||
endif
|
||||
LDLIBS += $(LDLIBS_CURSES)
|
||||
|
||||
DISTFILES = src nnn.1 Makefile README.md LICENSE
|
||||
SRC = src/nnn.c
|
||||
|
|
Loading…
Reference in a new issue