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