freebsd-dev/lib/libtermcap/Makefile
Peter Wemm 5cc7d6a524 Deal with /usr/lib/compat/aout, and that we've been installing things
in the wrong places for a while.
Also, the the libtermlib.so -> libtermcap.so manually for elf, otherwise
the hard link follows the symlink and the result looks rather wierd.  The
*.a files are still hard linked under elf as before.
1998-10-11 04:39:56 +00:00

49 lines
1.5 KiB
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/4/93
LIB= termcap
SHLIB_MAJOR= 2
SHLIB_MINOR= 1
CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D -I${.CURDIR}
SRCS= termcap.c tgoto.c tputs.c tparm.c tospeed.c
MAN3= termcap.3
MLINKS= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3 \
termcap.3 tparm.3 termcap.3 __set_ospeed.3
LINKS= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
.if ${OBJFORMAT} == aout
.if !defined(NOPIC)
LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif
.endif
.if !defined(NOPROFILE)
LINKS+= ${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
.endif
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/termcap.h \
${DESTDIR}/usr/include
# This is a hack.. Work around a major number bump that should have been
# done differently. Back out this delta when it's time to go to 3.0 for real.
afterinstall:
.if !defined(NOPIC)
.if ${OBJFORMAT} == aout
.for lib in libtermcap libtermlib
rm -f ${DESTDIR}/usr/lib/compat/${lib}.so.3.0
rm -f ${DESTDIR}/usr/lib/compat/aout/${lib}.so.3.0
ln -s ${SHLIBDIR}/${lib}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
${DESTDIR}/usr/lib/compat/aout/${lib}.so.3.0
rm -f ${DESTDIR}${SHLIBDIR}/${lib}.so.3.0
.endfor
.endif
.if ${OBJFORMAT} == elf
rm -f ${DESTDIR}${SHLIBDIR}/libtermlib.so
ln -s libtermcap.so.${SHLIB_MAJOR} ${DESTDIR}${SHLIBDIR}/libtermlib.so
.endif
.endif
.include <bsd.lib.mk>