标签:
1 ifeq ($(KERNELRELEASE),)
2 CURRENT_PATH=$(shell pwd)
3 #KERNEL_DIR:=/lib/modules/$(shell uname -r)/build/
4 KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
5 default:
6 make -C $(KERNEL_DIR) M=$(CURRENT_PATH) modules
7 install:
8 insmod hello.ko
9 uninstall:
10 rmmod hello.ko
11 clean:
12 make -C $(KERNEL_DIR) M=$(CURRENT_PATH) clean
13 else
14 modules-objs:=hello.o
15 obj-m:=hello.o
16 endif
标签:
原文地址:http://www.cnblogs.com/oracleloyal/p/5356266.html