You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
491 B

# Comment/uncomment the following line to disable/enable debugging
ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m := battery_drv.o
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all: modules
modules: battery_drv.c
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install: modules
$(MAKE) -C $(KERNELDIR) M=$(PWD) install
tty-battery : tty-battery.c
$(CC) -Wall $^ -o $@ -D_GNU_SOURCE
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
endif