diff options
author | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:14:38 +0200 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:14:38 +0200 |
commit | 28b7e464fd119b8c848753a1f41070422c463c41 (patch) | |
tree | 07449abdf85d8f1fd4068839b974242b429720ca /init_keyword/SConstruct | |
parent | 90c6018a9401e38859f733b3521c919e042322b7 (diff) | |
parent | 6932ee2d22511226378218992b0005cb01eb235e (diff) |
Merge branchesHEADsvn2git-headmaster
- abstractions/tb
- externals/tb
Diffstat (limited to 'init_keyword/SConstruct')
-rw-r--r-- | init_keyword/SConstruct | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/init_keyword/SConstruct b/init_keyword/SConstruct new file mode 100644 index 0000000..d78c84e --- /dev/null +++ b/init_keyword/SConstruct @@ -0,0 +1,55 @@ +sources = ['init_keyword.cpp'] + +env = Environment(CCFLAGS = '-DFLEXT_SYS_PD -DFLEXT_THREADS -DFLEXT_SHARED') + +env.SConsignFile() +env.CacheDir('./obj') + +opt = Options(['options.cache', 'custom.py']) +opt.AddOptions( + BoolOption('debug', 'Build with debugging symbols', False), + ('optimize', 'Optimize for specific architecture', None), + BoolOption('simd', 'build with simd instructions', False), + BoolOption('icc', 'Use intel c compiler', False), + ('prefix', 'install prefix', '/usr/local'), + ('flext_path', 'flext path', None), + ('pd_path', 'pd path', None), + ) + +opt.Update(env) + +opt.Save('options.cache',env) +Help(opt.GenerateHelpText(env)) + + +if env.Dictionary().has_key('flext_path'): + env.Append(CPPPATH=[env['flext_path']]) + +if env.Dictionary().has_key('pd_path'): + env.Append(CPPPATH=[env['pd_path']]) + +if env.Dictionary().has_key('optimize'): + if env['optimize']: + env.Append(CCFLAGS=' -O3 '+env['optimize']) + +if env.Dictionary().has_key('simd') and env['simd']: + env.Append(CCFLAGS=' -mfpmath=sse -msse -mmmx -msse2') + +if env.Dictionary().has_key('debug') and env['debug']: + env.Append(CCFLAGS=' -g') + env.Append(LIBS = 'flext-pd_d') +else: + env.Append(LIBS = 'flext-pd') + +if env.Dictionary().has_key('icc') and env['icc']: + env['CC']='icc' + env['CXX']='icc' + env['LD']='xild' + env.Append(CCFLAGS=' -ip ') + env.Append(LINKFLAGS=' -i-static '+env['CCFLAGS']) + + +ik = env.SharedLibrary('init_keyword', sources, SHLIBPREFIX='', SHLIBSUFFIX='.pd_linux') + +env.Install('/usr/local/lib/pd/extra',ik) +env.Alias('install', '/usr/local/lib/pd/extra') |