keymash/Makefile
fef cb152fdada
add DKMS support
tbh i have no idea what i'm doing lmao
2022-01-19 17:02:52 +01:00

25 lines
426 B
Makefile

KERNELRELEASE ?= $(shell uname -r)
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:
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" modules
clean:
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" clean
all: keymash.ko