Linux驱动最简单的Makefile

2014-11-24 07:51:29 · 作者: · 浏览: 2

ifneq ($(KERNELRELEASE),)
obj-m := hello.o
else
KERNELDIR = /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif


注意每一行前没有空格 是tab