1# $FreeBSD$
2
3# This Makefile is shared by libncurses, libform, libmenu, libpanel.
4
5NCURSES_DIR=	${SRCTOP}/contrib/ncurses
6
7CFLAGS+=	-D_XOPEN_SOURCE_EXTENDED -DENABLE_WIDEC
8NCURSES_CFG_H=	${.CURDIR}/ncurses_cfg.h
9
10CFLAGS+=	-I.
11CFLAGS+=	-I${.CURDIR:H}/ncurses
12
13# for ${NCURSES_CFG_H}
14CFLAGS+=	-I${.CURDIR:H}/ncurses
15
16CFLAGS+=	-I${NCURSES_DIR}/include
17CFLAGS+=	-I${NCURSES_DIR}/ncurses
18
19CFLAGS+=	-Wall
20
21CFLAGS+=	-DNDEBUG
22
23CFLAGS+=	-DHAVE_CONFIG_H
24
25# everyone needs this
26.PATH:		${NCURSES_DIR}/include
27
28# tools and directories
29AWK?=		awk
30TERMINFODIR?=	${SHAREDIR}/misc
31
32# Generate headers
33ncurses_def.h:	MKncurses_def.sh ncurses_defs
34	AWK=${AWK} sh ${NCURSES_DIR}/include/MKncurses_def.sh \
35	    ${NCURSES_DIR}/include/ncurses_defs > ncurses_def.h
36
37# Manual pages filter
38MANFILTER=	sed -e 's%@TERMINFO@%${TERMINFODIR}/terminfo%g' \
39		    -e 's%@DATADIR@%/usr/share%g' \
40		    -e 's%@NCURSES_OSPEED@%${NCURSES_OSPEED}%g' \
41		    -e 's%@NCURSES_MAJOR@%${NCURSES_MAJOR}%g' \
42		    -e 's%@NCURSES_MINOR@%${NCURSES_MINOR}%g' \
43		    -e 's%@NCURSES_PATCH@%${NCURSES_PATCH}%g' \
44		    -e 's%@TIC@%tic%g' \
45		    -e 's%@INFOCMP@%infocmp%g'
46