Home | History | Annotate | Line # | Download | only in libterminfo
Makefile revision 1.1
      1 #	$NetBSD: Makefile,v 1.1 2010/02/03 15:16:32 roy Exp $
      2 
      3 USE_SHLIBDIR=	yes
      4 
      5 LIB=		terminfo
      6 WARNS=		4
      7 
      8 SRCS=		term.c ti.c setupterm.c curterm.c tparm.c tputs.c
      9 SRCS+=		hash.c
     10 INCS=		term.h
     11 INCSDIR=	/usr/include
     12 
     13 LIBTIDIR?=	${.CURDIR}
     14 CPPFLAGS+=	-I${LIBTIDIR}
     15 
     16 # Generate our string and hash tables
     17 hash.c: genhash term.h
     18 		@echo "Generating terminfo hash"
     19 		cd ${LIBTIDIR}; ./genhash >${.OBJDIR}/$@
     20 
     21 # Update our man page with terminfo long names, short names and termcaps
     22 terminfo.5: genman terminfo.5.in term.h termcap.c
     23 		@echo "Generating terminfo man pages"
     24 		cd ${LIBTIDIR}; ./genman >${.OBJDIR}/$@
     25 
     26 MAN=		terminfo.3 terminfo.5
     27 CLEANFILES+=	terminfo.5 hash.c
     28 MLINKS=		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
     39 SRCS+=		termcap.c
     40 INCS+=		termcap.h
     41 CPPFLAGS+=	-I${.OBJDIR}
     42 MAN+=		termcap.3
     43 CLEANFILES+=	_termcap.c termcap_hash.c
     44 MLINKS+=	termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
     45 		termcap.3 tgetstr.3 termcap.3 tgoto.3
     46 
     47 # Generate our string and hash tables
     48 termcap_hash.c:	genthash termcap_map.c
     49 		@echo "Generating termcap hash"
     50 		cd ${LIBTIDIR}; ./genthash >${.OBJDIR}/$@
     51 
     52 # Depend on our hash table
     53 termcap.c:	termcap_hash.c
     54 
     55 .include <bsd.own.mk>
     56 .include <bsd.shlib.mk>
     57 
     58 .if ${MKLINKLIB} != "no"
     59 SYMLINKS+=	libterminfo.a ${LIBDIR}/libtermcap.a
     60 SYMLINKS+=	libterminfo.a ${LIBDIR}/libtermlib.a
     61 .endif
     62 
     63 .if ${MKPROFILE} != "no"
     64 SYMLINKS+=	libterminfo_p.a ${LIBDIR}/libtermcap_p.a
     65 SYMLINKS+=	libterminfo_p.a ${LIBDIR}/libtermlib_p.a
     66 .endif
     67 
     68 .if ${MKPIC} != "no"
     69 
     70 .if ${MKPICINSTALL} != "no"
     71 SYMLINKS+=	libterminfo_pic.a ${LIBDIR}/libtermcap_pic.a
     72 SYMLINKS+=	libterminfo_pic.a ${LIBDIR}/libtermlib_pic.a
     73 .endif
     74 
     75 .if exists(${.CURDIR}/shlib_version)
     76 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     77 		${_LIBSODIR}/libtermcap.so.0.6
     78 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     79 		${_LIBSODIR}/libtermlib.so.0.6
     80 .if ${_LIBSODIR} != ${LIBDIR}
     81 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     82 		${LIBDIR}/libtermcap.so.0.6
     83 SYMLINKS+=	libterminfo.so.${SHLIB_FULLVERSION} \
     84 		${LIBDIR}/libtermlib.so.0.6
     85 .endif
     86 
     87 .if (${OBJECT_FMT} == "ELF")
     88 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     89 		${_LIBSODIR}/libtermcap.so.0
     90 SYMLINKS+=	libterminfo.so ${_LIBSODIR}/libtermcap.so
     91 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     92 		${_LIBSODIR}/libtermlib.so.0
     93 SYMLINKS+=	libterminfo.so ${_LIBSODIR}/libtermlib.so
     94 .if ${_LIBSODIR} != ${LIBDIR}
     95 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     96 	${LIBDIR}/libtermcap.so.0
     97 SYMLINKS+=	libterminfo.so ${LIBDIR}/libtermcap.so
     98 SYMLINKS+=	libterminfo.so.${SHLIB_MAJOR} \
     99 		${LIBDIR}/libtermlib.so.0
    100 SYMLINKS+=	libterminfo.so ${LIBDIR}/libtermlib.so
    101 .endif
    102 .endif
    103 .endif	# exists shlib_version
    104 
    105 .endif	# ${MKPIC} != "no"
    106 
    107 .include <bsd.lib.mk>
    108