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