LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 10-28-2006, 03:18 PM   #1
smoothdogg00
Member
 
Registered: Feb 2006
Location: Maine
Distribution: Ubuntu
Posts: 44

Rep: Reputation: 15
Question Makefile problems/Simple kernel module


I am creating a simple hello/goodbye kernel module and I am having problems with the Makefile. The Makefile is as follows:
Code:
ifneq ($(KERNELRELEASE),)
obj-m	:= message.o

else
KDIR	:= /lib/modules/2.6.17-10-generic
PWD	:= $(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
The error I am getting is:
Code:
bill@bill-i9400:~/message$ make
make -C /lib/modules/2.6.17-10-generic SUBDIRS=/home/bill/message modules
make[1]: Entering directory `/lib/modules/2.6.17-10-generic'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/2.6.17-10-generic'
I read somewhere that it may have something to do with not having a Makefile in the "2.6.17-10-generic" directory, but I am totally lost. Can anyone offer me a solution?

Thanks.
 
Old 10-28-2006, 04:16 PM   #2
smoothdogg00
Member
 
Registered: Feb 2006
Location: Maine
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 15
Solved! The problem was, my directory should have been '/lib/modules/2.6.17-10-generic/build' as opposed to '/lib/modules/2.6.17-10-generic'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to edit makefile for kernel module? bhuvanmital Programming 5 02-02-2006 05:06 AM
need help in writing Makefile for module in 2.6 kernel videsh Programming 1 01-19-2006 07:35 AM
need help in writing Makefile for module in 2.6 kernel videsh Linux - Software 3 01-19-2006 07:30 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 03:35 PM
module makefile for c++ in kernel 2.6 yuhuahe Linux - Software 0 04-14-2004 06:03 PM


All times are GMT -5. The time now is 05:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration