2011-10-03 16:31:51 +04:00
|
|
|
# $NetBSD: Makefile,v 1.15 2011/10/03 12:31:51 roy Exp $
|
2010-02-03 18:16:32 +03:00
|
|
|
|
|
|
|
USE_SHLIBDIR= yes
|
|
|
|
|
|
|
|
LIB= terminfo
|
|
|
|
WARNS= 4
|
|
|
|
|
2010-02-12 15:18:33 +03:00
|
|
|
CPPFLAGS+= -I${.CURDIR}
|
2010-02-03 23:56:54 +03:00
|
|
|
|
2010-02-03 18:16:32 +03:00
|
|
|
SRCS= term.c ti.c setupterm.c curterm.c tparm.c tputs.c
|
2010-02-23 02:05:39 +03:00
|
|
|
SRCS+= compile.c hash.c
|
2010-02-03 18:16:32 +03:00
|
|
|
INCS= term.h
|
|
|
|
INCSDIR= /usr/include
|
|
|
|
|
|
|
|
MAN= terminfo.3 terminfo.5
|
|
|
|
MLINKS= terminfo.3 setupterm.3 \
|
|
|
|
terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \
|
2011-10-02 23:24:25 +04:00
|
|
|
terminfo.3 termname.3 \
|
2010-02-03 18:16:32 +03:00
|
|
|
terminfo.3 tigetnum.3 terminfo.3 tigetflag.3 \
|
|
|
|
terminfo.3 tigetstr.3 terminfo.3 tparm.3 terminfo.3 tputs.3 \
|
|
|
|
terminfo.3 putp.3 \
|
|
|
|
terminfo.3 ti_setupterm.3 terminfo.3 ti_getflag.3 \
|
|
|
|
terminfo.3 ti_getnum.3 terminfo.3 ti_getstr.3 \
|
2011-10-03 16:31:51 +04:00
|
|
|
terminfo.3 t_parm.3 terminfo.3 t_tiparm.3 \
|
2010-02-03 18:16:32 +03:00
|
|
|
terminfo.3 ti_puts.3 terminfo.3 ti_putp.3
|
|
|
|
|
|
|
|
# Build in termcap emulation
|
|
|
|
SRCS+= termcap.c
|
|
|
|
INCS+= termcap.h
|
|
|
|
MAN+= termcap.3
|
|
|
|
MLINKS+= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
|
|
|
|
termcap.3 tgetstr.3 termcap.3 tgoto.3
|
|
|
|
|
|
|
|
# Generate our string and hash tables
|
2010-02-03 23:56:54 +03:00
|
|
|
hash:
|
|
|
|
@echo "Generating terminfo hash"
|
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genhash >hash.c
|
2010-02-03 18:16:32 +03:00
|
|
|
@echo "Generating termcap hash"
|
2010-02-03 23:56:54 +03:00
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genthash >termcap_hash.c
|
|
|
|
|
|
|
|
# Generate our man pages
|
2010-02-10 01:16:12 +03:00
|
|
|
terminfo.5: terminfo.5.in term.h termcap_map.c
|
2010-02-03 23:56:54 +03:00
|
|
|
@echo "Generating terminfo man pages"
|
2010-02-10 01:16:12 +03:00
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genman >${.OBJDIR}/$@
|
|
|
|
|
2010-02-19 16:53:17 +03:00
|
|
|
CLEANFILES+= terminfo.5
|
|
|
|
|
2010-02-12 15:18:33 +03:00
|
|
|
# Allow terminfo descriptions to be compiled into libterminfo
|
|
|
|
compiled_terms:
|
|
|
|
@echo "Generating compiled terminfo descriptions"
|
|
|
|
cd ${.CURDIR} && ${HOST_SH} ./genterms >compiled_terms.c
|
|
|
|
|
2011-08-16 14:35:03 +04:00
|
|
|
COPTS.tparm.c = -Wno-format-nonliteral
|
2010-02-10 01:16:12 +03:00
|
|
|
man: terminfo.5
|
2010-02-03 18:16:32 +03:00
|
|
|
|
2010-02-12 15:18:33 +03:00
|
|
|
gen: hash compiled_terms man
|
2010-02-03 18:16:32 +03:00
|
|
|
|
2010-02-11 16:11:47 +03:00
|
|
|
.include <bsd.own.mk>
|
2010-02-03 18:16:32 +03:00
|
|
|
.include <bsd.shlib.mk>
|
|
|
|
|
|
|
|
.if ${MKLINKLIB} != "no"
|
|
|
|
SYMLINKS+= libterminfo.a ${LIBDIR}/libtermcap.a
|
|
|
|
SYMLINKS+= libterminfo.a ${LIBDIR}/libtermlib.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKPROFILE} != "no"
|
|
|
|
SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermcap_p.a
|
|
|
|
SYMLINKS+= libterminfo_p.a ${LIBDIR}/libtermlib_p.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MKPIC} != "no"
|
|
|
|
|
|
|
|
.if ${MKPICINSTALL} != "no"
|
|
|
|
SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermcap_pic.a
|
|
|
|
SYMLINKS+= libterminfo_pic.a ${LIBDIR}/libtermlib_pic.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/shlib_version)
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${_LIBSODIR}/libtermcap.so.0.6
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${_LIBSODIR}/libtermlib.so.0.6
|
|
|
|
.if ${_LIBSODIR} != ${LIBDIR}
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${LIBDIR}/libtermcap.so.0.6
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_FULLVERSION} \
|
|
|
|
${LIBDIR}/libtermlib.so.0.6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${_LIBSODIR}/libtermcap.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermcap.so
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${_LIBSODIR}/libtermlib.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${_LIBSODIR}/libtermlib.so
|
|
|
|
.if ${_LIBSODIR} != ${LIBDIR}
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.
this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.
i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.
some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 09:59:50 +04:00
|
|
|
${LIBDIR}/libtermcap.so.0
|
2010-02-03 18:16:32 +03:00
|
|
|
SYMLINKS+= libterminfo.so ${LIBDIR}/libtermcap.so
|
|
|
|
SYMLINKS+= libterminfo.so.${SHLIB_MAJOR} \
|
|
|
|
${LIBDIR}/libtermlib.so.0
|
|
|
|
SYMLINKS+= libterminfo.so ${LIBDIR}/libtermlib.so
|
|
|
|
.endif
|
|
|
|
.endif # exists shlib_version
|
|
|
|
|
|
|
|
.endif # ${MKPIC} != "no"
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|