On Mon, 3 Mar 2003, David Dawes wrote:

> On Mon, Mar 03, 2003 at 03:53:32PM +0000, David Woodhouse wrote:
> >On Fri, 2003-02-28 at 17:31, David Dawes wrote:
> >> Makefile.kernel was supposed to the a Makefile suitable for dropping
> >> into the kernel source tree's drivers/char/drm directory.  It's never
> >> used directly from the XFree86 source tree, and that's probably why it
> >> is out of date.  I don't know if there's any point keeping it around or
> >> not.
> >
> >Note that Makefile.kernel could (and probably _should_) be used even
> >when building as part of the XFree86 tree. The recommended way of
> >building Linux kernel modules which are shipped outside the kernel tree
> >is by running:
> >     make -C $LINUX_SRC_DIR SUBDIRS=`pwd` modules
> >
> >That's just about the only way to get the CFLAGS and other stuff correct
> >for all versions of the kernel and all architectures.
> 
> Is it safe these days to unconditionally use /lib/modules/`uname -r`/build
> for $LINUX_SRC_DIR?

I think we should at least remove /usr/include/linux as a fallback path
for finding the kernel headers (TREE in Makefile.linux), and replace it
with a message about setting up the build symlink in /lib/modules (which
is done by 'make modules install' on any halfway-recent 2.4.x kernel,
afaik) or using 'make TREE=/path/to/kernel-src-tree/include.' I've seen a
few messages from users on the dri lists where the build tried to use the
glibc kernel headers and fails.  Symlinking /usr/include/linux to the
source tree is now considered a no-no.
 
> Will a single Makefile.kernel work for all versions of the kernel,
> and handle various incompatibilities that arise from time to time
> that the current Makefile.linux is forced to work around?
> 
> If so, then that's definitely the way to go.  I'd love to see
> something cleaner than what we currently have (the Makefile for
> the FreeBSD drm modules is very clean).
> 
> David

Personally, I like using Makefile.linux.  I've never had any problems with 
it, and it's easier to build the kernel modules from my XFree86/DRI build 
tree than copying files to the kernel source tree.

-- 
Leif Delgass 
http://www.retinalburn.net

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to