LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-07-2007, 11:35 PM   #1
payretep
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
Question regarding 2.6 kernel module makefiles


Hi all, I understand that for kernel 2.6 driver modules, the makefile is in the below format:

obj-m += hello.o

hello-objs:= hello1.o hello2.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


This is a very simple makefile for 2 files kernel 2.6 modules existing in a single directory. So what if there is more files involved in different directories? Is there any way that I can make different object files inside different directories but generated the objects into one consolidated directory (eg ../obj/)?

Thanks!
 
Old 10-09-2007, 12:04 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
See here and here.
 
  


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
kernel module question for kernel build davimint Slackware 2 09-22-2006 08:03 PM
Kernel Module Loading question. rconan Debian 1 04-28-2006 02:16 PM
Question about makefiles evolutionspeak Linux - Newbie 2 11-18-2005 01:08 AM
kernel 2.6 module programming question??? new5244 Programming 3 01-31-2004 03:43 PM
Question about Makefiles xailer Linux - Newbie 5 11-24-2003 11:43 AM


All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration