keymash/Makefile
2023-08-10 03:19:29 +02:00

29 lines
496 B
Makefile

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