2020-10-31 07:00:00 +00:00
|
|
|
USER := $(shell whoami)
|
|
|
|
KVER ?= $(shell uname -r)
|
|
|
|
KDIR ?= /lib/modules/$(KVER)/build
|
|
|
|
|
2020-11-10 12:59:40 +00:00
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
2020-11-02 20:47:13 +00:00
|
|
|
$(MAKE) -C $(KDIR) M=$(PWD) modules
|
2020-10-31 07:00:00 +00:00
|
|
|
|
2020-11-10 12:59:40 +00:00
|
|
|
install:
|
2020-11-14 07:03:19 +00:00
|
|
|
$(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) modules_install
|
2020-11-10 12:59:40 +00:00
|
|
|
|
2020-10-31 07:00:00 +00:00
|
|
|
clean:
|
2020-11-02 21:18:43 +00:00
|
|
|
$(MAKE) -C $(KDIR) M=$(PWD) clean
|
2020-10-31 07:00:00 +00:00
|
|
|
|
|
|
|
load: all
|
2020-11-01 22:14:11 +00:00
|
|
|
grep -q '^vendor_reset' /proc/modules && sudo rmmod vendor_reset || true
|
2020-11-10 06:11:26 +00:00
|
|
|
sudo insmod ./vendor-reset.ko $(if $(HOOK),install_hook=yes,)
|
2020-10-31 07:00:00 +00:00
|
|
|
|
2020-11-10 12:59:40 +00:00
|
|
|
.PHONY: userspace load all install
|