LookingGlass/module/Makefile
2019-06-06 13:40:06 +10:00

17 lines
361 B
Makefile

obj-m += kvmfr.o
USER := $(shell whoami)
KVER ?= $(shell uname -r)
KDIR ?= /lib/modules/$(KVER)/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) clean
test: all
grep -q '^uio' /proc/modules || sudo modprobe uio
grep -q '^kvmfr' /proc/modules && sudo rmmod kvmfr || true
sudo insmod ./kvmfr.ko
sudo chown $(USER) /dev/uio0