Makefile revision 1.5
1# $NetBSD: Makefile,v 1.5 2010/02/11 00:27:09 roy Exp $ 2 3USE_SHLIBDIR= yes 4 5LIB= terminfo 6WARNS= 4 7 8CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} 9 10SRCS= term.c ti.c setupterm.c curterm.c tparm.c tputs.c 11SRCS+= hash.c 12INCS= term.h 13INCSDIR= /usr/include 14 15.include <bsd.own.mk> 16 17rescue.c: ${NETBSDSRCDIR}/share/terminfo/terminfo 18 @echo "static const char *rescue_terms[] = {" >$@ 19 ${TOOL_TIC} -Sx ${NETBSDSRCDIR}/share/terminfo/terminfo \ 20 ansi dumb vt100 vt220 wsvt25 >>$@ 21 @echo " NULL," >>$@ 22 @echo " NULL" >>$@ 23 @echo "};" >>$@ 24 25term.c: rescue.c 26 27MAN= terminfo.3 terminfo.5 28MLINKS= terminfo.3 setupterm.3 \ 29 terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \ 30 terminfo.3 tigetnum.3 terminfo.3 tigetflag.3 \ 31 terminfo.3 tigetstr.3 terminfo.3 tparm.3 terminfo.3 tputs.3 \ 32 terminfo.3 putp.3 \ 33 terminfo.3 ti_setupterm.3 terminfo.3 ti_getflag.3 \ 34 terminfo.3 ti_getnum.3 terminfo.3 ti_getstr.3 \ 35 terminfo.3 t_parm.3 terminfo.3 t_vparm.3 \ 36 terminfo.3 ti_puts.3 terminfo.3 ti_putp.3 37 38# Build in termcap emulation 39SRCS+= termcap.c 40INCS+= termcap.h 41MAN+= termcap.3 42MLINKS+= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \ 43 termcap.3 tgetstr.3 termcap.3 tgoto.3 44 45# Generate our string and hash tables 46hash: 47 @echo "Generating terminfo hash" 48 cd ${.CURDIR} && ${HOST_SH} ./genhash >hash.c 49 @echo "Generating termcap hash" 50 cd ${.CURDIR} && ${HOST_SH} ./genthash >termcap_hash.c 51 52# Generate our man pages 53terminfo.5: terminfo.5.in term.h termcap_map.c 54 @echo "Generating terminfo man pages" 55 cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@ 56 57man: terminfo.5 58 59gen: hash man 60 61.include <bsd.shlib.mk> 62 63.if ${MKLINKLIB} != "no" 64SYMLINKS+= libterminfo.a ${LIBDIR}/libtermcap.a 65SYMLINKS+= libterminfo.a ${LIBDIR}/libtermlib.a 66.endif 67 68.if ${MKPROFILE} != "no" 69SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermcap_p.a 70SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermlib_p.a 71.endif 72 73.if ${MKPIC} != "no" 74 75.if ${MKPICINSTALL} != "no" 76SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermcap_pic.a 77SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermlib_pic.a 78.endif 79 80.if exists(${.CURDIR}/shlib_version) 81SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \ 82 ${_LIBSODIR}/libtermcap.so.0.6 83SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \ 84 ${_LIBSODIR}/libtermlib.so.0.6 85.if ${_LIBSODIR} != ${LIBDIR} 86SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \ 87 ${LIBDIR}/libtermcap.so.0.6 88SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \ 89 ${LIBDIR}/libtermlib.so.0.6 90.endif 91 92.if (${OBJECT_FMT} == "ELF") 93SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \ 94 ${_LIBSODIR}/libtermcap.so.0 95SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermcap.so 96SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \ 97 ${_LIBSODIR}/libtermlib.so.0 98SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermlib.so 99.if ${_LIBSODIR} != ${LIBDIR} 100SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \ 101 ${LIBDIR}/libtermcap.so.0 102SYMLINKS+= libterminfo.so ${LIBDIR}/libtermcap.so 103SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \ 104 ${LIBDIR}/libtermlib.so.0 105SYMLINKS+= libterminfo.so ${LIBDIR}/libtermlib.so 106.endif 107.endif 108.endif # exists shlib_version 109 110.endif # ${MKPIC} != "no" 111 112.include <bsd.lib.mk> 113