(sorry about the double mail... tab selects send in hotmail, grr!!!)
I've read a lot of the posts about compiling multiple packages together that exist in different subdir's, but I can't seem to find the fix to my problem...
I'm playing around w/ a LKM. I can get all the files to compile, but it won't link. It's putting the .o's in src, and then looking for them in their respective dir_*.
Here is what my src_dir/Makefile.am looks like:
srcdir = @srcdir@
CFLAGS = ...
INCLUDES = -I../include -I$(srcdir)/dir_a -I$(srcdir)/dir_b
noinst_PROGRAMS = foo.o
foo_o_LINK = ld -r -o foo.o
foo_o_SOURCES = \
../include/src_file_a.h
$(srcdir)/dir_a/src_file_a.c
../include/src_file_b.h
$(srcdir)/dir_b/src_file_b.c
Here is an example of my directory structure:
configure
install-sh
configure.in (last line is AC_OUTPUT(Makefile src/Makefile)
Makefile.am (only has SUBDIRS=src)
NEWS
.
.
src_dir:
--->Makefile.am
--->dir_a:
---> --->src_file_a.c
--->dir_b:
---> --->src_file_b.c
include:
src_file_a.h
src_file_b.h
Each of the src_file_*.c does not contain an init_module or a main, so I can't have a Makefile.am in each directory, correct? I need to keep the current directory structure...
Thanks!
Dave