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