Re: no version magic, tainting kernel.

From: Gerd Knorr (kraxel@bytesex.org)
Date: Mon Jan 27 2003 - 14:54:41 EST


Jerry Cooperstein <coop@axian.com> writes:

> is fine, but you have to have a Makefile in the current directory,
> and that Makefile needs a somewhat different form for 2.4 and
> 2.5 kernels.

It is no problem to use the same Makefile for both 2.4.x and 2.5.x,
and even let the Makefile do the RightThing[tm] in case the user just
types 'make'. My Makefiles for kernel stuff look like this (stripped
down a bit):

==============================[ cut here ]==============================

ifneq ($(KERNELRELEASE),)
# call from kernel build system

obj-m := btaudio.o

-include $(TOPDIR)/Rules.make

else

KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

endif

==============================[ cut here ]==============================

If you need different stuff for 2.4.x and 2.5.x you can handle it
using ifeq ($(VERSION).$(PATCHLEVEL),2.4)

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



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:17 EST