[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

some object files in a separate directory?

From: Markus Werle
Subject: some object files in a separate directory?
Date: Tue, 28 Jan 2003 13:22:45 +0100


In my 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


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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]