xref: /dragonfly/usr.bin/tic/Makefile (revision 3eec8774)
19e71362fSJohn MarinoNCURSESDIR=	${.CURDIR}/../../contrib/ncurses
29e71362fSJohn MarinoTERMINFO_CAPS=  ${NCURSESDIR}/include/Caps
39e71362fSJohn MarinoPROGSDIR=	${NCURSESDIR}/progs
49e71362fSJohn Marino.PATH:		${PROGSDIR}
59e71362fSJohn Marino
69e71362fSJohn MarinoPROG=		tic
79e71362fSJohn Marino
89e71362fSJohn MarinoCFLAGS+=	-D_XOPEN_SOURCE_EXTENDED
99e71362fSJohn MarinoCFLAGS+=	-DENABLE_WIDEC
109e71362fSJohn MarinoCFLAGS+=	-DSET_NCURSES_CH_T=cchar_t
119e71362fSJohn MarinoCFLAGS+=	-DSET_NEED_WCHAR_H=1
129e71362fSJohn MarinoCFLAGS+=	-I${PROGSDIR}
139e71362fSJohn MarinoCFLAGS+=	-I.
149e71362fSJohn MarinoCFLAGS+=	-I${NCURSESDIR}/include
159e71362fSJohn MarinoCFLAGS+=	-I${.CURDIR}/../../lib/libncurses/include
169e71362fSJohn MarinoCFLAGS+=	-I${.CURDIR}
179e71362fSJohn MarinoCFLAGS+=	-I${.OBJDIR}
189e71362fSJohn Marino
1923b3ef78SJohn Marino# Ideally this should be -lprivate_ncursesw
206b7d23fcSJohn Marino# Wide version can be used when DragonFly 3.3 branch is created
2123b3ef78SJohn Marino.if defined(BOOTSTRAPPING)
2223b3ef78SJohn Marino.  if exists (/usr/lib/libncurses.a)
2323b3ef78SJohn MarinoDPADD=		/usr/lib/libncurses.a
246b7d23fcSJohn MarinoLDADD=		-lncurses
2523b3ef78SJohn Marino.  else
2623b3ef78SJohn MarinoDPADD=		${LIBNCURSES}
2723b3ef78SJohn MarinoLDADD=		-lprivate_ncurses
2823b3ef78SJohn MarinoLDFLAGS+=	-rpath /lib/priv -L /usr/lib/priv
2923b3ef78SJohn Marino.  endif
3023b3ef78SJohn Marino.else
3123b3ef78SJohn MarinoDPADD=		${LIBNCURSES}
3223b3ef78SJohn MarinoLDADD=		-lprivate_ncurses
3323b3ef78SJohn MarinoLDFLAGS+=	-rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
3423b3ef78SJohn Marino.endif
359e71362fSJohn Marino
369e71362fSJohn Marinoncurses_def.h:
379e71362fSJohn Marino	AWK=awk sh ${NCURSESDIR}/include/MKncurses_def.sh \
389e71362fSJohn Marino	  ${NCURSESDIR}/include/ncurses_defs > ${.TARGET}
399e71362fSJohn Marino
409e71362fSJohn Marinoparametrized.h:
419e71362fSJohn Marino	AWK=awk sh ${NCURSESDIR}/include/MKparametrized.sh \
429e71362fSJohn Marino	  ${TERMINFO_CAPS} > ${.TARGET}
439e71362fSJohn Marino
449e71362fSJohn Marino# Hack: It's really termsort.c, but bootstrap stage chokes on it
459e71362fSJohn Marinotermsort.h:
469e71362fSJohn Marino	sh ${PROGSDIR}/MKtermsort.sh awk ${TERMINFO_CAPS} > termsort.c
479e71362fSJohn Marino
489e71362fSJohn Marinotic.o: ${PROGSDIR}/tic.c
499e71362fSJohn Marino	${CC} ${CFLAGS} -c ${PROGSDIR}/tic.c -o ${.TARGET}
509e71362fSJohn Marino
519e71362fSJohn Marinotransform.o: ${PROGSDIR}/transform.c
529e71362fSJohn Marino	${CC} ${CFLAGS} -c ${PROGSDIR}/transform.c -o ${.TARGET}
539e71362fSJohn Marino
549e71362fSJohn Marinodump_entry.o: ${PROGSDIR}/dump_entry.c termsort.h
559e71362fSJohn Marino	${CC} ${CFLAGS} -c ${PROGSDIR}/dump_entry.c -o ${.TARGET}
569e71362fSJohn Marino
579e71362fSJohn MarinoCLEANFILES=	ncurses_def.h parametrized.h termsort.c
589e71362fSJohn Marino
599e71362fSJohn MarinoSRCS=	ncurses_def.h parametrized.h termsort.h
60*3eec8774SJohn MarinoSRCS+=	tic.c dump_entry.c tparm_type.c transform.c
619e71362fSJohn Marino
629e71362fSJohn Marino.include <bsd.prog.mk>
63