2021-07-11 23:43:35 +00:00
|
|
|
|
2021-08-17 21:42:57 +00:00
|
|
|
obj-m := dragonprobe.o dragonprobe-char.o i2c-dragonprobe.o spi-dragonprobe.o dragonprobe-hwmon.o
|
2021-07-11 23:43:35 +00:00
|
|
|
KDIR := /lib/modules/$(shell uname -r)/build
|
|
|
|
PWD := $(shell pwd)
|
|
|
|
|
|
|
|
CFLAGS += -Wall -Wpedantic
|
|
|
|
|
|
|
|
default:
|
|
|
|
$(MAKE) -C $(KDIR) M=$(PWD) modules
|
|
|
|
|
|
|
|
clean:
|
2021-08-17 21:42:57 +00:00
|
|
|
$(RM) -v *.o *.ko *.mod *.mod.c Module.symvers modules.order .*.cmd .*.d
|
2021-07-11 23:43:35 +00:00
|
|
|
|
|
|
|
load:
|
2021-08-17 21:42:57 +00:00
|
|
|
sudo insmod ./dragonprobe.ko
|
|
|
|
sudo insmod ./dragonprobe-char.ko
|
|
|
|
sudo insmod ./i2c-dragonprobe.ko
|
|
|
|
sudo insmod ./spi-dragonprobe.ko
|
|
|
|
sudo insmod ./dragonprobe-hwmon.ko
|
2021-07-11 23:43:35 +00:00
|
|
|
|
|
|
|
unload:
|
2021-08-17 21:42:57 +00:00
|
|
|
sudo rmmod dragonprobe-hwmon
|
|
|
|
sudo rmmod spi-dragonprobe
|
|
|
|
sudo rmmod i2c-dragonprobe
|
|
|
|
sudo rmmod dragonprobe-char
|
|
|
|
sudo rmmod dragonprobe
|