From 5f2db6c26a2d9a98ff16f027b6e4fd285298188d Mon Sep 17 00:00:00 2001 From: Maxim Burgerhout Date: Sun, 26 Aug 2012 15:40:05 +0200 Subject: [PATCH] Add install and uninstall targets to Makefile For if you do not want to or are unable to use dkms --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index d2c88af..ae14e28 100644 --- a/Makefile +++ b/Makefile @@ -14,3 +14,14 @@ clean: load: -/sbin/rmmod $(modname) /sbin/insmod $(modname).ko + +install: + mkdir -p /lib/modules/$(KVERSION)/misc/$(modname) + install -m 0755 -o root -g root $(modname).ko /lib/modules/$(KVERSION)/misc/$(modname) + depmod -a + +uninstall: + rm /lib/modules/$(KVERSION)/misc/$(modname)/$(modname).ko + rmdir /lib/modules/$(KVERSION)/misc/$(modname) + rmdir /lib/modules/$(KVERSION)/misc + depmod -a