mirror of
https://github.com/Fred78290/nct6687d
synced 2024-12-27 09:58:42 +01:00
19 lines
513 B
Makefile
19 lines
513 B
Makefile
obj-m += nct6687.o
|
|
|
|
curpwd := $(shell pwd)
|
|
kver := $(shell uname -r)
|
|
|
|
build:
|
|
rm -rf ${curpwd}/${kver}
|
|
mkdir -p ${curpwd}/${kver}
|
|
cp ${curpwd}/Makefile ${curpwd}/nct6687.c ${curpwd}/${kver}
|
|
cd ${curpwd}/${kver}
|
|
make -C /lib/modules/${kver}/build M=${curpwd}/${kver} modules
|
|
|
|
install: build
|
|
sudo cp ${curpwd}/${kver}/nct6687.ko /lib/modules/${kver}/kernel/drivers/hwmon/
|
|
sudo depmod
|
|
sudo modprobe nct6687
|
|
|
|
clean:
|
|
[ -d "${curpwd}/${kver}" ] && make -C /lib/modules/${kver}/build M=${curpwd}/${kver} clean
|