tags:

views:

106

answers:

3
#kernel build system and can use its lanauge
ifneq($(KERNELRELEASE),)
 obj-m:=helloworld.o
else
 KDIR:= /lib/modules/2.6.33.3-85.fc13.i686/build
all:
 make -C $(KDIR) M=$(PWD) modules
clean:
 rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif

The error is:

makefile:2:* missing separator . stop

but for the ifneq($(KERNELRELEASE),), if I add a tab before, I get another error:

makefile:2: ***commands commence before first target. stop

A: 

Check before obj-m: and KDIR: etc. Are your tabs being inserted as spaces?

Duracell
yes. i am sure it is a tab not spaces.
Grey
A: 

You're missing the second part of your conditional ifneq($(KERNELRELEASE),) needs to have something after the comma, like "2.6.17" (for example).

George
i dont think that's the issue.. i copy that line from the book..
Grey
+2  A: 

There must be a space between ifneq and (.

The TAB prefix means that it is a shell command, so be sure that the shell commands (make and rm) begin with TAB, and all other lines such as ifneq do not begin with TAB.

mark4o