I am new to Ubuntu and I am trying to compile a small program. I have a Makefile and raw1394.c file in a folder raw1394.
when I run a make command it should produce raw1394.ko file but I am getting nothing in when I run make command.
I also tried to compile raw1394.c file with gcc but it is giving me following error.
raw1394.c:1:26: fatal error: linux/module.h: No such file or directory
compilation terminated
could you please guide me how can I solve this problem.
here is my Makefie
obj-m += raw1394.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
and here is my raw1394.c file
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "Loaded dummy raw1394 module\n");
return 0;
}