Skip to content

Instantly share code, notes, and snippets.

@anthonywong
Created January 6, 2017 10:46
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 anthonywong/954b1d1bf1223e8b0aac44ab4662a712 to your computer and use it in GitHub Desktop.
Save anthonywong/954b1d1bf1223e8b0aac44ab4662a712 to your computer and use it in GitHub Desktop.
Makefile for compiling a single kernel module
obj-m := oops.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
SYM=$(PWD)
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment