Add /usr.bin/tic: terminfo entry-description compiler
[dragonfly.git] / usr.bin / tic / Makefile
1 NCURSESDIR=     ${.CURDIR}/../../contrib/ncurses
2 TERMINFO_CAPS=  ${NCURSESDIR}/include/Caps
3 PROGSDIR=       ${NCURSESDIR}/progs
4 .PATH:          ${PROGSDIR}
5
6 PROG=           tic
7 NOMAN=
8
9 CFLAGS+=        -D_XOPEN_SOURCE_EXTENDED
10 CFLAGS+=        -DENABLE_WIDEC
11 CFLAGS+=        -DSET_NCURSES_CH_T=cchar_t
12 CFLAGS+=        -DSET_NEED_WCHAR_H=1
13 CFLAGS+=        -I${PROGSDIR}
14 CFLAGS+=        -I.
15 CFLAGS+=        -I${NCURSESDIR}/include
16 CFLAGS+=        -I${.CURDIR}/../../lib/libncurses/include
17 CFLAGS+=        -I${.CURDIR}
18 CFLAGS+=        -I${.OBJDIR}
19
20 DPADD=          ${LIBNCURSES} ${LIBNCURSESW}
21 LDADD=          -lncurses -lncursesw
22
23 ncurses_def.h:
24         AWK=awk sh ${NCURSESDIR}/include/MKncurses_def.sh \
25           ${NCURSESDIR}/include/ncurses_defs > ${.TARGET}
26
27 parametrized.h:
28         AWK=awk sh ${NCURSESDIR}/include/MKparametrized.sh \
29           ${TERMINFO_CAPS} > ${.TARGET}
30
31 # Hack: It's really termsort.c, but bootstrap stage chokes on it
32 termsort.h:
33         sh ${PROGSDIR}/MKtermsort.sh awk ${TERMINFO_CAPS} > termsort.c
34
35 tic.o: ${PROGSDIR}/tic.c
36         ${CC} ${CFLAGS} -c ${PROGSDIR}/tic.c -o ${.TARGET}
37
38 transform.o: ${PROGSDIR}/transform.c
39         ${CC} ${CFLAGS} -c ${PROGSDIR}/transform.c -o ${.TARGET}
40
41 dump_entry.o: ${PROGSDIR}/dump_entry.c termsort.h
42         ${CC} ${CFLAGS} -c ${PROGSDIR}/dump_entry.c -o ${.TARGET}
43
44 CLEANFILES=     ncurses_def.h parametrized.h termsort.c
45
46 SRCS=   ncurses_def.h parametrized.h termsort.h
47 SRCS+=  tic.c dump_entry.c transform.c
48
49 .include <bsd.prog.mk>