Skip to content

Instantly share code, notes, and snippets.

@creamidea
Created April 14, 2013 08:20
Show Gist options
  • Save creamidea/5381898 to your computer and use it in GitHub Desktop.
Save creamidea/5381898 to your computer and use it in GitHub Desktop.
The Linux Kernel Module Programming Hello world的makefile文件。不过稍微改一下可以编译其他到c Reference: http://www.tldp.org/LDP/lkmpg/2.6/html/index.html
obj-m:=hello.o
KERVER=$(shell uname -r)
KERDIR=/usr/src/linux-headers-$(KERVER)
CURDIR=$(shell pwd)
all:
make -C $(KERDIR) M=$(CURDIR) modules
clean:
make -C $(KERDIR) M=$(CURDIR) clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment