summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosh Wilsdon <josh@wilsdon.ca>2011-07-16 03:36:09 +0000
committerJosh Wilsdon <josh@wilsdon.ca>2011-07-16 03:37:11 +0000
commit5fb9de066aa85583cc403dab8a2bae53aa0f925f (patch)
tree47c7ff52ad781a38dc13f263cc6a177591c58fe5 /Makefile
parenta1aba7a39f700d04698e2ea0a061aca6e894993d (diff)
downloadillumos-kvm-5fb9de066aa85583cc403dab8a2bae53aa0f925f.tar.gz
[HVM-488] add install target that works with DESTDIR
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
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