From fbb26382afe57d59bb401c6e775d1e9ddf89920f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gie=C3=9Fen?= Date: Mon, 28 Oct 2013 14:00:01 +0100 Subject: [PATCH] fixed Makefile to work with ncurses and ncursesw --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bccb1c5..a687926 100644 --- a/Makefile +++ b/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}