xref: /freebsd/lib/ncurses/config.mk (revision 3332f1b444d4a73238e9f59cca27bfc95fe936bd)
1# $FreeBSD$
2
3# This Makefile is shared by libncurses, libform, libmenu, libpanel.
4
5NCURSES_DIR=	${SRCTOP}/contrib/ncurses
6NCURSES_MAJOR=	6
7NCURSES_MINOR=	2
8NCURSES_PATCH=	20210220
9
10CFLAGS+=	-D_XOPEN_SOURCE_EXTENDED
11NCURSES_CFG_H=	${.CURDIR}/ncurses_cfg.h
12
13CFLAGS+=	-I.
14CFLAGS+=	-I${.CURDIR:H}/tinfo
15
16# for ${NCURSES_CFG_H}
17CFLAGS+=	-I${.CURDIR:H}/ncurses
18
19CFLAGS+=	-I${NCURSES_DIR}/include
20CFLAGS+=	-I${NCURSES_DIR}/ncurses
21CFLAGS+=	-I${.OBJDIR:H}/tinfo/
22
23CFLAGS+=	-Wall
24
25CFLAGS+=	-DNDEBUG
26
27CFLAGS+=	-DHAVE_CONFIG_H
28
29# everyone needs this
30.PATH:		${NCURSES_DIR}/include
31.PATH:		${.OBJDIR:H}/tinfo/
32
33# tools and directories
34AWK?=		awk
35TERMINFODIR?=	${SHAREDIR}/misc
36
37# Generate headers
38ncurses_def.h:	MKncurses_def.sh ncurses_defs
39	AWK=${AWK} sh ${NCURSES_DIR}/include/MKncurses_def.sh \
40	    ${NCURSES_DIR}/include/ncurses_defs > ncurses_def.h
41
42# Manual pages filter
43MANFILTER=	sed -e 's%@TERMINFO@%${TERMINFODIR}/terminfo%g' \
44		    -e 's%@DATADIR@%/usr/share%g' \
45		    -e 's%@NCURSES_OSPEED@%${NCURSES_OSPEED}%g' \
46		    -e 's%@NCURSES_MAJOR@%${NCURSES_MAJOR}%g' \
47		    -e 's%@NCURSES_MINOR@%${NCURSES_MINOR}%g' \
48		    -e 's%@NCURSES_PATCH@%${NCURSES_PATCH}%g' \
49		    -e 's%@TPUT@%tput%g' \
50		    -e 's%@TSET@%tset%g' \
51		    -e 's%@RESET@%reset%g' \
52		    -e 's%@CLEAR@%clear%g' \
53		    -e 's%@TABS@%tabs%g' \
54		    -e 's%@TIC@%tic%g' \
55		    -e 's%@TOE@%toe%g' \
56		    -e 's%@INFOCMP@%infocmp%g' \
57		    -e 's%@CAPTOINFO@%captoinfo%g' \
58		    -e 's%@INFOTOCAP@%infotocap%g'
59