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) 226d3bd8e3SSascha WildnerCFLAGS+= -DBOOTSTRAPPING 2323b3ef78SJohn Marino. if exists (/usr/lib/libncurses.a) 2423b3ef78SJohn MarinoDPADD= /usr/lib/libncurses.a 256b7d23fcSJohn MarinoLDADD= -lncurses 2623b3ef78SJohn Marino. else 2723b3ef78SJohn MarinoDPADD= ${LIBNCURSES} 2823b3ef78SJohn MarinoLDADD= -lprivate_ncurses 2923b3ef78SJohn MarinoLDFLAGS+= -rpath /lib/priv -L /usr/lib/priv 3023b3ef78SJohn Marino. endif 3123b3ef78SJohn Marino.else 3223b3ef78SJohn MarinoDPADD= ${LIBNCURSES} 3323b3ef78SJohn MarinoLDADD= -lprivate_ncurses 3423b3ef78SJohn MarinoLDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv 3523b3ef78SJohn Marino.endif 369e71362fSJohn Marino 379e71362fSJohn Marinoncurses_def.h: 389e71362fSJohn Marino AWK=awk sh ${NCURSESDIR}/include/MKncurses_def.sh \ 399e71362fSJohn Marino ${NCURSESDIR}/include/ncurses_defs > ${.TARGET} 409e71362fSJohn Marino 419e71362fSJohn Marinoparametrized.h: 429e71362fSJohn Marino AWK=awk sh ${NCURSESDIR}/include/MKparametrized.sh \ 439e71362fSJohn Marino ${TERMINFO_CAPS} > ${.TARGET} 449e71362fSJohn Marino 459e71362fSJohn Marino# Hack: It's really termsort.c, but bootstrap stage chokes on it 46423ad346Szrj.if defined(BOOTSTRAPPING) 47423ad346Szrj_termsortc= termsort.h 48423ad346Szrj.else 49423ad346Szrj_termsortc= termsort.c 50*8e57c7e6Szrjbeforedepend: termsort.c 51423ad346Szrj.endif 52423ad346Szrj${_termsortc}: 539e71362fSJohn Marino sh ${PROGSDIR}/MKtermsort.sh awk ${TERMINFO_CAPS} > termsort.c 549e71362fSJohn Marino 559e71362fSJohn Marinotic.o: ${PROGSDIR}/tic.c 569e71362fSJohn Marino ${CC} ${CFLAGS} -c ${PROGSDIR}/tic.c -o ${.TARGET} 579e71362fSJohn Marino 589e71362fSJohn Marinotransform.o: ${PROGSDIR}/transform.c 599e71362fSJohn Marino ${CC} ${CFLAGS} -c ${PROGSDIR}/transform.c -o ${.TARGET} 609e71362fSJohn Marino 61423ad346Szrjdump_entry.o: ${PROGSDIR}/dump_entry.c ${_termsortc} 629e71362fSJohn Marino ${CC} ${CFLAGS} -c ${PROGSDIR}/dump_entry.c -o ${.TARGET} 639e71362fSJohn Marino 649e71362fSJohn MarinoCLEANFILES= ncurses_def.h parametrized.h termsort.c 659e71362fSJohn Marino 66423ad346SzrjSRCS= ncurses_def.h parametrized.h 67423ad346Szrj.if defined(BOOTSTRAPPING) 68423ad346SzrjSRCS+= termsort.h 69423ad346Szrj.endif 703eec8774SJohn MarinoSRCS+= tic.c dump_entry.c tparm_type.c transform.c 719e71362fSJohn Marino 729e71362fSJohn Marino.include <bsd.prog.mk> 73