NetBSD/lib/libkvm/Makefile

64 lines
2.0 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.43 2007/02/10 00:23:13 ad Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/4/93
1994-01-28 02:31:08 +03:00
* 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 04:32:37 +03:00
USE_SHLIBDIR= yes
LIB= kvm
CPPFLAGS+=-DLIBC_SCCS -I${NETBSDSRCDIR}/sys
.if ${MACHINE_ARCH} == "i386"
2003-03-28 17:01:46 +03:00
LINTFLAGS+=-w
.endif
SRCS= kvm.c kvm_file.c kvm_getloadavg.c kvm_proc.c
# This library should compile to the same thing on all variants of
# ${MACHINE} with the same ${MACHINE_ARCH} so shared /usr works.
1997-03-21 21:48:58 +03:00
# If it is necessary to run different code based on ${MACHINE} then
# the dispatch on ${MACHINE} should be done at run time (see m68k).
.include <bsd.own.mk>
.if exists(kvm_${MACHINE_ARCH}.c)
SRCS+= kvm_${MACHINE_ARCH}.c
.elif exists(kvm_${MACHINE_CPU}.c)
SRCS+= kvm_${MACHINE_CPU}.c
.else
.BEGIN:
@echo no kvm_xx.c for ${MACHINE_ARCH} nor ${MACHINE_CPU}
@false
.endif
# Additional modules needed for m68k
2001-05-21 18:56:29 +04:00
.if (${MACHINE_ARCH} == "m68k" || ${MACHINE_CPU} == "m68k")
SRCS+= kvm_m68k_cmn.c kvm_sun2.c kvm_sun3.c kvm_sun3x.c
.endif
1994-05-09 07:17:28 +04:00
MAN= kvm.3 kvm_dump.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \
2003-01-18 13:32:11 +03:00
kvm_getprocs.3 kvm_nlist.3 kvm_open.3 kvm_read.3 kvm_getlwps.3
1994-05-09 07:17:28 +04:00
MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
MLINKS+=kvm_getprocs.3 kvm_getproc2.3
MLINKS+=kvm_getprocs.3 kvm_getargv2.3 kvm_getprocs.3 kvm_getenvv2.3
1994-05-09 07:17:28 +04:00
MLINKS+=kvm_open.3 kvm_openfiles.3 kvm_open.3 kvm_close.3
MLINKS+=kvm_read.3 kvm_write.3
MLINKS+=kvm_dump.3 kvm_dump_mkheader.3 kvm_dump.3 kvm_dump_wrtheader.3
MLINKS+=kvm_dump.3 kvm_dump_inval.3
1994-01-28 02:31:08 +03:00
# This fixes building with MACHINE==sparc64, MACHINE_ARCH==sparc
# XXX: this is a hack, but until the sparc MD headers are separated
# out from the sparc AD headers, it's the easiest solution.
#
.if (${MACHINE_ARCH} == "sparc") # {
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
@([ -h machine ] || \
ln -fs ${NETBSDSRCDIR}/sys/arch/sparc/include machine)
@([ -h sparc ] || ln -fs ${NETBSDSRCDIR}/sys/arch/sparc/include sparc)
.NOPATH: machine sparc
.endif
CLEANFILES+= machine sparc
CPPFLAGS+= -I.
.endif # }
1994-01-28 02:31:08 +03:00
.include <bsd.lib.mk>