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