diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..af2daf6 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +# Linux Makefile Location: +#LML="/usr/src/linux-headers-$(shell uname -r)/" +LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system + +obj-m += ina260.o + +all: ina260.c + make -C $(LML) M=$(PWD) modules + +run: ina260.c + -echo 0x40 > /sys/bus/i2c/devices/i2c-2/delete_device + -rmmod ina260 + make clean + make + insmod ina260.ko + echo ina260 0x40 > /sys/bus/i2c/devices/i2c-2/new_device + +read: read.c + gcc $^ -o read + +clean: + rm -f ina260*.o ina260.ko ina260.mod* Module.symvers modules.order .ina260* .Module* .modules* + +.PHONY: clean run |
