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