lkml.org 
[lkml]   [2002]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectModule includes
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.024 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site