[Linux][Driver]How to create simple Makefile


Assign kernel path to KDIR (its a just variable )              For general OS ( fedora)- KDIR = /lib/modules/$(shell uname -r)/build For cross compilation – KDIR = /home/username/linux-2.6.21/ Add object name (it should be the  filename.o ) to obj-m eg: if filename is hello.c , then obj-m += hello.o next stepContinue reading “[Linux][Driver]How to create simple Makefile”