1# $MirOS: src/usr.bin/tset/Makefile,v 1.3 2006/10/28 19:08:07 tg Exp $
2
3PROG=		tset
4LINKS=		${BINDIR}/tset ${BINDIR}/reset
5DPADD+=		${LIBCURSES}
6LDADD+=		-lcurses
7
8NCMANSRCS+=	tset.1
9
10MLINKS+=	tset.1 reset.1
11
12.include <bsd.own.mk>
13
14LIBNCDIR?=	${BSDSRCDIR}/lib/libncurses
15.include "${LIBNCDIR}/Makefile.inc"
16
17CPPFLAGS+=	-I${NCSRCDIR}/progs
18CPPFLAGS+=	-D'PROG_CAPTOINFO="captoinfo"' \
19		-D'PROG_INFOTOCAP="infotocap"' \
20		-D'PROG_RESET="reset"' -D'PROG_INIT="init"'
21
22.PATH: ${NCSRCDIR}/progs
23
24SRCS+=		dump_entry.c
25SRCS+=		tset.c
26
27GENERATED=	ncurses_def.h parametrized.h termsort.c transform.h
28CLEANFILES+=	${GENERATED}
29
30beforedepend: ${GENERATED}
31
32ncurses_def.h: ${NCSRCDIR}/include/MKncurses_def.sh \
33    ${NCSRCDIR}/include/ncurses_defs
34	AWK=${AWK:Q} ${MKSH} ${NCSRCDIR}/include/MKncurses_def.sh \
35	    ${NCSRCDIR}/include/ncurses_defs >$@
36
37parametrized.h: ${NCSRCDIR}/include/MKparametrized.sh ${NCSRCDIR}/include/Caps
38	AWK=${AWK:Q} ${MKSH} ${NCSRCDIR}/include/MKparametrized.sh \
39	    ${NCSRCDIR}/include/Caps >$@
40
41termsort.c: ${NCSRCDIR}/progs/MKtermsort.sh ${NCSRCDIR}/include/Caps
42	${MKSH} ${NCSRCDIR}/progs/MKtermsort.sh ${AWK:Q} \
43	    ${NCSRCDIR}/include/Caps >$@
44
45transform.h:
46	print -n >$@
47
48.include <bsd.prog.mk>
49
50dump_entry.o: termsort.c
51${OBJS}: ${GENERATED:Ntermsort.c}
52