Re: [kbuild-devel] Compile external module with seperate source and object directories

2005-01-13 Thread Sam Ravnborg
On Wed, Jan 12, 2005 at 10:39:56PM -, Ross C Mcilroy wrote:
 
 The dependancies between these files and the created object files were 
 handled using the
 VPATH variable in the previous makefile, however this doesn't seem to work 
 with the
 2.6 kernel (I assume because VPATH is already defined in the root kernel 
 makefile).
 The linux kernel module make therefore doesn't find the required source files.
 Is this possible with the new external module build process?

kbuild does not support storing output files in a separate directory for
external modules so the answer is no.

The request has been few - and the solution has not been obvoius. So
there is niether plan to add this to kbuild. But if someone can come
with a nice minimal patch it will be considered.

Sam


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] Compile external module with seperate source and object directories

2005-01-12 Thread Ross C Mcilroy
Title: Compile external module with seperate source and object directories







Hi

I am working on porting an external kernel module to the 2.6 kernel. As such the modules makefile has to be changed to the new format for compiling external modules, however I am having trouble with this.

The problem is that the project I'm working on has both a user-mode version and a linux module version. It has a number of common files, which use pre-processor commands to differentiate between the versions. The object files of these common files are compiled to a different directory from their source, so that both versions can be compiled at once. For example, if there is lib/packet.c, it will be compiled as userlevel/packet.o by the makefile in the userlevel directory, and linuxkernel/packet.o by the linuxkernel makefile. No .o files are compiled in the lib directory.

The dependancies between these files and the created object files were handled using the VPATH variable in the previous makefile, however this doesn't seem to work with the 2.6 kernel (I assume because VPATH is already defined in the root kernel makefile). The linux kernel module make therefore doesn't find the required source files. Is this possible with the new external module build process?

I would be grateful for any help.

Thanks

Ross