summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés M <andmarti1424@users.noreply.github.com>2017-11-21 11:07:37 -0300
committerGitHub <noreply@github.com>2017-11-21 11:07:37 -0300
commitc8b199d9f49eea249f43f10c061869da61844dc8 (patch)
treea88981cc3b5fb916ce6c3a45affddf3b093691e2
parent070722299c9cfeb49d96a62b42db969499f3f37d (diff)
parenta5f6b6232e829911375c5eed7ac7f52c3b4d6e0d (diff)
Merge pull request #211 from sjmulder/pr/vanilla-mac-2
Always use system ncurses on macOS
-rw-r--r--Readme.md6
-rwxr-xr-xsrc/Makefile5
2 files changed, 4 insertions, 7 deletions
diff --git a/Readme.md b/Readme.md
index b82816e..c944f0a 100644
--- a/Readme.md
+++ b/Readme.md
@@ -43,12 +43,6 @@ SC-IM stands for Spreadsheet Calculator Improvised. :-)
vim /src/Makefile
```
-* Only for OSX users who dont use Homebrew:
-```
- brew install ncurses
- brew link ncurses
-```
-
* Inside /src folder run:
```
make
diff --git a/src/Makefile b/src/Makefile
index af7355e..e3770c7 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -92,7 +92,10 @@ ifneq (, $(shell which pkg-config))
# Any system with pkg-config
# NOTE: ncursesw (required)
- ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
+ ifeq ($(shell uname -s),Darwin)
+ # macOS' ncurses is built with wide-char support
+ LDFLAGS += -lncurses
+ else ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
CFLAGS += $(shell pkg-config --cflags ncursesw)
LDLIBS += $(shell pkg-config --libs ncursesw)
else ifneq ($(shell pkg-config --exists ncurses || echo 'no'),no)