Re: New version of ClownToolKit

From: Jan Engelhardt
Date: Thu Aug 17 2006 - 03:46:56 EST

>> > LIBDIR=/lib/modules/`uname -r`
>> > make -C $LIBDIR/source O=$LIBDIR/build SUBDIRS=`pwd` modules
>> >
>> > For a normal kernel installation this will do the right thing.
>> > source points to the kernel source and build point to the output
>> > directory (they are often equal but not always).
>> Please don't tell module authors to unconditionally use `uname -r`.
>> I frequently build kernels for differentd hosts, and if I don't, I'll
>> certainly compile the needed modules before installing the kernel.
>> Therefore /lib/modules/`uname -r` is most certainly the completely
>> wrong place to look for the kernel source.
>/lib/modules/`uname -r` is the general solution that works for most
>people and should be at least default. It is certainly better than
>But yes they better make it override able.

In some outoftree modules of mine, the Makefile reads like this

MODULES_DIR := /lib/modules/$(shell uname -r)

all: modules
make -C "${KOBJ_DIR}" M="$$PWD";

and one can easily override it by calling `make MODULES_DIR=/foo/bar`
(instead of just `make`).

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