From: Bob McElrath <mcelrath@draal.physics.wisc.edu>
To: linux-kernel@vger.kernel.org
Cc: Tuukka Toivonen <tuukkat@ees2.oulu.fi>
Subject: Module includes
Date: Wed, 28 Aug 2002 11:17:44 -0500 [thread overview]
Message-ID: <20020828161744.GI735@draal.physics.wisc.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
What is the accepted way to deal with Makefiles when building a module
that lives outside the kernel tree? (I'm playing with kernel 2.4)
I thought that the answer was to:
include /usr/src/linux/arch/$(ARCH)/Makefile
include /usr/src/linux/Rules.make
in your makefile. However, the arch/i386/Makefile (and a few others)
define some targets which wreak havoc with another project's Makefile
(in particular, the 'install' target).
It is absolutely necessary to include the arch/$(ARCH)/Makefile in order
to get the proper CFLAGS needed to build a kernel module, in an
arch-independent manner. (for instance, alpha needs -ffixed-8 or gcc
will build a bad module, and other archs need similar things)
The ALSA project has a long block of configure magic which basically
duplicates the CFLAGS in arch/$(ARCH)/Makefile without including them,
but this is hardly desirable.
Looking through make.info I do not see a way to override all targets in
an included Makefile.
Cheers,
-- Bob (please CC me as I'm not on this list)
Bob McElrath (rsmcelrath@students.wisc.edu)
Univ. of Wisconsin at Madison, Department of Physics
"No nation could preserve its freedom in the midst of continual warfare."
--James Madison, April 20, 1795
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
reply other threads:[~2002-08-28 16:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020828161744.GI735@draal.physics.wisc.edu \
--to=mcelrath@draal.physics.wisc.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=tuukkat@ees2.oulu.fi \
/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
all inboxes | Powered by JetHome®