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.

49 lines
934 B

# Comment/uncomment the following line to disable/enable debugging
# DEBUG = y
MODULE_NAME = hid-acer-one
KVER = $(shell uname -r)
MODDESTDIR = /lib/modules/$(KVER)/kernel/drivers/hid/
# Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DSHORT_DEBUG # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif
ccflags-y += $(DEBFLAGS)
ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m := hid-acer-one.o
else
KERNELDIR ?= /lib/modules/$(KVER)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend
install:
install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
/sbin/depmod -a ${KVER}
uninstall:
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
/sbin/depmod -a ${KVER}
ifeq (.depend,$(wildcard .depend))
include .depend
endif