25 lines
426 B
Makefile
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
|
|
|