[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trying to find a good solution to filename clash
From: |
Ben Pfaff |
Subject: |
Re: trying to find a good solution to filename clash |
Date: |
Fri, 16 Feb 2007 14:22:11 -0800 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Russell Kliese <address@hidden> 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
address@hidden
http://benpfaff.org