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