# SConstruct file for CLAM vmfl from buildtools import * from buildtools.include_rename import * from buildtools.pkggen import PackageData from buildtools.file_retriever import FileRetriever from buildtools.rulesets import * import os, sys Import('vmfl_env version top install_dirs header_db') def define_module_contents() : print "Gathering necessary source files...", if not os.path.exists('src') : os.mkdir('src') if not os.path.exists('include' ) : os.makedirs('include/CLAM') folders = ['src/Visualization/Base','src/Visualization/GL', 'src/Visualization/Plot', 'src/Visualization/Presentation/Base' ,'src/Visualization/Presentation/FLTK', 'src/Visualization/Util', 'src/Visualization/View', 'src/Visualization/Widget/FLTKWrapper.*xx', 'src/Visualization/Widget/FLTK' ] blacklist = ['GLLogPowSpRenderer','GLLogSpRenderer','ProcessingController','Fl_Range','FDFilterController','TokenDelayController','HugeArrayRenderer'] file_retriever = FileRetriever( top+'/..', folders, blacklist ) file_retriever.scan() store_headers_in_db( header_db ) for filename in file_retriever.headers : update_includes( header_db, filename ) for filename in file_retriever.sources : update_includes( header_db, filename ) manifest = Manifest() manifest.store( file_retriever.headers, file_retriever.sources ) print "ok" return file_retriever.headers, file_retriever.sources # Module task and depedencies definition if not vmfl_env.GetOption('clean') : print """\ #################################################################### ### BOOTSTRAPPING CLAM FLTK-BASED VISUALIZATION MODULE LIBRARY ### ####################################################################""" print "Creating pkg-config descriptor...", pkg_data = PackageData( 'clam_vmfl', version, [] ) pkg_data.create_pkg_descriptor( vmfl_env, 'clam_vmfl.pc' ) print "ok" if not vmfl_env.GetOption('clean') : header_files, source_files = define_module_contents() else : manifest = Manifest() header_files = [] source_files = [] manifest.load( header_files, source_files ) headers = [ File(header) for header in header_files] vmfl_env.Prepend(CPPPATH=['include','../core/include','../processing/include','../audioio/include']) if not vmfl_env.GetOption('clean') : handle_preinclude( vmfl_env ) vmfl_env.Append(LIBS=['clam_core', 'clam_processing','clam_audioio']) #if sys.platform == 'win32' : # vmfl_env.Append( LIBS=['clam_core_templates'] ) vmfl_env.Prepend(LIBPATH=['../core','../processing','../audioio']) if sys.platform != 'win32' : vmfl_target, vmfl_install_target = posix_lib_rules( 'vmfl', version, headers, source_files, install_dirs, vmfl_env ) else : vmfl_target, vmfl_install_target = win32_lib_rules( 'vmfl', version, headers, source_files, install_dirs, vmfl_env ) Return( 'vmfl_target', 'vmfl_install_target' )