2010-02-11 17:49:56 +03:00
|
|
|
# $NetBSD: Makefile,v 1.8 2010/02/11 14:49:56 roy Exp $
|
2010-02-03 18:16:32 +03:00
|
|
|
|
|
|
|
USE_SHLIBDIR= yes
|
|
|
|
|
|
|
|
LIB= terminfo
|
|
|
|
WARNS= 4
|
|
|
|
|
2010-02-11 03:27:09 +03:00
|
|
|
CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR}
|
2010-02-03 23:56:54 +03:00
|
|
|
|
2010-02-03 18:16:32 +03:00
|
|
|
SRCS= term.c ti.c setupterm.c curterm.c tparm.c tputs.c
|
|
|
|
SRCS+= hash.c
|
|
|
|
INCS= term.h
|
|
|
|
INCSDIR= /usr/include
|
|
|
|
|
2010-02-11 16:11:47 +03:00
|
|
|
.PHONY: rescue.c
|
2010-02-11 03:27:09 +03:00
|
|
|
|
2010-02-11 16:11:47 +03:00
|
|
|
rescue.c:
|
2010-02-11 17:44:44 +03:00
|
|
|
${TOOL_TIC} -Sx ${NETBSDSRCDIR}/share/terminfo/terminfo \
|
2010-02-11 17:49:56 +03:00
|
|
|
ansi dumb vt100 vt220 wsvt25 xterm >$@
|
2010-02-11 03:27:09 +03:00
|
|
|
|
|
|
|
term.c: rescue.c
|
|
|
|
|
2010-02-03 18:16:32 +03:00
|
|
|
MAN= terminfo.3 terminfo.5
|
|
|
|
MLINKS= terminfo.3 setupterm.3 \
|
|
|
|
terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \
|
|
|
|
terminfo.3 tigetnum.3 terminfo.3 tigetflag.3 \
|
|
|
|
terminfo.3 tigetstr.3 terminfo.3 tparm.3 terminfo.3 tputs.3 \
|
|
|
|
terminfo.3 putp.3 \
|
|
|
|
terminfo.3 ti_setupterm.3 terminfo.3 ti_getflag.3 \
|
|
|
|
terminfo.3 ti_getnum.3 terminfo.3 ti_getstr.3 \
|
|
|
|
terminfo.3 t_parm.3 terminfo.3 t_vparm.3 \
|
|
|
|
terminfo.3 ti_puts.3 terminfo.3 ti_putp.3
|
|
|
|
|
|
|
|
# Build in termcap emulation
|
|
|
|
SRCS+= termcap.c
|
|
|
|
INCS+= termcap.h
|
|
|
|
MAN+= termcap.3
|
|
|
|
MLINKS+= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
|
|
|
|
termcap.3 tgetstr.3 termcap.3 tgoto.3
|
|
|
|
|
|
|
|
# Generate our string and hash tables
|
2010-02-03 23:56:54 +03:00
|
|
|
hash:
|
|
|
|
@echo "Generating terminfo hash"
|
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genhash >hash.c
|
2010-02-03 18:16:32 +03:00
|
|
|
@echo "Generating termcap hash"
|
2010-02-03 23:56:54 +03:00
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genthash >termcap_hash.c
|
|
|
|
|
|
|
|
# Generate our man pages
|
2010-02-10 01:16:12 +03:00
|
|
|
terminfo.5: terminfo.5.in term.h termcap_map.c
|
2010-02-03 23:56:54 +03:00
|
|
|
@echo "Generating terminfo man pages"
|
2010-02-10 01:16:12 +03:00
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@
|
|
|
|
|
|
|
|
man: terminfo.5
|
2010-02-03 18:16:32 +03:00
|
|
|
|
2010-02-03 23:56:54 +03:00
|
|
|
gen: hash man
|
2010-02-03 18:16:32 +03:00
|
|
|
|
2010-02-11 16:11:47 +03:00
|
|
|
.include <bsd.own.mk>
|
2010-02-03 18:16:32 +03:00
|
|
|
.include <bsd.shlib.mk>
|
|
|
|
|
|
|
|
.if ${MKLINKLIB} != "no"
|
|
|
|
SYMLINKS+= libterminfo.a ${LIBDIR}/libtermcap.a
|
|
|
|
SYMLINKS+= libterminfo.a ${LIBDIR}/libtermlib.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKPROFILE} != "no"
|
|
|
|
SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermcap_p.a
|
|
|
|
SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermlib_p.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKPIC} != "no"
|
|
|
|
|
|
|
|
.if ${MKPICINSTALL} != "no"
|
|
|
|
SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermcap_pic.a
|
|
|
|
SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermlib_pic.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/shlib_version)
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${_LIBSODIR}/libtermcap.so.0.6
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${_LIBSODIR}/libtermlib.so.0.6
|
|
|
|
.if ${_LIBSODIR} != ${LIBDIR}
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${LIBDIR}/libtermcap.so.0.6
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${LIBDIR}/libtermlib.so.0.6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${_LIBSODIR}/libtermcap.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermcap.so
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${_LIBSODIR}/libtermlib.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermlib.so
|
|
|
|
.if ${_LIBSODIR} != ${LIBDIR}
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${LIBDIR}/libtermcap.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${LIBDIR}/libtermcap.so
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${LIBDIR}/libtermlib.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${LIBDIR}/libtermlib.so
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif # exists shlib_version
|
|
|
|
|
|
|
|
.endif # ${MKPIC} != "no"
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|