NetBSD/lib/libterm/Makefile
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00

57 lines
1.6 KiB
Makefile

# $NetBSD: Makefile,v 1.25 2001/12/28 01:32:39 lukem Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
LIB= termcap
USE_SHLIBDIR= yes
CPPFLAGS+=-I${.CURDIR} -DCM_N -DCM_GT -DCM_B -DCM_D
SRCS= termcap.c tgoto.c tputs.c
MAN= 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 t_getent.3 termcap.3 t_getflag.3 termcap.3 t_getnum.3 \
termcap.3 t_getstr.3 termcap.3 t_goto.3 termcap.3 t_puts.3 \
termcap.3 t_freent.3
INCS= termcap.h
INCSDIR=/usr/include
.include <bsd.own.mk>
.if ${MKLINKLIB} != "no"
LINKS+= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
.endif
.if ${MKPROFILE} != "no"
LINKS+= ${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
.endif
.if ${MKPIC} != "no"
.if ${MKPICINSTALL} != "no"
LINKS+= ${LIBDIR}/libtermcap_pic.a ${LIBDIR}/libtermlib_pic.a
.endif
.if exists(${.CURDIR}/shlib_version)
LINKS+= ${_LIBSODIR}/libtermcap.so.${SHLIB_FULLVERSION} \
${_LIBSODIR}/libtermlib.so.${SHLIB_FULLVERSION}
.if ${_LIBSODIR} != ${LIBDIR}
SYMLINKS+=${_LIBSODIR}/libtermcap.so.${SHLIB_FULLVERSION} \
${LIBDIR}/libtermlib.so.${SHLIB_FULLVERSION}
.endif
.if (${OBJECT_FMT} == "ELF")
LINKS+= ${_LIBSODIR}/libtermcap.so.${SHLIB_MAJOR} \
${_LIBSODIR}/libtermlib.so.${SHLIB_MAJOR}
LINKS+= ${_LIBSODIR}/libtermcap.so ${_LIBSODIR}/libtermlib.so
.if ${_LIBSODIR} != ${LIBDIR}
SYMLINKS+= ${_LIBSODIR}/libtermcap.so.${SHLIB_MAJOR} \
${LIBDIR}/libtermlib.so.${SHLIB_MAJOR}
SYMLINKS+= ${_LIBSODIR}/libtermcap.so ${LIBDIR}/libtermlib.so
.endif
.endif
.endif # exists shlib_version
.endif # ${MKPIC} != "no"
.include <bsd.lib.mk>