public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Christer Weinigel <wingel@acolyte.hack.org>
Cc: kaos@ocs.com.au, linux-kernel@vger.kernel.org
Subject: Re: SC1200 support?
Date: Thu, 21 Feb 2002 11:24:39 +0000	[thread overview]
Message-ID: <14409.1014290679@redhat.com> (raw)
In-Reply-To: <20020221105612.F12BEF5B@acolyte.hack.org>
In-Reply-To: <20020221105612.F12BEF5B@acolyte.hack.org>  <20020221000202.363E6F5B@acolyte.hack.org>


wingel@acolyte.hack.org said:
>  Is it still possible to build modules outside of the kernel tree?  I
> really like the MTD model of building some modules where the Makefile
> looks like this: 

> ifndef TOPDIR
> TOPDIR:=$(shell cd ../linux && pwd)
> endif

Er, that's not mine, is it?

My CVS tree has no hacks in the Makefiles, but has GNUmakefiles which look
something like the one below.

The hacking of TOPDIR is for compiling in old kernels without having 
compatibility hacks in the Makefile - in the GNUmakefile I set TOPDIR to a 
directory in which I have a hacked Rules.make which sets M_OBJS from obj-m, 
sets TOPDIR back to OLDTOPDIR and includes the proper $(TOPDIR)/Rules.make.

Making this work with kbuild-2.5 so that I can just check stuff out from my 
CVS tree and type 'make' as I do at the moment is something I haven't tried 
yet.

# $Id: GNUmakefile,v 1.10 2002/01/03 15:00:54 dwmw2 Exp $

LINUXDIR=/lib/modules/$(shell uname -r)/build

ifndef VERSION

# Someone just typed 'make'

modules:
	make -C $(LINUXDIR) SUBDIRS=`pwd` modules

dep:
	make -C $(LINUXDIR) SUBDIRS=`pwd` dep

clean:
	rm -f *.o */*.o

else



ifndef CONFIG_MTD

# We're being invoked outside a normal kernel build. Fake it

# We add to $CC rather than setting EXTRA_CFLAGS because the local 
# header files _must_ appear before the in-kernel ones. 
CC += -I$(shell pwd)/../../include

CONFIG_MTD := m
CONFIG_MTD_PARTITIONS := m
CONFIG_MTD_REDBOOT_PARTS := m
#CONFIG_MTD_BOOTLDR_PARTS := m
CONFIG_MTD_AFS_PARTS := m
CONFIG_MTD_CHAR := m
CONFIG_MTD_BLOCK := m
CONFIG_FTL := m
CONFIG_NFTL := m

CFLAGS_nftl.o := -DCONFIG_NFTL_RW

endif

# Normal case - build in-kernel

ifeq ($(VERSION),2)
 ifneq ($(PATCHLEVEL),4)
  ifneq ($(PATCHLEVEL),5)
   OLDTOPDIR := $(TOPDIR)
   TOPDIR := $(shell pwd)
  endif
 endif
endif

ifeq ($(VERSION),2)
 ifeq ($(PATCHLEVEL),0)
   obj-y += initcalls.o
  endif
endif

include Makefile

endif

--
dwmw2



      parent reply	other threads:[~2002-02-21 11:25 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-20 13:32 SC1200 support? Roy Sigurd Karlsbakk
2002-02-20 15:14 ` Alan Cox
2002-02-21  5:54   ` [DRIVER][RFC] SC1200 Watchdog driver Zwane Mwaikambo
2002-02-21  9:39     ` Jeff Garzik
2002-02-21  9:48       ` Zwane Mwaikambo
2002-02-21 10:15         ` Jeff Garzik
2002-02-21 10:10           ` Zwane Mwaikambo
2002-02-21 11:19           ` Christer Weinigel
2002-02-21 11:59             ` Christer Weinigel
2002-02-21 12:07               ` Zwane Mwaikambo
2002-02-21 13:37                 ` Alan Cox
2002-02-21 14:27                   ` Zwane Mwaikambo
2002-02-21 14:54                     ` Dave Jones
2002-02-21 15:16                     ` Alan Cox
2002-02-21 12:22               ` Jeff Garzik
2002-02-21 12:32                 ` Zwane Mwaikambo
2002-02-21 12:46                   ` Jeff Garzik
2002-02-21 12:57                 ` Christer Weinigel
2002-02-21 13:20                   ` Jeff Garzik
2002-02-22 19:57                     ` Christer Weinigel
     [not found]                       ` <20020222210107.A6828@fafner.intra.cogenit.fr>
2002-02-22 20:48                         ` Christer Weinigel
2002-02-22 22:56                           ` Joel Becker
2002-02-25 22:20                           ` Randy.Dunlap
2002-02-26  1:22                             ` Christer Weinigel
2002-02-26  1:37                               ` Christer Weinigel
2002-02-26  1:59                                 ` Jakob Østergaard
2002-02-26  2:42                                 ` Alan Cox
2002-02-21 15:53                   ` Joel Becker
2002-02-24 17:30         ` Roy Sigurd Karlsbakk
2002-02-25  8:22           ` Zwane Mwaikambo
2002-02-25 21:01             ` Roy Sigurd Karlsbakk
2002-02-21  0:02 ` SC1200 support? Christer Weinigel
2002-02-21  0:27   ` Keith Owens
2002-02-21  6:19   ` Zwane Mwaikambo
2002-02-21  6:35     ` nick
2002-02-21  6:31       ` Zwane Mwaikambo
2002-02-21 12:05     ` Christer Weinigel
2002-02-21 10:56   ` Christer Weinigel
2002-02-21 11:14     ` Keith Owens
2002-02-21 11:24   ` David Woodhouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14409.1014290679@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wingel@acolyte.hack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox