Browse Source

Make curses flags configurable

master
Sijmen J. Mulder 6 years ago
parent
commit
7833781221
1 changed files with 11 additions and 8 deletions
  1. +11
    -8
      Makefile

+ 11
- 8
Makefile View File

@@ -8,19 +8,22 @@ INSTALL ?= install


CFLAGS_OPTIMIZATION ?= -O3 CFLAGS_OPTIMIZATION ?= -O3


CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS += $(CFLAGS_OPTIMIZATION)

ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1) 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) 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 else
LDLIBS += -lncurses
LDLIBS_CURSES ?= -lncurses
endif endif


CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS += $(CFLAGS_OPTIMIZATION)
CFLAGS += $(CFLAGS_CURSES)

LDLIBS += $(LDLIBS_CURSES)

DISTFILES = src nnn.1 Makefile README.md LICENSE DISTFILES = src nnn.1 Makefile README.md LICENSE
SRC = src/nnn.c SRC = src/nnn.c
BIN = nnn BIN = nnn


Loading…
Cancel
Save