summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/linux/Makefile b/linux/Makefile
index 9c7b2b9..86a92fc 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -1,7 +1,20 @@
obj-m += raptor.o
+KERNELVER ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KERNELVER)
+PWD := $(shell pwd)
+INSTALL_MOD_DIR ?= extra
+
all:
- make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+ make -C $(KERNELDIR)/build M=$(PWD) modules
clean:
- make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+ make -C $(KERNELDIR)/build M=$(PWD) clean
+
+install:
+ make -C $(KERNELDIR)/build M=$(PWD) modules_install
+ /sbin/depmod -a $(KERNELVER)
+
+uninstall:
+ rm $(KERNELDIR)/$(INSTALL_MOD_DIR)/raptor.ko.gz
+ /sbin/depmod -a $(KERNELVER)