[lkml]   [2003]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.5.x module make questions
On Tue, Jul 29, 2003 at 02:45:35PM -0600, wrote:
> Team,
> I have two questions regarding kbuild.
> 1, According to doc., makefile can do descending. Could make carry ascending?
Kbuild is not designed to support ascending, and I do not think it is
possible to tweak it to do so. If you manage to tweak kbuild to support it
do not complain if it breakes. This is not intended neither supported.

> 2, Does old style of makefile still work (it should according to the article of "Driver porting: compiling external module")?

What Corbet suggest in the referenced doc is to have the following:

here goes old style Makefile
here goes Kbuild makefile

And this is _only_ the topmost makefile. And the oldstyle part is only
to make it simple to do make -C kernelsrcdir SUBDIRS=$PWD modules
kbuild does not support old-style Makefiles, but fragments are supported.

May I request you to read Documentation/kbuild/makefiles.txt - this
is an up-to-date description of what kbuild supports, and what syntax to use.

The most complex examples of use in the kernel today is some of the
arch Makefiles. Maybe they can help you?

> export TOPDIR
> export CFLAGS
> all : ag.o
> ag.o: ../../../../t/s/ts.o ../../../f/c/fc.o ../../../f/i/fi.o s/sl.o
> ld -r -o ag.o ../../../../t/s/ts.o ../../../f/c/fc.o ../../../f/i/fi.o s/sl.o

This looks really ugly. I do not expect kbuild to even get close to help
you here. kbuild is designed around the idea that objects are built
directory-by-directory, and in the upper level directory the are linked.
What you have surely does not follow that principle.

> Any suggestion is welcomed. If the kbuild cannot do ascending, I have to change the source tree structure but that is the least I want to do.

This is my best suggestion. Follow the normal way of doing things in the
kernel make it easier/possible to use the infrastructure provided
by the kernel.

PS. Please also read the paper by Kai Germashewski from OLS -
see - it provide good background info on kbuild.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.107 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site