From 71ffa0a137545413602f325ec1dbc2b97baf76b9 Mon Sep 17 00:00:00 2001 From: Omar Pakker Date: Wed, 5 Jun 2019 01:08:00 +0200 Subject: [PATCH] Update makefile to allow kernel override --- module/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/Makefile b/module/Makefile index 74cdf077..d595cc49 100644 --- a/module/Makefile +++ b/module/Makefile @@ -1,11 +1,13 @@ obj-m += kvmfr.o USER := $(shell whoami) +KVER ?= $(shell uname -r) +KDIR ?= /lib/modules/$(KVER)/build all: - make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules + make -C $(KDIR) M=$(PWD) modules clean: - make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean + make -C $(KDIR) M=$(PWD) clean test: all grep -q '^uio' /proc/modules || sudo modprobe uio