mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
23 lines
456 B
Makefile
23 lines
456 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:
|
|
gcc test.c -Wall -Werror -g -Og -o test
|
|
|
|
load: 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
|
|
sudo chown $(USER) /dev/kvmfr0
|
|
|
|
.PHONY: test
|