1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| KERNAL_DIR ?= /lib/modules/$(shell uname -r)/build
| PWD :=$(shell pwd)
|
| obj-m += hello.o
| obj-m += chrdev1.o
| obj-m += chrdev2.o
| obj-m += chrdev3.o
| obj-m += chrdev4.o
|
| modules:
| $(MAKE) -C $(KERNAL_DIR) M=$(PWD) modules
| @make clear
|
| clear:
| @rm -f *.o *.cmd *.mod *.mod.c
| @rm -rf *~ core .depend .tmp_versions Module.symvers modules.order -f
| @rm -f .*.cmd .*.o.d
|
| clean:
| @rm -f *.ko
|
|