* Andreas Otto wrote on Sun, May 24, 2009 at 06:37:48PM CEST:
> Am Sonntag 24 Mai 2009 16:59:29 schrieb Ralf Wildenhues:
> > * Andreas Otto wrote on Fri, May 22, 2009 at 01:17:50PM CEST:
> > >   2.      I create a "C" libraray using a couple of *.c files
> >
> > lib_LTLIBRARIES = libceelib.la
> > libceelib_la_SOURCES = foo.c bar.c
> >
> > >   3.      now I want to create a "C++" library from the same *.c input 
> > > files
> >
> > lib_LTLIBRARIES += libceepluspluslib.la
> > libceepluspluslib_la_SOURCES = $(libceelib_la_SOURCES)
> > EXTRA_libceepluspluslib_la_SOURCES = dummy.cpp
> 
> this does not solve the problem, because not only the linker have to be
> choosen ... the "*.c" files itself should be compiled using "g++" and 
> not "gcc"

Hmm.  One thing to do is to
  CC = $(CXX)

which can be done if all .c files ought to be compiled with a C++
compiler.  In order to avoid listing files twice, you'd then need
to move the file list in a makefile fragment and then include that
from the two Makefile.am files.

In order to fix the libtool call, it is probably sufficient to add
  AM_LIBTOOLFLAGS = --tag=CXX

or, more specifically,
  libceepluspluslib_la_LIBTOOLFLAGS = --tag=CXX

Hope that helps.

Cheers,
Ralf


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to