1# @(#)Makefile 8.1 (Berkeley) 6/4/93 2# $FreeBSD$ 3 4.if defined(TARGET_ARCH) && !defined(COMPAT_32BIT) 5KVM_XARCH=${TARGET_ARCH} 6KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} 7.else 8KVM_XARCH=${MACHINE_ARCH} 9KVM_XCPUARCH=${MACHINE_CPUARCH} 10.endif 11 12.if ${KVM_XARCH} != ${MACHINE_ARCH} 13LIB= kvm-${KVM_XARCH} 14CFLAGS+=-DCROSS_LIBKVM 15.else 16LIB= kvm 17.endif 18 19SHLIBDIR?= /lib 20SHLIB_MAJOR= 6 21CFLAGS+=-DLIBC_SCCS -I${.CURDIR} 22 23.if exists(${.CURDIR}/kvm_${KVM_XARCH}.c) 24KVM_ARCH=${KVM_XARCH} 25.else 26KVM_ARCH=${KVM_XCPUARCH} 27.endif 28 29WARNS?= 3 30 31SRCS= kvm.c kvm_${KVM_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ 32 kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c 33.if exists(${.CURDIR}/kvm_minidump_${KVM_ARCH}.c) 34SRCS+= kvm_minidump_${KVM_ARCH}.c 35.endif 36INCS= kvm.h 37 38MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \ 39 kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \ 40 kvm_read.3 41 42MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \ 43 kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \ 44 kvm_getpcpu.3 kvm_read_zpcpu.3 \ 45 kvm_getpcpu.3 kvm_counter_u64_fetch.3 46MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3 47MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 48MLINKS+=kvm_read.3 kvm_write.3 49 50.include <bsd.lib.mk> 51