[HOWTO] set extra_cflags to indicate compilation against -mm kernels
From: Michael Krufky (mkrufky_at_m1k.net)
Date: 07/30/05
- Previous message: Dmitry Yusupov: "Re: [ANNOUNCE 0/7] Open-iSCSI/Linux-iSCSI-5 High-Performance Initiator"
- Next in thread: Sam Ravnborg: "Re: [HOWTO] set extra_cflags to indicate compilation against -mm kernels"
- Reply: Sam Ravnborg: "Re: [HOWTO] set extra_cflags to indicate compilation against -mm kernels"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Jul 2005 17:29:21 -0400 To: LKML <linux-kernel@vger.kernel.org>
With the addition of topdir-mm.patch into the -mm tree (since
2.6.13-rc3-mm2), it is now possible for Makefile to detect whether a cvs
subtree is being built against -mm or not... -mm kernels now have a .mm
file in the top level directory.
inside Makefile:
mm-kernel := $(TOPDIR)/.mm
ifneq ($(mm-kernel),)
MM_KERNEL_CFLAGS := -DMM_KERNEL=$(shell cat $(mm-kernel) 2> /dev/null)
ifneq ($(MM_KERNEL_CFLAGS),-DMM_KERNEL=)
EXTRA_CFLAGS += $(MM_KERNEL_CFLAGS)
endif
endif
inside C files:
#ifdef MM_KERNEL
/* code needed by -mm kernel only */
#else
/* original code for compilation against -linus */
#endif
This should probably be documented somewhere, but I don't know where it
goes.......
-- Michael Krufky - 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/
- Previous message: Dmitry Yusupov: "Re: [ANNOUNCE 0/7] Open-iSCSI/Linux-iSCSI-5 High-Performance Initiator"
- Next in thread: Sam Ravnborg: "Re: [HOWTO] set extra_cflags to indicate compilation against -mm kernels"
- Reply: Sam Ravnborg: "Re: [HOWTO] set extra_cflags to indicate compilation against -mm kernels"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]