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.
42 lines
816 B
42 lines
816 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 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
|
|
|
|
install:
|
|
install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR)
|
|
/sbin/depmod -a ${KVER}
|
|
|
|
uninstall:
|
|
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
|
|
/sbin/depmod -a ${KVER}
|