You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
481 B
Makefile
24 lines
481 B
Makefile
1 month ago
|
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
|