Re: [HOWTO] set extra_cflags to indicate compilation against -mm kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 30, 2005 at 05:29:21PM -0400, Michael Krufky wrote:
> 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

Hi Michael.
The content of the .mm file seems to be insignificant - '1'. The important
issue is that the file is present.
Also please do not use $(TOPDIR) - it is deprecated.

The following is enough:
EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL)

If the file exist in the root of the kernel src tree MM_KERNEL will be
added to EXTRA_CFLAGS.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux