DragonProbe/host/modules/Makefile

27 lines
651 B
Makefile
Raw Permalink Normal View History

2021-07-11 23:43:35 +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:
$(RM) -v *.o *.ko *.mod *.mod.c Module.symvers modules.order .*.cmd .*.d
2021-07-11 23:43:35 +00:00
load:
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:
sudo rmmod dragonprobe-hwmon
sudo rmmod spi-dragonprobe
sudo rmmod i2c-dragonprobe
sudo rmmod dragonprobe-char
sudo rmmod dragonprobe