Hi!
In my Makefile.am I have e.g. the following lines
COMMON_SOURCES = src/lib/common.C
foo_SOURCES = ${COMMON_SOURCES} src/foo/main.C
bar_SOURCES = ${COMMON_SOURCES} src/bar/main.C
So I have a name clash for main.o, which makes automake unhappy.
The only resolution I found was to prefix the bar object files
using the following trick
bar_CXXFLAGS = $(AM_CXXFLAGS)
the problem with this approach is that now common.C
will get built twice (which is not what I want here).
I could for sure put common.C into a shared lib and link to that one,
but I dislike that solution for several other reasons.
I would prefer to have the possibility to tell
automake to put foo_OBJECTS into a separate directory,
perhaps like this:
foo_OBJDIR = foo_obj
Is this feature already available?
Markus