Hi everybody,<div>I currently started learning how to write Linux drivers.I am following Linux Device Drivers Third Edition.</div><div>I have everything set right but the makefile provided seem not to work.I am familiar with makefiles but the kernel build system confuses me</div>
<div>Here is the makefile:</div><div><br></div><div># If KERNELRELEASE is defined, we've been invoked from the</div><div># kernel build system and can use its language.</div><div>ifneq ($(KERNELRELEASE),)</div><div>obj-m := hello.o</div>
<div># Otherwise we were called directly from the command</div><div># line; invoke the kernel build system.</div><div>else</div><div>KERNELDIR ?= /lib/modules/$(shell uname -r)/build</div><div>PWD := $(shell pwd)</div><div>
default:</div><div>$(MAKE) -C $(KERNELDIR) M=$(PWD) modules</div><div>endif</div><div>It give the following output when I run make :</div><div><br></div><div>make: Nothing to be done for `default'.</div><div><br></div>