diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c850aaa --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +KERNELDIR := /usr/src/linux-headers-6.1.21-v8+ +MODULE_NAME=ads1278 + +SRC := ads1278_core.c + +ifneq ($(KERNELRELEASE),) + $(MODULE_NAME)-objs = $(SRC:.c=.o) + obj-m := $(MODULE_NAME).o +else + PWD := $(shell pwd) + +default: +ifeq ($(strip $(KERNELDIR)),) + $(error "KERNELDIR is undefined!") +else + $(MAKE) -C $(KERNELDIR) scripts + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules +endif + +clean: + rm -rf *~ *.ko *.o *.mod.c modules.order Module.symvers .${MODULE_NAME}* .tmp_versions + +endif |