automake
[Top][All Lists]
Advanced

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

Libtool: Compiling the same source as C and C++


From: Hugh Dickinson
Subject: Libtool: Compiling the same source as C and C++
Date: Wed, 22 Sep 2010 15:48:35 +0200

I am trying to convert an existing software package to build using the GNU 
autotools. The source code contains several files with .c and .cc which are 
designed to be compiled both as C and C++ regardless of their suffix (i.e. they 
contain conditionally compiled code #ifdef _cplusplus preprocessor directives). 
Unfortunately it seems like automake hard-codes the libtool "--tag" value 
directly into the Makefile.in based on the file suffix. Moreover, it appears 
that none of the target specific variables like "target_LIBTOOLFLAGS" can 
override this behaviour (they only add extra options after the first --tag 
flag). Is there any way to override this behaviour so that the --tag flag is 
not specified automatically, or will I need to make copies of all the source 
with new file suffixes so that automake instructs libtool to compile them with 
the appropriate compiler.

Cheers,

Hugh




reply via email to

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