finish unfinished work at basing all install paths on the program name
[ardour.git] / libs / audiographer / wscript
index 66f4e80b724171c39e564617b259cb2497eebe77..d7f4eda0d19669fcd64aca47b9e42fc912aef967 100644 (file)
@@ -54,19 +54,26 @@ def build(bld):
                                    and bld.is_defined('HAVE_GLIBMM')
                                    and bld.is_defined('HAVE_GTHREAD'))
 
-    audiographer = bld(features = 'cxx cxxshlib')
-    audiographer.source = '''
-            private/gdither/gdither.cc
-            src/general/sample_format_converter.cc
-            src/routines.cc
-            src/debug_utils.cc
-            src/general/broadcast_info.cc
-    '''
-
+    audiographer_sources = [
+        'private/gdither/gdither.cc',
+        'src/general/sample_format_converter.cc',
+        'src/routines.cc',
+        'src/debug_utils.cc',
+        'src/general/broadcast_info.cc',
+        'src/general/normalizer.cc'
+        ]
     if bld.is_defined('HAVE_SAMPLERATE'):
-        audiographer.source += '''
-                src/general/sr_converter.cc
-        '''
+        audiographer_sources += [ 'src/general/sr_converter.cc' ]
+
+    if bld.is_defined ('INTERNAL_SHARED_LIBS'):
+        audiographer              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=audiographer_sources)
+        # macros for this shared library
+        audiographer.defines      = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ]
+    else:
+        audiographer              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
+        audiographer.cxxflags     = [ '-fPIC' ]
+        audiographer.cflags       = [ '-fPIC' ]
+        audiographer.defines      = []
 
     audiographer.name           = 'libaudiographer'
     audiographer.target         = 'audiographer'
@@ -75,7 +82,7 @@ def build(bld):
     audiographer.uselib         = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE'
     audiographer.use            = 'libpbd'
     audiographer.vnum           = AUDIOGRAPHER_LIB_VERSION
-    audiographer.install_path   = os.path.join(bld.env['LIBDIR'], 'ardour3')
+    audiographer.install_path   = os.path.join(bld.env['LIBDIR'])
 
 
     if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):