# SConstruct for SMS Tools (Console flavor) # 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( PathOption( 'install_prefix', 'Prefix where SMS Tools (console) is to be 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' ) source_dirs = ['../../src'] tools_env.Append( CPPPATH=source_dirs ) tools_env.Append( CCFLAGS='-include CLAM/preinclude.hxx' ) sourcefiles = ['../../src/SMS.cxx','../../src/XMLSerializer.cxx','../../src/SDIFSerializer.cxx','../../src/SerializationController.cxx','../../src/SMSAnalysisSynthesisConfig.cxx', '../../src/Progress.cxx', '../../src/WaitMessage.cxx', '../../src/StdOutProgress.cxx', '../../src/StdOutWaitMessage.cxx', '../../src/SMSBase.cxx'] tools_bin = tools_env.Program( 'SMSConsole', sourcefiles, LINKFLAGS=['-rdynamic'] ) install_bin = tools_env.Install( tools_env['install_prefix']+"/bin", tools_bin ) tools_env.AddPostAction( install_bin, 'chmod 755 $TARGET' ) manpage = ['../../resources/man/man9/SMSConsole.9'] install_manpage = tools_env.Install( tools_env['install_prefix']+"/share/man/man9", manpage ) tools_env.Alias( 'install', [install_bin, install_manpage] ) Default(tools_bin)