Hi I am trying to write a 'Hello World' kernel module.
I wrote the following C code:
Module514.c
#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/init.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("BMC")
MODULE_DESCRIPTION(" My module]")
static int __init module514(void){
printk(KERN_INFO"Hello World");
return 0;
}
static void __exit module514_cleanup(void){
printk(KERN_INFO"unloaded")
}
module_init(module514);
module_exit(module514_cleanup);
Then created the following Makefile
obj-m += Module514.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
But when I give make I get the following message.
make: Nothing to be done for `all'.
What am I doing wrong.