NUmber 1 : The error is in your makefile.
FOR obj-m += hello-1.c READ obj-m += hello-1.o
Number 2: Even if it is .o mentioned be sure that u have not prepared the makefile by copy pasting from some example . type it yourself with special care after line
all:
<tab>START WRITING HERE... mind it is not space. but the monent you press enter after "all:" you come on a new line. press a tab there and then write the execution line
<tab> make -C .............. modules
clean:
<tab> make -C ........ clean
Your error will surely get resolved... if there is no other error prob is with making of Makefile.
regards
Makefile
----------
[CODE][root@localhost 02-HelloWorld]# cat Makefile
obj-m += hello-1.c
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
------
Code:
[root@localhost 02-HelloWorld]# make
make -C /lib/modules/2.6.23.12-52.fc7/build M=/home/mukul/Desktop/lkmpg-examples/02-HelloWorld modules
make[1]: Entering directory `/usr/src/kernels/2.6.23.12-52.fc7-i686'
scripts/Makefile.build:223: target `/home/mukul/Desktop/lkmpg-examples/02-HelloWorld/hello-1.c' doesn't match the target pattern
Building modules, stage 2.
MODPOST 0 modules
make[1]: Leaving directory `/usr/src/kernels/2.6.23.12-52.fc7-i686'
[root@localhost 02-HelloWorld]#
[/QUOTE]