Merge branch 'vendor/BINUTILS225'
[dragonfly.git] / lib / libncurses / Makefile.inc
1 NCURSESDIR=     ${.CURDIR}/../../../contrib/ncurses
2
3 SHLIB_MAJOR=    60
4 VERSION_DEF=    ${.CURDIR}/../Versions.def
5 SYMBOL_MAPS=    ${.CURDIR}/../Symbol.base.map
6 TERMINFO_CAPS=  ${NCURSESDIR}/include/Caps
7
8 .if defined (ENABLE_WIDEC)
9 CFLAGS+=        -D_XOPEN_SOURCE_EXTENDED
10 CFLAGS+=        -DENABLE_WIDEC
11 SW_WIDEC=       1
12 SW_TYPE=        cchar_t
13 LIB_SUFFIX=     w
14 SYMBOL_MAPS+=   ${.CURDIR}/../Symbol.wide.map
15 .else
16 SW_WIDEC=       0
17 SW_TYPE=        chtype
18 LIB_SUFFIX=
19 .endif
20
21 CFLAGS+=        -I.
22 CFLAGS+=        -I${NCURSESDIR}/include
23 CFLAGS+=        -I${NCURSESDIR}/ncurses
24 CFLAGS+=        -I${.CURDIR}/../include
25 CFLAGS+=        -I${.CURDIR}
26 CFLAGS+=        -I${.OBJDIR}
27
28 WARNS?= 5
29
30 .PATH:  ${NCURSESDIR}/include ${.CURDIR}/../include
31 .if defined(ZPANEL)
32 .PATH:  ${NCURSESDIR}/panel
33 .endif
34 .if defined(ZNCURSES)
35 .PATH:  ${NCURSESBASEDIR}
36 .PATH:  ${NCURSESSERIALDIR}
37 .PATH:  ${NCURSESTINFODIR}
38 .PATH:  ${NCURSESDIR}/ncurses/trace
39 . if defined (ENABLE_WIDEC)
40 .PATH:  ${NCURSESDIR}/ncurses/widechar
41 . endif
42 .endif
43
44 ncurses_def.h:  MKncurses_def.sh ncurses_defs
45         AWK=awk sh ${NCURSESDIR}/include/MKncurses_def.sh \
46         ${NCURSESDIR}/include/ncurses_defs > ${.TARGET}
47
48 curses.h: $(TERMINFO_CAPS) curses.head curses.tail MKkey_defs.sh
49         cat ${.CURDIR}/../include/curses.head | \
50         sed -e 's|SET_NEED_WCHAR_H|${SW_WIDEC}|' \
51             -e 's|SET_NCURSES_CH_T|${SW_TYPE}|' > ${.TARGET}.new
52         AWK=awk sh ${NCURSESDIR}/include/MKkey_defs.sh $(TERMINFO_CAPS) >> ${.TARGET}.new
53 .if defined(ENABLE_WIDEC)
54         cat ${NCURSESDIR}/include/curses.wide >> ${.TARGET}.new
55 .endif
56         cat ${NCURSESDIR}/include/curses.tail >> ${.TARGET}.new
57         mv -f ${.TARGET}.new ${.TARGET}
58
59 .include "../Makefile.inc"