Skip to content

Instantly share code, notes, and snippets.

@qianguozheng
Created October 22, 2014 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qianguozheng/aeb8f28e50c583f883b9 to your computer and use it in GitHub Desktop.
Save qianguozheng/aeb8f28e50c583f883b9 to your computer and use it in GitHub Desktop.
Linux Kernel Module Makefile
MODULE_NAME := test-mem
obj-m := $(MODULE_NAME).o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)
all:
$(MAKE) -C $(KERNELDIR) M=$(PWD)
clean:
rm -fr *.symvers *.order *.ko *.cmd *.o $(MODULE_NAME).mod.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment