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