Re: Why does this break under SMP?

Gerd Knorr (kraxel@goldbach.isdn.cs.tu-berlin.de)
Wed, 10 Sep 1997 09:05:40 +0200


>That's part of it. Another part is that flags like this *NEED* to
>make it into a header file (similar to module version numbers), so
>that users don't have to specify a gazillion flags when compiling an
>out-of-kernel-tree module. The current situation is really
>unacceptable. -DMODVERSIONS is another such item; basically anything
>that ends up getting specified with -D...

I've solved that puzzle with some Makefile magic which uses the
_kernel_ Makefiles for compiling out-of-kernel-tree modules.

Gerd

####################################################################
KERNEL_LOCATION=/usr/src/linux

M_OBJS = ch.o
EXTRA_CFLAGS = -I$(KERNEL_LOCATION)/drivers/scsi

here:
DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR modules)

include $(KERNEL_LOCATION)/Rules.make