Skip to content

Instantly share code, notes, and snippets.

@growlnx
Created October 9, 2019 01:35
Show Gist options
  • Save growlnx/70f865c6d1a0ec61b01780522f09741f to your computer and use it in GitHub Desktop.
Save growlnx/70f865c6d1a0ec61b01780522f09741f to your computer and use it in GitHub Desktop.
Makefile to compile a kernel module
obj-m += module.o
KBUILD=/lib/modules/$(shell uname -r)/build/
default:
$(MAKE) -C $(KBUILD) M=$(PWD) modules
clean:
$(MAKE) -C $(KBUILD) M=$(PWD) clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment