Skip to content
Browse files

fixed Makefile to work with ncurses and ncursesw

  • Loading branch information...
1 parent e0f7730 commit fbb26382afe57d59bb401c6e775d1e9ddf89920f @cgie cgie committed Oct 28, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 Makefile
View
12 Makefile
@@ -8,8 +8,16 @@ BIN = tty-clock
PREFIX ?= /usr/local
INSTALLPATH = ${DESTDIR}${PREFIX}/bin
MANPATH = ${DESTDIR}${PREFIX}/share/man/man1
-CFLAGS = -Wall -g -I $$(ncursesw5-config --includedir)
-LDFLAGS = -L $$(ncursesw5-config --libdir) $$(ncursesw5-config --libs)
+
+ifeq ($(shell sh -c 'which ncurses5-config>/dev/null 2>/dev/null && echo y'), y)
+ CFLAGS = -Wall -g -I $$(ncurses5-config --includedir)
+ LDFLAGS = -L $$(ncurses5-config --libdir) $$(ncursesw5-config --libs)
+else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y)
+ CFLAGS = -Wall -g -I $$(ncursesw5-config --includedir)
+ LDFLAGS = -L $$(ncursesw5-config --libdir) $$(ncursesw5-config --libs)
+endif
+
+
tty-clock : ${SRC}

0 comments on commit fbb2638

Please sign in to comment.
Something went wrong with that request. Please try again.