All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: sjhill@cotw.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Building multipart modules with subdirectories...
Date: Sat, 04 Aug 2001 20:30:37 +1000	[thread overview]
Message-ID: <32336.996921037@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Fri, 03 Aug 2001 13:40:14 EST." <3B6AF00E.C66F69DE@cotw.com>

On Fri, 03 Aug 2001 13:40:14 -0500, 
"Steven J. Hill" <sjhill@cotw.com> wrote:
>I have driver that is rather complex and in order to maintain it, the
>module is broke up into 17 different subdirectories. I am maintaining it
>and I am trying to integrate it into the kernel build system.

I had the same problem with XFS.  Code split over multiple directories,
code in the sub directories had to be compiled for modules but not be
installed as a module, instead the sub directory objects are linked
into the parent directory then the whole is installed as one module.
Is that your problem?

In the parent Makefile

--------

O_TARGET := foo.o
obj-m := $(O_TARGET)
foo_subdirs := sub directory list
subdir-$(CONFIG_FOO_DRV) += $(foo_subdirs)
obj-y += $(foreach dir,$(foo_subdirs),$(dir)/$(dir).o)
....
include $(TOPDIR)/Rules.make

# This is really nasty, but Rules.make was never designed for multi directory
# modules and it can race on parallel build.  Keith Owens.
foo.o: $(patsubst %,_modsubdir_%,$(subdir-m))

--------

In each sub directory

--------

O_TARGET := $(notdir $(CURDIR)).o
ifneq ($(MAKECMDGOALS),modules_install)
  obj-m := $(O_TARGET)
endif
obj-y += list of sub directory objects

--------

This is so much easier in kbuild 2.5 :).


      reply	other threads:[~2001-08-04 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-02 13:03 [PATCH] more SAK stuff Andries.Brouwer
2001-08-03 18:40 ` Building multipart modules with subdirectories Steven J. Hill
2001-08-04 10:30   ` Keith Owens [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=32336.996921037@ocs3.ocs-net \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sjhill@cotw.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.