# ************** # * IMPORTANT: * # ************** # Replace 'chardev' on the obj-m line with the name of your module file. # # To compile your module, run # # make # # from the shell. # # If the module compiles successfully, it can be loaded via # # sudo /sbin/insmod chardev.ko # # It can be unloaded via # # sudo /sbin/rmmod chardev # # Use the following to check if the module is currently loaded # # /sbin/lsmod | grep chardev # # To clean everything up (not necessary), run # # make clean obj-m += chardev.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean rm -f *.symvers rm -f *.markers