aboutsummaryrefslogtreecommitdiff
path: root/mk/termcap.mk
blob: 2d6ad01beee50d64268221c6db2653495626a82b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ifeq (${MKTERMCAP},ncurses)
TERMCAP_CFLAGS:=	$(shell pkg-config ncurses --cflags 2> /dev/null)
LTERMCAP:=			$(shell pkg-config ncurses --libs 2> /dev/null)
ifeq ($(LTERMCAP),)
LIBTERMCAP?=	-lncurses
else
LIBTERMCAP?= $(LTERMCAP)
endif
CPPFLAGS+=	-DHAVE_TERMCAP ${TERMCAP_CFLAGS}
LDADD+=		${LIBTERMCAP}
else ifeq (${MKTERMCAP},termcap)
LIBTERMCAP?=	-ltermcap
CPPFLAGS+=	-DHAVE_TERMCAP
LDADD+=		${LIBTERMCAP}
else ifneq (${MKTERMCAP},)
$(error If MKTERMCAP is defined, it must be ncurses or termcap)
endif