+ # Library
+ if bld.is_defined ('INTERNAL_SHARED_LIBS'):
+ obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=lib_source)
+ # DLL exports for this library
+ obj.defines = [ 'LIBEVORAL_DLL_EXPORTS' ]
+ else:
+ obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=lib_source)
+ obj.cxxflags = [ '-fPIC' ]
+ obj.cflags = [ '-fPIC' ]
+ obj.defines = [ ]
+
+ obj.export_includes = ['.']
+ obj.includes = ['.', './src']
+ obj.name = 'libevoral'
+ obj.target = 'evoral'
+ obj.uselib = 'GLIBMM GTHREAD SMF XML'
+ obj.use = 'libsmf libpbd'
+ obj.vnum = EVORAL_LIB_VERSION
+ obj.install_path = bld.env['LIBDIR']
+ obj.defines += [ 'PACKAGE="libevoral"', 'EVORAL_MIDI_XML=1' ]
+
+ if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
+ # Static library (for unit test code coverage)
+ obj = bld(features = 'cxx cstlib')
+ obj.source = lib_source
+ obj.source = lib_source
+ obj.export_includes = ['.']
+ obj.includes = ['.', './src']
+ obj.name = 'libevoral_static'
+ obj.target = 'evoral_static'
+ obj.uselib = 'GLIBMM GTHREAD SMF XML'
+ obj.use = 'libsmf libpbd'
+ obj.vnum = EVORAL_LIB_VERSION
+ obj.install_path = ''
+ if bld.env['TEST_COVERAGE']:
+ obj.linkflags = '-lgcov'
+ obj.cflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ obj.defines = ['PACKAGE="libevoral"', 'EVORAL_MIDI_XML=1' ]
+
+ # Unit tests
+ obj = bld(features = 'cxx cxxprogram')
+ obj.source = '''
+ test/SequenceTest.cpp
+ test/SMFTest.cpp
+ test/RangeTest.cpp
+ test/CurveTest.cpp
+ test/testrunner.cpp
+ '''
+ obj.includes = ['.', './src']
+ obj.use = 'libevoral_static'
+ obj.uselib = 'CPPUNIT SNDFILE'
+ obj.target = 'run-tests'
+ obj.name = 'libevoral-tests'
+ obj.install_path = ''
+ obj.defines = ['PACKAGE="libevoraltest"']
+ if bld.env['TEST_COVERAGE']:
+ obj.linkflags = '-lgcov'
+ obj.cflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+
+def shutdown():
+ autowaf.shutdown()