Home | History | Annotate | Line # | Download | only in libterminfo
Makefile revision 1.17
      1 #	$NetBSD: Makefile,v 1.17 2011/10/04 11:01:14 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+=		compile.c 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 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
     28 SRCS+=		termcap.c
     29 INCS+=		termcap.h
     30 MAN+=		termcap.3
     31 MLINKS+=	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
     35 hash:
     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
     42 terminfo.5: terminfo.5.in term.h termcap_map.c
     43 		@echo "Generating terminfo man pages"
     44 		cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@
     45 
     46 CLEANFILES+=	terminfo.5
     47 
     48 # Allow terminfo descriptions to be compiled into libterminfo
     49 compiled_terms:
     50 		@echo "Generating compiled terminfo descriptions"
     51 		cd ${.CURDIR} && ${HOST_SH} ./genterms >compiled_terms.c
     52 
     53 COPTS.tparm.c = -Wno-format-nonliteral
     54 man: terminfo.5
     55 
     56 gen: hash compiled_terms man
     57 
     58 .include <bsd.own.mk>
     59 .include <bsd.shlib.mk>
     60 
     61 .if ${MKLINKLIB} != "no"
     62 SYMLINKS+=	libterminfo.a ${LIBDIR}/libtermcap.a
     63 SYMLINKS+=	libterminfo.a ${LIBDIR}/libtermlib.a
     64 .endif
     65 
     66 .if ${MKPROFILE} != "no"
     67 SYMLINKS+=	libterminfo_p.a ${LIBDIR}/libtermcap_p.a
     68 SYMLINKS+=	libterminfo_p.a ${LIBDIR}/libtermlib_p.a
     69 .endif
     70 
     71 .if ${MKPIC} != "no"
     72 
     73 .if ${MKPICINSTALL} != "no"
     74 SYMLINKS+=	libterminfo_pic.a ${LIBDIR}/libtermcap_pic.a
     75 SYMLINKS+=	libterminfo_pic.a ${LIBDIR}/libtermlib_pic.a
     76 .endif
     77 
     78 .if exists(${.CURDIR}/shlib_version)
     79 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     80 		${_LIBSODIR}/libtermcap.so.0.6
     81 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     82 		${_LIBSODIR}/libtermlib.so.0.6
     83 .if ${_LIBSODIR} != ${LIBDIR}
     84 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     85 		${LIBDIR}/libtermcap.so.0.6
     86 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     87 		${LIBDIR}/libtermlib.so.0.6
     88 .endif
     89 
     90 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     91 		${_LIBSODIR}/libtermcap.so.0
     92 SYMLINKS+=	libterminfo.so ${_LIBSODIR}/libtermcap.so
     93 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     94 		${_LIBSODIR}/libtermlib.so.0
     95 SYMLINKS+=	libterminfo.so ${_LIBSODIR}/libtermlib.so
     96 .if ${_LIBSODIR} != ${LIBDIR}
     97 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     98 		${LIBDIR}/libtermcap.so.0
     99 SYMLINKS+=	libterminfo.so ${LIBDIR}/libtermcap.so
    100 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
    101 		${LIBDIR}/libtermlib.so.0
    102 SYMLINKS+=	libterminfo.so ${LIBDIR}/libtermlib.so
    103 .endif
    104 .endif	# exists shlib_version
    105 
    106 .endif	# ${MKPIC} != "no"
    107 
    108 .include <bsd.lib.mk>
    109