You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vendor-reset/Makefile

21 lines
467 B
Makefile

obj-m += vendor-reset.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
userspace:
gcc userspace/vendor-reset.c -Wall -Werror -g -Og -o userspace/vendor-reset
load: all
grep -q '^uio' /proc/modules || sudo modprobe uio
grep -q '^vendor-reset' /proc/modules && sudo rmmod vendor-reset || true
sudo insmod ./vendor-reset.ko
.PHONY: userspace