一个通用的Makefile(2)(针对内核模块类-pro)
obj-m := kset_example.o KERNELBUILD := /lib/modules/$(shell uname -r)/build default: $(MAKE) -C $(KERNELBUILD) M=$(shell pwd) modules clean: -rm -rf *.o .*.cmd *.ko* *.mod.c .tmp_versions -rm -rf modules.order Module.symvers将kset_example.o更改为自己的模块名字。