# SConstruct file for CLAMprocessing 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('processing_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/Data/BasicProcessing','src/Data/Descriptors','src/Data/Descriptors/Melody', 'src/Processing/Analysis', 'src/Processing/ArithOps', 'src/Processing/Generators/', 'src/Processing/Synthesis', 'src/Processing/Transformations', 'externals/numrec', 'src/Processing/SDIFIO', 'src/Tools/SDIF','src/Processing/Default*.*xx', 'src/Processing/SMS*.*xx', 'src/Standard/ScaleCnv.*','src/Processing/Transformations/SMS', 'src/Processing/Controls' ] blacklist = ['GT_FilterBank','OnsetDetector',r'Audio\..+'] if not processing_env.has_key('with_osc_support') : blacklist.append('OSCSender') if not processing_env.has_key('with_fftw') : blacklist.append('.+rfftw.+') if not processing_env.has_key('with_nr_fft') : blacklist.append('.*numrecipes.+') blacklist.append('.+numrec.+') 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 dependencies and tasks if not processing_env.GetOption('clean') : print """\ ############################################## ### BOOTSTRAPPING CLAM PROCESSINGS LIBRARY ### ##############################################""" print "Creating pkg-config descriptor...", pkg_data = PackageData( 'clam_processing', version, [] ) pkg_data.create_pkg_descriptor( processing_env, 'clam_processing.pc' ) print "ok" if not processing_env.GetOption('clean') : header_files, source_files = define_module_contents() else : manifest = Manifest() header_files = [] source_files = [] manifest.load( header_files, source_files ) processing_env.Prepend(CPPPATH=['include','../core/include']) if not processing_env.GetOption('clean') : handle_preinclude( processing_env ) processing_env.Append(LIBS=['clam_core']) #if sys.platform == 'win32' : # processing_env.Append(LIBS=['clam_core_templates']) processing_env.Prepend(LIBPATH=['../core']) headers = [ File(header) for header in header_files ] if sys.platform != 'win32' : processing_tgt, processing_install_tgt = posix_lib_rules( 'processing', version, headers, source_files, install_dirs, processing_env ) else : processing_tgt, processing_install_tgt = win32_lib_rules( 'processing', version, headers, source_files, install_dirs, processing_env ) Return( 'processing_tgt', 'processing_install_tgt' )