From 0cec6b099385d0db33fe81ae3d0d34e15ed40430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Mon, 20 Aug 2018 16:24:25 +0200 Subject: [PATCH] Makefile: also check for ncurses6 Note some cross-compilers might not install the ncurses config scripts and only the pkg-config files, but at least the atari SDK from NS does. For others it might be required to check for the .pc files first. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91fef76..ea8951c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,13 @@ PREFIX ?= /usr/local INSTALLPATH ?= ${DESTDIR}${PREFIX}/bin MANPATH ?= ${DESTDIR}${PREFIX}/share/man/man1 -ifeq ($(shell sh -c 'which ncurses5-config>/dev/null 2>/dev/null && echo y'), y) +ifeq ($(shell sh -c 'which ncurses6-config>/dev/null 2>/dev/null && echo y'), y) + CFLAGS += -Wall -g $$(ncurses6-config --cflags) + LDFLAGS += $$(ncurses6-config --libs) +else ifeq ($(shell sh -c 'which ncursesw6-config>/dev/null 2>/dev/null && echo y'), y) + CFLAGS += -Wall -g $$(ncursesw6-config --cflags) + LDFLAGS += $$(ncursesw6-config --libs) +else ifeq ($(shell sh -c 'which ncurses5-config>/dev/null 2>/dev/null && echo y'), y) CFLAGS += -Wall -g $$(ncurses5-config --cflags) LDFLAGS += $$(ncurses5-config --libs) else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y)