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