Re: toplevel Makefile bug and simple fix

Miquel van Smoorenburg (miquels@cistron.nl)
8 Nov 1999 14:36:56 +0100


In article <cistron.E11koC4-0003Hj-00@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> people), but the decision has been made.
>>
>> Note, though, that it is **very** important that /usr/include/linux and
>> /usr/include/asm correspond to the default kernel that you are booting.
>
>Ted, you are assuming people will build stuff on the machine they are
>running from. Its certainly a convenient assumption for the majority
>of uses but a lot of big have all their kernel building/images in one
>place not around machines.
>
>I'm not convinced /usr/include/linux is sufficient. Perhaps we need
>a more explicit naming ?

Put a Makefile fragment with all the options used to build the
kernel (including CPU type, optimization, -g flag on/off etc) in
<kernelsource>/include/linux/buildoptions.mak

Then start all standalone module Makefiles with:

====================================

# Point this to the include files of the kernel you wish to build for.
KINCLUDE = /usr/src/linux-2.5.10ac20/include

include $(KINCLUDE)/linux/buildoptions.mak
CFLAGS := -I$(KINCLUDE) $(CFLAGS)

====================================

Document this in Documentation/standalone-modules.txt

That should fix it once and for all.

Peter Anvin said he once had such a buildsystem up and running, he
sent the patch to Linus but Linus rejected it. Perhaps it is time
to try again.

Mike.

-- 
First things first, but not necessarily in that order.

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