[ardour-dev] File Extensions and Preprocessor stuff

Paul Davis paul at linuxaudiosystems.com
Wed May 2 05:39:22 PDT 2007

On Wed, 2007-05-02 at 13:15 +0000, John Emmas wrote:
> I've managed to build one of the simple branches from Ardour (the
> 'Clearlooks' branch) using an IDE but the following things confused me:-


> a)  I've gathered that Linux object files end in ".o" and dynamic libraries
> have the extension ".so".  What are the targets with the extension ".os"?
> Are they static libraries?  My IDE seems to think that static libs should
> end with ".a" (although I can change that).

there are no fixed names for any files on any unix-based operating
system, only conventions. SCons happens to build object files that are
intended to become part of a shared library as .os rather than .o,
because the compile flags required on some platforms are different (e.g.
x86_64 *requires* position independent code). this approach allows you
to not nuke an existing library build if you switch between shared and
static libraries (or build both at once). ardour doesn't actually do
this, but there is no reason to mess with SCons conventions since they
don't affect anything else.

> b)  How do I find out what pre-processor definitions are defined?  Are these
> the "env" and "opt" entries that I can see in the main SConstruct file - or
> can each SConscript file have it's own preprocessor  definitions?  So far,
> I've assumed that the "Import" statement (at the start of each SConscript
> file) imports a set of global definitions defined in SConstruct.  Is that
> assumption right?

import has nothing whatsoever to do with pre-processor definitions. it
makes some python symbols that are part of the top level SConstruct file
available to sub-directory SConscript files.

every SConscript file can have add its own definitions.

find . -name SConscript | xargs egrep '(CXXFLAGS|CPPFLAGS|CFLAGS)'

will reveal all.

and btw, to sound like a truly stuck record, but i am certain that you
are really, really, really wasting your time doing this. if you unpack
the source and type "scons", ardour will get built without any work
trying to get an IDE to understand how SCons works or related matters.
I've been writing code for more than 20 years and I haven't yet seen a
single piece of functionality in an IDE that outweighs the costs of
trying to use them. your mileage may vary, but if there are issues with
using an IDE in any context, they are going to double or worse when the
core developers of a given project do not just not use your IDE of
choice, but don't use *any* IDE at all.


More information about the Ardour-Dev mailing list