summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés M <andmarti1424@users.noreply.github.com>2017-02-10 19:09:16 -0300
committerGitHub <noreply@github.com>2017-02-10 19:09:16 -0300
commitf1596a0628503acf85e2694a1ddad15ecbda89cf (patch)
treeeddfc44a1e0b88a3487cdc5d91b712961b19fce8
parent3abad0ba89d9d01eb8ff7195d02cf3e0c461cb19 (diff)
parent44f585c2426df43fce4a94a923067005060b8ecb (diff)
Merge pull request #130 from yokattana/pr/ncurses-and-mac
Actually use NCURSES_CFLAGS and add Mac check
-rw-r--r--src/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index 167f4ea..512b81c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -18,20 +18,22 @@ MANDIR = $(prefix)/man/man1
#YACC = bison -y
#SED = sed
-ifeq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
-NCURSES_CFLAGS ?=
-NCURSES_LIBS ?= -lncursesw
+ifeq ($(shell uname -s),Darwin)
+ NCURSES_CFLAGS ?=
+ NCURSES_LIBS ?= -lncurses
+else ifeq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
+ NCURSES_CFLAGS ?=
+ NCURSES_LIBS ?= -lncursesw
else
-NCURSES_CFLAGS := $(shell pkg-config --cflags ncursesw)
-NCURSES_LIBS := $(shell pkg-config --libs ncursesw)
+ NCURSES_CFLAGS ?= $(shell pkg-config --cflags ncursesw)
+ NCURSES_LIBS ?= $(shell pkg-config --libs ncursesw)
endif
LDLIBS += -lm $(NCURSES_LIBS)
CFLAGS += -Wall -g
-CFLAGS += $(shell pkg-config --cflags ncursesw)
-CFLAGS += -D_XOPEN_SOURCE_EXTENDED
-CFLAGS += -D_GNU_SOURCE
+CFLAGS += $(NCURSES_CFLAGS)
+CFLAGS += -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE
CFLAGS += -DSNAME=\"$(NAME)\"
CFLAGS += -DHELP_PATH=\"$(HELPDIR)\"
CFLAGS += -DLIBDIR=\"$(LIBDIR)\"