aboutsummaryrefslogtreecommitdiff
path: root/init_keyword/SConstruct
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2005-08-23 09:02:07 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:11:59 +0200
commit9b669448eb77874a0c99f240171743d6e1001788 (patch)
treeb1a6c9e36c111cf6a99882d0d8f78810c333b414 /init_keyword/SConstruct
parentf1c4f4640db0f0446accfbf7013b7b7b53a86c55 (diff)
importing init_keyword external
svn path=/trunk/externals/tb/; revision=3449
Diffstat (limited to 'init_keyword/SConstruct')
-rw-r--r--init_keyword/SConstruct55
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')