From: arlie@worldash.org (Arlie Stephens)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Building multi-file modules
Date: Mon, 29 Apr 2013 13:18:38 -0700 [thread overview]
Message-ID: <20130429201837.GA14232@worldash.org> (raw)
Hi Folks,
I've got a module, call it foo, presently built from a single source
file, drivers/char/foo.c It's gotten enormous, so I want to split it.
Ideally I'd keep the original name for one of the source files. So
what I want is a module named foo, build from source files foo.c,
bar.c and baz.c
kbuild is being uncooperative.
The following works:
obj-$(CONFIG_FOO) += foo_renamed.o
foo_renamed-objs := foo.o bar.o baz.o
I'd just prefer not to rename either the module or the original source
file. Is this supposed to be possible, and if so, how?
I'm on RHEL 6.1, aka kernel 2.6.32, in case that matters. Also, in
case that matters, I'm building the module into the kerenl ("y" not
"m" in the config.)
----what I've tried----
The following gives me warnings from make:
obj-$(CONFIG_FOO) += foo.o
foo-objs := foo.o bar.o baz.o
The following never compiles foo.c:
obj-$(CONFIG_FOO) += foo.o
foo-objs := bar.o baz.o
Thanks for any insight,
--
Arlie
(Arlie Stephens arlie at worldash.org)
next reply other threads:[~2013-04-29 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 20:18 Arlie Stephens [this message]
2013-05-08 5:33 ` Building multi-file modules Yuva Raj
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=20130429201837.GA14232@worldash.org \
--to=arlie@worldash.org \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).