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