vendor-reset/Makefile

21 lines
463 B
Makefile
Raw Normal View History

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:
$(MAKE) -C $(KDIR) M=$(PWD) modules
2020-10-31 07:00:00 +00:00
2020-11-10 12:59:40 +00:00
install:
$(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
grep -q '^vendor_reset' /proc/modules && sudo rmmod vendor_reset || true
sudo insmod ./vendor-reset.ko $(if $(NOHOOK),install_hook=no,)
2020-10-31 07:00:00 +00:00
2020-11-10 12:59:40 +00:00
.PHONY: userspace load all install