From 5fb9de066aa85583cc403dab8a2bae53aa0f925f Mon Sep 17 00:00:00 2001 From: Josh Wilsdon Date: Sat, 16 Jul 2011 03:36:09 +0000 Subject: [HVM-488] add install target that works with DESTDIR --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dd724db..9d4a63f 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ HEADERS= \ kvm_vmx.h \ kvm_x86host.h \ kvm_x86impl.h \ - kvm_x86.h + kvm_x86.h HDRCHK_USRHDRS= \ kvm.h \ @@ -106,6 +106,14 @@ kvm.so: kvm_mdb.c gcc -m64 -shared \ -fPIC $(CFLAGS) $(INCLUDEDIR) -I/usr/include -o $@ kvm_mdb.c +install: kvm + @echo "==> Installing kvm module (to $(DESTDIR)/)" + @mkdir -p $(DESTDIR)/usr/kernel/drv/amd64 + @cp kvm $(DESTDIR)/usr/kernel/drv/amd64/kvm + @cp kvm.conf $(DESTDIR)/usr/kernel/drv + @mkdir -p $(DESTDIR)/usr/lib/mdb/kvm/amd64 + @cp kvm.so $(DESTDIR)/usr/lib/mdb/kvm/amd64 + check: @$(CSTYLE) kvm.c kvm_mdb.c kvm_emulate.c kvm_x86.c kvm_irq.c kvm_lapic.c kvm_i8254.c kvm_mmu.c kvm_iodev.c kvm_ioapic.c kvm_vmx.c kvm_i8259.c kvm_coalesced_mmio.c kvm_irq_comm.c kvm_cache_regs.c kvm_bitops.c $(HEADERS) @./tools/xxxcheck kvm_x86.c kvm.c kvm_irq.c kvm_lapic.c kvm_i8254.c kvm_mmu.c kvm_iodev.c kvm_ioapic.c kvm_vmx.c kvm_i8259.c kvm_coalesced_mmio.c kvm_irq_comm.c kvm_cache_regs.c kvm_bitops.c -- cgit v1.2.3