Re: Small problem, Can anybody help me?

From: David Woodhouse
Date: Thu May 06 2004 - 12:29:30 EST


On Thu, 2004-05-06 at 16:28 +0200, Erik Mouw wrote:
> The way to compile a module on linux 2.4 is:
>
> gcc -O2 -Wall -I/path/to/kernel/include/directory -D__KERNEL__ -DMODULE -c hello.c

That doesn't always work. It gets the CFLAGS wrong. You should always
use
make -C $KERNELDIR SUBDIRS=`pwd` modules


--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/