# SConstruct for SMS Tools # import sys, os, glob tools_env = Environment( ENV=os.environ ) opts = Options( 'SMSTools.conf' ) opts.Add( PathOption( 'clam_prefix', 'Prefix where CLAM was installed', '/usr') ) opts.Add( BoolOption( 'release', 'Build SMS Tools enabling compiler optimizations', 'yes' ) ) opts.Update( tools_env ) opts.Save( 'SMSTools.conf', tools_env ) Help( opts.GenerateHelpText( tools_env ) ) if tools_env['release'] : tools_env.Append( CCFLAGS=['-O3', '-fomit-frame-pointer', '-Wall'] ) else : tools_env.Append( CCFLAGS=['-g', '-Wall'] ) tools_env.ParseConfig( 'pkg-config --cflags --libs clam_core clam_processing clam_audioio clam_vmqt clam_vmfl' ) source_dirs = ['../src', '../src/GUI', '../src/GUI/ScoreEditor'] tools_env.Append( CPPPATH=source_dirs ) tools_env.Append( CCFLAGS='-include CLAM/preinclude.hxx' ) sourcefiles = [] for dir in source_dirs : sourcefiles += glob.glob(dir+'/*.cxx') sourcefiles.remove('../src/SMSBatch.cxx') sourcefiles.remove('../src/SMS.cxx') tools_bin = tools_env.Program( 'SMSTools', sourcefiles, LINKFLAGS=['-rdynamic'] )