Jump to content

Kernel module Makefile [solved]


Recommended Posts

I have written a char device driver and with the makefile;

 

ifneq ($(KERNELRELEASE),)

obj-m := lunix2k5.o

else

KERNELDIR ?=/lib/modules/$(shell uname -r)/build

PWD := $(shell pwd)

default:

$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

endif

 

I could see it working in both Suse 9.2 and FC3.

 

 

However when I use make in Mandrake 10.1 I get the following;

 

make -C /lib/modules/2.6.8.1-10mdk M=/home/pani/lunix modules

make[1]: Entering directory `/lib/modules/2.6.8.1-10mdk'

make[1]: *** No rule to make target `modules'. Stop.

make[1]: Leaving directory `/lib/modules/2.6.8.1-10mdk'

make: *** [default] Error 2

 

What should I change?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...