2022-01-19 17:02:52 +01:00
|
|
|
KERNELRELEASE ?= $(shell uname -r)
|
2022-01-19 02:32:13 +01:00
|
|
|
|
|
|
|
DEBUG ?= n
|
|
|
|
ifeq ($(DEBUG),y)
|
|
|
|
EXTRA_CFLAGS += -Og -g -DDEBUG
|
|
|
|
else
|
|
|
|
EXTRA_CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
|
|
|
|
EXTRA_CFLAGS += -I$(PWD)/include
|
|
|
|
|
|
|
|
obj-m += keymash.o
|
|
|
|
|
|
|
|
keymash-sources = src/keymash.c
|
|
|
|
|
|
|
|
keymash-objs = $(keymash-sources:.c=.o)
|
|
|
|
|
|
|
|
keymash.ko:
|
2022-01-19 17:02:52 +01:00
|
|
|
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" modules
|
2022-01-19 02:32:13 +01:00
|
|
|
|
|
|
|
clean:
|
2022-01-19 17:02:52 +01:00
|
|
|
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" clean
|
2022-01-19 02:32:13 +01:00
|
|
|
|
|
|
|
all: keymash.ko
|
|
|
|
|