Russell Kliese <[EMAIL PROTECTED]> writes: > If my makefile contains roughly the following: > > lib_LIBRARIES = libfoo.a > libfoo_a_SOURCES = foo1/exception.cpp foo2/exception.cpp > > I end up with the following error: > > Makefile.am: object `exception.$(OBJEXT)' created by > `foo2/exception.cpp' and `foo1/exception.cpp'
I think that you want to put "subdir-objects" in your AUTOMAKE_OPTIONS. From the Automake manual: `subdir-objects' If this option is specified, then objects are placed into the subdirectory of the build directory corresponding to the subdirectory of the source file. For instance, if the source file is `subdir/file.cxx', then the output file would be `subdir/file.o'. In order to use this option with C sources, you should add `AM_PROG_CC_C_O' to `configure.ac'. -- Ben Pfaff [EMAIL PROTECTED] http://benpfaff.org