Makefile problem (Driver module programming:) )

Hi guys
I've written a simple Module (helloworld :D) but when I want to compile it I got the following error


make: Entering directory `/usr/src/linux-headers-2.6.38-8-generic'
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'.  Stop.
make: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic


Makefile :
obj-m := hello.o

The command for compiling :
make -C /lib/modules/$(uname -r)/build M=/ modules

also source code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <linux/module.h>
#include <linux/init.h>

static int __init my_init(void)
{
        printk(KERN_INFO "Hello : Module loaded at 0x%p\n",my_init);
        return 0;
}

static void __exit my_exit (void)
{
        printk(KERN_INFO "Bye\n");
}

module_init(my_init);
module_exit(my_exit);
MODULE_AUTHOR("AAA");
MODULE_LICENSE("GLP v2");
Topic archived. No new replies allowed.