Skip to content

Commit

Permalink
Linux support for the blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrucher committed Feb 11, 2011
1 parent 975439d commit 7111808
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 19 deletions.
20 changes: 17 additions & 3 deletions SConscript
Expand Up @@ -2,6 +2,20 @@
Import('env')

env.SConscript([
"blocks\SConstruct",
"plugins\SConstruct",
])
"blocks/SConstruct",
])

env_plugin = env.Clone()

if env_plugin['debug']:
env_plugin.EnableQt4Modules(['QtCore', 'QtGui', ], debug=True)
env_plugin['QWinMigratelib'] = 'QtSolutions_MFCMigrationFramework-2.8d'
else:
env_plugin.EnableQt4Modules(['QtCore', 'QtGui', ], debug=False)
env_plugin['QWinMigratelib'] = 'QtSolutions_MFCMigrationFramework-2.8'

Export('env_plugin')

env_plugin.SConscript([
"plugins/SConstruct",
])
7 changes: 0 additions & 7 deletions SConstruct
Expand Up @@ -50,12 +50,5 @@ env.Append(CPPPATH=env['vst'])
env.Append(CPPPATH=env['qwinmigrate'] + os.sep + 'src')
env.Append(LIBPATH=env['qwinmigrate'] + os.sep + 'lib')

if env['debug']:
env.EnableQt4Modules(['QtCore', 'QtGui', ], debug=True)
env['QWinMigratelib'] = 'QtSolutions_MFCMigrationFramework-2.8d'
else:
env.EnableQt4Modules(['QtCore', 'QtGui', ], debug=False)
env['QWinMigratelib'] = 'QtSolutions_MFCMigrationFramework-2.8'

Export('env')
env.SConscript(['SConscript', ], variant_dir='build')
20 changes: 20 additions & 0 deletions boost-linux2.scons
@@ -0,0 +1,20 @@

import os.path
import glob

Import('env')

for libpath in os.environ['LD_LIBRARY_PATH'].split(':'):
l = list(glob.glob(libpath + '/libboost_thread-%s-mt*.so' % env['boost']))
if len(l) > 0:
env['boost_suffix'] = l[0][l[0].find("libboost_thread") + 15:-3]
env.Prepend(LIBPATH=[libpath])
break
if os.path.exists(libpath + '/libboost_thread.so'):
env['boost_suffix'] = ''
env.Prepend(LIBPATH=[libpath])
break

env['boost_optimize_flags'] = ['BOOST_DISABLE_ASSERTS', ]

Return('env')
35 changes: 35 additions & 0 deletions gcc-linux2.scons
@@ -0,0 +1,35 @@

import os
import re

Import('env')

env.Append(FORTRANFLAGS='')

if env['debug']:
env.Append(CFLAGS='-g -Wall')
env.Append(CXXFLAGS='-g -Wall')
if env['optimized']:
env.Append(CFLAGS='-O3')
env.Append(CXXFLAGS='-O3')

if env['profile']:
env.Append(CFLAGS='-g')
env.Append(CXXFLAGS='-g')

env['boost'] = 'gcc'

env.Tool('gcc')

env['SWIGCFILESUFFIX'] = '_wrap.gcc$CFILESUFFIX'
env['SWIGCXXFILESUFFIX'] = '_wrap.gcc$CXXFILESUFFIX'
env['LIBPATH'] = []

env['no_exception_flag'] = ['-fno-exceptions', ]

Export('env')
env = SConscript('common.scons')
Export('env')
env = SConscript('boost-linux2.scons')

Return('env')
39 changes: 39 additions & 0 deletions icl-linux2.scons
@@ -0,0 +1,39 @@

import os
import re

opts = {'1' : '',
'2' : '-xHost',
'3' : '-xSSSE3 -axSSE4.2',
}

Import('env')

env.Append(CCFLAGS='-g -sox -wd177,304,383,869,981,1418,1572,2196')
env.Append(CXXFLAGS='-std=c++0x')

if env['debug']:
env.Prepend(CCFLAGS='-DDEBUG -debug full -Wall -ftrapuv')
if env['optimized']:
env.Append(CPPDEFINES = 'USE_RESTRICT')
env.Append(CPPDEFINES = 'x86_64')
env.Append(CCFLAGS='-Wall -O3 -no-prec-div -ansi-alias -ftz -DNDEBUG -restrict -fp-model fast=2 ') #-vec-report2

if env['profile']:
env.Append(CCFLAGS='-g')

env['boost'] = 'il'

env.Tool('icl', topdir = os.environ['PATH'])

env['SWIGCFILESUFFIX'] = '_wrap.icl$CFILESUFFIX'
env['SWIGCXXFILESUFFIX'] = '_wrap.icl$CXXFILESUFFIX'

env['no_exception_flag'] = ['-fno-exceptions', ]

Export('env')
env = SConscript('common.scons')
Export('env')
env = SConscript('boost-linux2.scons')

Return('env')
9 changes: 6 additions & 3 deletions plugins/SConstruct
@@ -1,6 +1,9 @@

Import('env')
import sys

env.SConscript([
"variable filter\SConstruct",
Import('env_plugin')

if env_plugin['vst'] is not "" and sys.platform == "win32":
env_plugin.SConscript([
"variable filter/SConstruct",
])
12 changes: 6 additions & 6 deletions plugins/variable filter/SConstruct
@@ -1,9 +1,9 @@

Import('env')
Import('env_plugin')

env.Prepend(LIBS = [env['QWinMigratelib'], "user32"])
env.Append(CPPDEFINES = "QT_QTWINMIGRATE_IMPORT")
env.Append(CPPPATH = env["vst"] + r"\public.sdk\source\vst2.x")
env_plugin.Prepend(LIBS = [env_plugin['QWinMigratelib'], "user32"])
env_plugin.Append(CPPDEFINES = "QT_QTWINMIGRATE_IMPORT")
env_plugin.Append(CPPPATH = env_plugin["vst"] + r"\public.sdk\source\vst2.x")

libmain = env.SharedLibrary('QtVariableFilter', Glob("*.cpp") + [r"..\vstplug.def", env["vst"] + r"\public.sdk\source\vst2.x\audioeffect.cpp", env["vst"] + r"\public.sdk\source\vst2.x\audioeffectx.cpp", ])
libmain = env.Install('$LIBDIR', libmain)
libmain = env_plugin.SharedLibrary('QtVariableFilter', Glob("*.cpp") + [r"..\vstplug.def", env_plugin["vst"] + r"\public.sdk\source\vst2.x\audioeffect.cpp", env_plugin["vst"] + r"\public.sdk\source\vst2.x\audioeffectx.cpp", ])
libmain = env_plugin.Install('$LIBDIR', libmain)

0 comments on commit 7111808

Please sign in to comment.