Hello,

I'm trying to use automake 1.4a in a project where we build some Linux
kernel modules. These modules are partially linked objects, i.e. .c is
compiled to .o and these objects are linked using ld -r to produce the
kernel module.

However I can't seem to make it work. There seems to be no explicit
support for this in automake; I don't want a .la or .a library.

My attempt (included below) gives me trouble with dependencies, e.g.

make[2]: *** No rule to make target `audioInt.o', needed by `audio.o'.  Stop.

My Makefile.am:

kernelmoddir=$(prefix)/kernel
kernelmod_DATA=audio.o
INCLUDES=-I$(top_srcdir)/include
CFLAGS=-D_LOOSE_KERNEL_NAMES -DMODULE -D__KERNEL__ -DLINUX
SOURCES=audioInt.c audioMain.c audioOps.c audioInt.h
OBJECTS=audioInt.o audioMain.o audioOps.o
audio.o: $(OBJECTS)
        ld -r -o audio.o $(OBJECTS)

Any advice is appreciated.

/Pontus


-- 
Pontus Lidman               Email: [EMAIL PROTECTED]
Nokia Home Communications   Phone: +46 (0)13  4611201
Diskettgatan 11             Fax:   +46 (0)13  4611001
583 35 Link�ping, Sweden    

Reply via email to