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