diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef45bab --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.cmd +*.symvers +*.ko +*.mod +*.mod.c +*.o +*.gz +*.order +*.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec50ec9 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +ifneq ($(KERNELRELEASE),) +# kbuild part of makefile +obj-m := adxl345.o + +else +# normal makefile +KDIR ?= /lib/modules/`uname -r`/build + +default: + $(MAKE) -C $(KDIR) M=$$PWD +endif