LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 03-08-2007, 12:11 AM   #1
rajesh_b
Member
 
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Rep: Reputation: 15
Question Building a single .ko file from multiple source files


Hi all,
I am writing a kernel level module. And my module source files are in two different directories. But i want to generate a single .ko file from these source files. I have a make file which will generate a single .ko file from multiple source files provided all the source files are in a single directory. But i dont how to change this to generate a single .ko file if source files are in two directories.
Ex:
Dir1 is having file1.c,file2.c files
Dir2 is having file3.c file.
And Dir2 is inside the Dir1.
I want to compile all these files in to a single .ko file. Can any body know how to do this ? Thanks in advacne.


Rajesh
 
Old 04-01-2007, 10:34 AM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I don't know at all for sure, but do the two files reference each other/work together?
Could you not merge them into one source-code, thus becoming one file, and then compile it?

--Just guessing.
 
Old 04-01-2007, 01:51 PM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,776

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Just use relative paths in the Makefile to include the object files.
 
  


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
Delete a single E-mail / multiple mbox files mgichoga Debian 0 02-18-2007 09:42 PM
Adding Multiple Files In A Single Gz File onacorpuscle Linux - Newbie 3 08-31-2006 04:18 AM
How To Merge multiple files into a single PDF ? kkempter Linux - Software 1 10-28-2005 02:02 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 10:31 AM
How do I decompress and desarchive multiple .tar.gz files to a single directory? Baldorg Linux - Software 7 11-27-2003 01:42 PM


All times are GMT -5. The time now is 08:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration