1 # $NetBSD: Makefile,v 1.44 2007/05/28 12:06:20 tls Exp $
2 # from: @(#)Makefile 8.1 (Berkeley) 6/4/93
4 USE_FORT?
= yes
# used primarily by setgid programs
9 CPPFLAGS
+=-DLIBC_SCCS
-I
${NETBSDSRCDIR}/sys
10 .if
${MACHINE_ARCH} == "i386"
14 SRCS
= kvm.c kvm_file.c kvm_getloadavg.c kvm_proc.c
16 # This library should compile to the same thing on all variants of
17 # ${MACHINE} with the same ${MACHINE_ARCH} so shared /usr works.
18 # If it is necessary to run different code based on ${MACHINE} then
19 # the dispatch on ${MACHINE} should be done at run time (see m68k).
22 .if exists
(kvm_
${KVM_MACHINE_ARCH}.c
)
23 SRCS
+= kvm_
${KVM_MACHINE_ARCH}.c
24 .elif exists
(kvm_
${MACHINE_ARCH}.c
)
25 SRCS
+= kvm_
${MACHINE_ARCH}.c
26 .elif exists
(kvm_
${MACHINE_CPU}.c
)
27 SRCS
+= kvm_
${MACHINE_CPU}.c
30 @echo no kvm_xx.c for
${MACHINE_ARCH} nor
${MACHINE_CPU}
34 # Additional modules needed for m68k
35 .if
(${MACHINE_ARCH} == "m68k" ||
${MACHINE_CPU} == "m68k")
36 SRCS
+= kvm_m68k_cmn.c kvm_sun2.c kvm_sun3.c kvm_sun3x.c
39 MAN
= kvm
.3 kvm_dump
.3 kvm_geterr
.3 kvm_getfiles
.3 kvm_getloadavg
.3 \
40 kvm_getprocs
.3 kvm_nlist
.3 kvm_open
.3 kvm_read
.3 kvm_getlwps
.3
42 MLINKS
+=kvm_getprocs
.3 kvm_getargv
.3 kvm_getprocs
.3 kvm_getenvv
.3
43 MLINKS
+=kvm_getprocs
.3 kvm_getproc2.3
44 MLINKS
+=kvm_getprocs
.3 kvm_getargv2.3 kvm_getprocs
.3 kvm_getenvv2.3
45 MLINKS
+=kvm_open
.3 kvm_openfiles
.3 kvm_open
.3 kvm_close
.3
46 MLINKS
+=kvm_read
.3 kvm_write
.3
47 MLINKS
+=kvm_dump
.3 kvm_dump_mkheader
.3 kvm_dump
.3 kvm_dump_wrtheader
.3
48 MLINKS
+=kvm_dump
.3 kvm_dump_inval
.3
50 # This fixes building with MACHINE==sparc64, MACHINE_ARCH==sparc
51 # XXX: this is a hack, but until the sparc MD headers are separated
52 # out from the sparc AD headers, it's the easiest solution.
54 .if
(${MACHINE_ARCH} == "sparc") # {
55 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
58 ln
-fs
${NETBSDSRCDIR}/sys
/arch
/sparc
/include machine
)
59 @
([ -h sparc
] || ln
-fs
${NETBSDSRCDIR}/sys
/arch
/sparc
/include sparc
)
60 .NOPATH
: machine sparc
62 CLEANFILES
+= machine sparc