: Makefile.am vs. Kernel Modules

: Makefile.am vs. Kernel Modules

Post by eMail2M » Mon, 10 Mar 2003 02:30:01



Hi,

I have some written some linux drivers for some devices and would like to
automate the compilation process with GNU autoconf and automake. So far,
everything seems to be in the right place, except the composition of
Makefile.am. I need to find out how to taylor my Makefile.am so that it
will only compile (without linking stage) the source code into a linux
kernel module. For instance, here is an excerpt of one of my linux kernel
driver's Makefile.am:


        ypmodules_PROGRAMS      = yp.o
        ypmodules_SOURCES       = yp_init.c yp_usb.c yp_yy.c

        ypmodules_LDFLAGS       = -module -shared

The above Makefile.am is able to produce yp.o as well as yp binary file.
However, since I am only interested in the kernel module, yp.o, is there a
way to modify the above Makefile.am to just compile the "yp" source files
into a linux kernel module "yp.o" without linking stage to produce a yp
binary executable file? If so, how?

TIA.

 
 
 

: Makefile.am vs. Kernel Modules

Post by Roger Leig » Mon, 10 Mar 2003 05:14:42



> I have some written some linux drivers for some devices and would
> like to automate the compilation process with GNU autoconf and
> automake. So far, everything seems to be in the right place, except
> the composition of Makefile.am. I need to find out how to taylor my
> Makefile.am so that it will only compile (without linking stage) the
> source code into a linux kernel module.

I don't think this is possible, since automake expects an executable
as the final target, at least with the _PROGRAMS primary.  You need a
new primary, for object code only.

I would tend to think kernel developers wouldn't be too keen on
automake, but why not ask the automake developers if they would add
this feature, or file a feature request bug report?

--
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers

 
 
 

1. makefile.am rules

I'm trying to learn autoconf and automake, and I've come across a problem
that I can't seem to find the answer to.

In my source tree, I have a common directory with some C source files that
need to be compiled into .o files.  They are not used to build a program in
the common directory, nor are they used to build a library.  They are,
however going to be linked in with other executables later.

My problem is this:  how do I write a Makefile.am that merely compiles
these source files without attempting to link them to anything?

Thanks in advance,
David Bilbey

--
"I'm not sure I want to get the nickname `The Love Machine,' because how
does that affect my nickname now, which is `The Lawn-Cutting Machine'?"
--Jack Handey

2. wu-ftpd problem

3. What do I do with Makefile.am

4. obsd freezes at boot

5. Makefile.am

6. Please Help

7. Automake: Makefile.am for sub directories

8. java binary

9. aha1542, module vs kernel, kernel doesn't work, need kernel

10. Module Programming: module version vs. kernel version

11. Modules 1.3.57 makefile results in makefile error

12. Kernel drivers vs. Kernel modules?

13. drivers/net/Makefile fixes smc91c92 module linkage, kernel 2.4.20