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
Title: Compile external module with seperate source and object directories