My feeling is that for most people using RedHat or ony prepackaged
system, the current kernel sources would reside in /usr/src/linux,
those who don't put the kernel there are probably knowledgeable enough
to modify the Makefile or configure script themselves. Or we could
invent some kind of standard and say that the environment variable
KERNEL_SOURCES=/usr/src/linux-mymachine-2.2.13
tells the build script where the kernel is located and that
INSTALL_PATH=/tmp/mymachine-root
tells the where tho place the modules and any config files.
Personally, what I would like to see is that "make config" in
/usr/src/linux creates a config.mk and config.out file such as the one
the pcmcia-cs package creates (but with more things such as CFLAGS
added). So that a Makefile for a stand-alone module would just look
something like this:
include /usr/src/linux/config.mk
all: foomodule.o moremodules.o
moremodules.o: bar.o xyzzy.o
$(LD) -r -o moremodules.o bar.o xyzzy.o
BTW, has anybody looked at the linux-mtd package found at
http://www.linux-mtd.infradead.org/
I think that is a rathar beautiful solution, and it works today. What
that does is to have a top level Makefile which does the following:
make -C /usr/src/linux SUBDIRS=$(shell pwd)/kernel modules
and then the kernel directory has a normal Linux kernel Makefile:
EXTRA_CFLAGS= -I$(shell pwd)/../include
O_OBJS += doc1000.o
include $(TOPDIR)/Rules.make
/Christer
-- Christer Weinigel Cendio Systems AB Email: wingel@cendio.se Teknikringen 8 Phone: +46-13-21 46 00 583 30 Linköping Fax: +46-13-21 47 00 Sweden [please note that Signum Support has changed its name to Cendio Systems]- 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/