objfile= test.okofile = test.ko obj-m := $(objfile) KERNELDIR := /lib/modules/$(shell uname -r)/build default: make -C $(KERNELDIR) M=$(shell pwd) modules install: insmod $(kofile) uninstall: rmmod $(kofile) clean: make -C $(KERNELDIR) M=$(shell pwd) clean 使用的时候把objfile和kofile修改一下即可. |
歡迎光臨 比思論壇 (http://108.170.10.236/) | Powered by Discuz! X2.5 |