Quote:
Originally Posted by GrapefruiTgirl
please post the exact Make command you used (or more precisely, post us the Makefile). Looks like the syntax is wrong.
|
ok i m sending u the exact things:
i have made directory in home folder.then write a program in hello-1.c file as
/*
* hello-1.c - The simplest kernel module.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
then i have made a make file:
obj-m += hello-1.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
then i provide command:make
output is:
make -c /lib/modules/2.6.23.1.42-fc8/build M=/home/kapilaryan/Hello modules
make[1]:entry directory '/home/kapilaryan/Hello'
make[1]:***No rule to make target '-C'.stop.
make[1]:Leaving directory '/home/kapilaryan/Hello'
make:*** [all] Error2
please give me appropriate solution to resolve this problem.