1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#!/usr/bin/env python
# encoding: utf-8
import sys, os, TaskGen, ctypes, wscript_helper
def configure(conf):
pass
@TaskGen.feature('test_loadable')
def test_loadable(self):
def link_and_test(lib=self.link_task.outputs[0].bldpath(self.env), link=self.link_task.run):
link()
try:
ctypes.cdll.LoadLibrary(lib)
except Exception as e:
raise RuntimeError("LADSPA load test failed: %s" % e)
self.link_task.run = link_and_test
def build(bld):
bsources = [
'../gx_head/engine/gx_json.cpp',
'../gx_head/engine/gx_faust_plugins.cpp',
'../gx_head/engine/gx_internal_plugins.cpp',
'../gx_head/engine/gx_engine_audio.cpp',
'../gx_head/engine/gx_paramtable.cpp',
'../gx_head/engine/gx_convolver.cpp',
'../gx_head/engine/gx_resampler.cpp',
'../gx_head/engine/gx_system.cpp',
'../gx_head/engine/gx_logging.cpp',
'../gx_head/engine/gx_pluginloader.cpp',
## lib can't be used (-fPIC)
'../plugins/zita_rev1.cc',
'../plugins/vibe.cc',
'../plugins/abgate.cc',
'../plugins/ts9sim.cc',
'../plugins/aclipper.cc',
'../plugins/mxrdist.cc',
'../plugins/bossds1.cc',
'../plugins/flanger_gx.cc',
'../plugins/mbc.cc',
'../plugins/mbcs.cc',
'../plugins/mbd.cc',
'../plugins/mbe.cc',
'../plugins/mbdel.cc',
'../plugins/mbchor.cc',
'../plugins/reversedelay.cc',
'../plugins/gcb_95.cc',
'../plugins/hfb.cc',
'../plugins/hogsfoot.cc',
'../plugins/lpbboost.cc',
'../plugins/rolandwah.cc',
'../plugins/metronome.cc',
]
src = ['ladspa_guitarix.cpp'] + bsources
incl = ['../headers', '..','../gx_head/engine','../plugins','../../libgxwmm','../../libgxw']
lib = []
if sys.platform.startswith("linux"):
lib.append('dl')
uselib = ['JACK', 'SNDFILE', 'GTHREAD', 'GMODULE_EXPORT',
'GLIBMM', 'GIOMM', 'FFTW3', 'BOOST_SYSTEM', 'LILV']
wscript_helper.add_zita_convolver(bld, uselib, src, incl)
wscript_helper.add_zita_resampler(bld, uselib, src, incl)
ladspa_plugin = bld(
#features='cxx cprogram', ## for debugging
features='cxx cshlib test_loadable',
includes = incl,
lib = lib,
uselib = uselib,
#uselib_local = ["plugins"], ## needs -fPIC
cxxflags = ["-fvisibility=hidden"],
defines = ["LADSPA_SO"],
target = 'ladspa_guitarix',
source = src,
install_path = '${LADSPADIR}',
chmod = 0o755,
)
ladspa_plugin.env['shlib_PATTERN'] = '%s.so'
bld.install_files('${SHAREDIR}/ladspa/rdf', 'guitarix_amp.rdf')
|